fix(cli): reject destroy view path-join escape - #3429
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
75366ba0780bf923e9c79eec284abac795c9b969PROVEN
wheels destroy view ../xis rejected so preview/delete cannot path-join outsideapp/views/generate controller ../X—CodeGenlistFirstpackagePath is unvalidated;Module.generateControllernever callsvalidateNamewheels doctorCRITICAL thenreturn ""(exit 0).validate()already throws. Not flippedwheels analyzecatch (any)thenreturn "".validate()rethrows. Not flippedwheels startrefuse (not a project / name collision)return ""sostart &&continues. Not flippedgenerateTestmissing-template fallback still mintsexpect(true).toBeTrue()TestRunner.runViaHttpis a mirrored helper: 417 treated as HTTP fail; no/wheels/cli/tests; live$buildTestRunnerPathis app|core onlytools/test-cli-local.shdefaultsWHEELS_CLI_TEST_STRICT=0(can exit 0 on non-deploy fail);STRICT=1fails closed; CItools/ci/run-tests.shis strict. Default not flippedwheels start/test-cli-local.sh3.49.1.0 vs CIpr.yml3.50.3.0TestCommandSpecxdescribe left in placeType of Change
Feature Completeness Checklist
changelog.d/cli-destroy-view-path-escape.security.mdWHEELS_CLI_TEST_STRICT=1 bash tools/test-cli-local.shexited 0 (1188 pass). New bundles all green: CliHardenerS1S10Spec 12, CodeGenSpec 33, DestroySpec 15, TestRunnerSpec 12. Pre-existing un-gated counts in the JSON: 2SshClientSpec/SshPoolSpecbundle errors (no docker fordeploy-sshd-up.sh) and 1 nestedServerCommandsSpecfail. The locked evaluator does not walk nestedsuiteStatsor bundle-level errors; those are outside this story.Test Plan
WHEELS_CLI_TEST_STRICT=1 bash tools/test-cli-local.shwheels test --core --ci --filter=clias the greenbox testboxas the green