Repository navigation
fix(cli): refuse likely secret files in local previews - #430
Open
PiquelChips wants to merge 1 commit into
Open
PiquelChips wants to merge 1 commit into
PiquelChips wants to merge 1 commit into
Conversation
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 44 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
PiquelChips
marked this pull request as ready for review
November 10, 2026 18:07
PiquelChips
force-pushed
the
fix/cli-local-secret-files
branch
2 times, most recently
from
November 11, 2026 13:42
5602ffb to
5fe5253
Compare
preview deploy --local refuses to send a file not in HEAD, untracked or only staged, whose name usually holds credentials, ignoring case: .env* (except .example, .sample and .template ones), id_*, *.pem, *.key, *.p12, *.pfx, credentials, *credentials.json, .npmrc, .pypirc, .netrc or .git-credentials. The error names up to 20 of them and lists all of them in details.files; --allow-secret-files sends them anyway.
PiquelChips
force-pushed
the
fix/cli-local-secret-files
branch
from
November 12, 2026 21:42
5fe5253 to
0c2a47d
Compare
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.
preview deploy --localsends every unignored file in the worktree, including files not inHEAD: untracked ones, and ones only staged by an accidentalgit add -A. A.env.localordeploy.pemwas uploaded to the daemon with only an easily missedInfoline, which--quietand--jsoncallers never see.HEAD, untracked or only staged, stops the command withinvalid_inputif it's named, ignoring case,.env*(except.example,.sampleand.templateones),id_*,*.pem,*.key,*.p12,*.pfx,credentials,*credentials.json,.npmrc,.pypirc,.netrcor.git-credentials. The error names up to 20 of the files, lists all of them indetails.files, and suggests.gitignoreor--allow-secret-files.--allow-secret-filessends them anyway. Tracked files are unaffected: a committed.envtemplate is still sent as committed.Worktree::secret_filescombinesgit ls-files --others --exclude-standard(through the sharedls_fileshelper) withgit diff --cached --diff-filter=A HEAD, separately from the snapshot, sosnapshot()is unchanged. The--localoptions move into a flattenedSnapshotArgs, because clippy limits a struct to three bools. The previews guide,cli.mdand the CLI reference are updated.Proof: a new snapshot test checks that the fixture's committed
.envand ignored files aren't flagged. A staged.env.local,deploy/server.PEM,id_ecdsa,.git-credentialsandapplication_default_credentials.jsonare flagged;keys.txt,credentials.goand.env.exampleare not.cargo nextest run -p piquelctl(123), clippy-D warningsand fmt pass.Note
Written by Claude Opus 5.5 in Claude Code and reviewed by Claude Opus 5.5 (via T3 Code)
🤖 Generated with Claude Code