Skip to content

fix(cli): reject destroy view path-join escape - #3429

Merged
bpamiri merged 2 commits into
developfrom
cursor/cli-hardener-s1-s10-94a7
Aug 27, 2026
Merged

fix(cli): reject destroy view path-join escape#3429
bpamiri merged 2 commits into
developfrom
cursor/cli-hardener-s1-s10-94a7

Conversation

@bpamiri

@bpamiri bpamiri commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

CLI Hardener S1–S10 on the cli/lucli/** seam. One production fix; the rest is prove-only or HOLD pins. No exit-code flips. No SQLite pin unification.

HEAD: 75366ba0780bf923e9c79eec284abac795c9b969

PROVEN

ID Verdict What
S1 FIX wheels destroy view ../x is rejected so preview/delete cannot path-join outside app/views/
S2 PROVEN generate controller ../XCodeGen listFirst packagePath is unvalidated; Module.generateController never calls validateName
S3 PINNED HOLD wheels doctor CRITICAL then return "" (exit 0). validate() already throws. Not flipped
S4 PINNED HOLD wheels analyze catch (any) then return "". validate() rethrows. Not flipped
S5 PINNED HOLD wheels start refuse (not a project / name collision) return "" so start && continues. Not flipped
S6 PROVEN generateTest missing-template fallback still mints expect(true).toBeTrue()
S7 PROVEN TestRunner.runViaHttp is a mirrored helper: 417 treated as HTTP fail; no /wheels/cli/tests; live $buildTestRunnerPath is app|core only
S8 PROVEN tools/test-cli-local.sh defaults WHEELS_CLI_TEST_STRICT=0 (can exit 0 on non-deploy fail); STRICT=1 fails closed; CI tools/ci/run-tests.sh is strict. Default not flipped
S9 PINNED HOLD SQLite JDBC pins stay forked: wheels start / test-cli-local.sh 3.49.1.0 vs CI pr.yml 3.50.3.0
S10 leftover No Module.cfc split; TestCommandSpec xdescribe left in place

Type of Change

  • Bug fix
  • Tests (prove / HOLD pins)

Feature Completeness Checklist

  • DCO sign-off
  • Tests — DestroySpec S1; CodeGenSpec S2/S6; TestRunnerSpec S7; CliHardenerS1S10Spec S2/S3/S4/S5/S7/S8/S9
  • Changelog fragmentchangelog.d/cli-destroy-view-path-escape.security.md
  • Test runnerWHEELS_CLI_TEST_STRICT=1 bash tools/test-cli-local.sh exited 0 (1188 pass). New bundles all green: CliHardenerS1S10Spec 12, CodeGenSpec 33, DestroySpec 15, TestRunnerSpec 12. Pre-existing un-gated counts in the JSON: 2 SshClientSpec/SshPoolSpec bundle errors (no docker for deploy-sshd-up.sh) and 1 nested ServerCommandsSpec fail. The locked evaluator does not walk nested suiteStats or bundle-level errors; those are outside this story.

Test Plan

  • Driver (locked): WHEELS_CLI_TEST_STRICT=1 bash tools/test-cli-local.sh
  • Do not treat wheels test --core --ci --filter=cli as the green
  • Do not treat CommandBox box testbox as the green
Open in Web Open in Cursor 

cursoragent and others added 2 commits August 27, 2026 11:52
wheels destroy view ../x was accepted as controller/view and joined
through app/views/, so preview and delete could leave that tree.
Reject .. and backslash segments in destroyView and previewDestroy.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Peter Amiri <peter@alurium.com>
Prove generate controller ../X packagePath hole, generateTest
expect(true) fallback mint, TestRunner 417/path gap, and
test-cli-local.sh STRICT=0 default. Pin doctor/analyze/start
empty returns and the forked SQLite JDBC pins. No exit flips.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Peter Amiri <peter@alurium.com>
@github-actions github-actions Bot added the docs label Aug 27, 2026
@bpamiri
bpamiri marked this pull request as ready for review August 27, 2026 11:59
@bpamiri
bpamiri merged commit 33b147a into develop Aug 27, 2026
9 checks passed
@bpamiri
bpamiri deleted the cursor/cli-hardener-s1-s10-94a7 branch August 27, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants