Repository navigation
feat: secret scan before a commit and in CI - #4
Merged
Merged
Conversation
scripts/secret-scan.mjs refuses secrets (token formats, private keys, JSON Web Tokens, database URLs with a password, filled secrets in configuration files) and local data files (env files, keys, databases, dumps). It never prints the value it found and needs only Node and Git. .githooks/pre-commit runs it on staged content once the clone sets core.hooksPath; the CI Lint job runs it over every tracked file. Seven tests run it for real in a temporary Git repository. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ta9C9QGH3qLAAqc7fEucC
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What
The owner approved a pre-commit secret scan on 2026-11-21.
scripts/secret-scan.mjs: zero dependencies (Node and Git). Refuses token formats, private keys, JSON Web Tokens, database URLs with a password, filled secrets in configuration files, and local data files by name (env files, keys, databases, dumps). It names the file, the line and the rule; it never prints the value..githooks/pre-commit: runs it on staged content. Install once per clone:git config core.hooksPath .githooks.app/secret-scan.test.mjs: 7 tests that run the scanner in a temporary Git repository. All 7 failed before the script existed.docs/security.md,docs/testing.md,README.md, handoff and verification notes.No runtime file changed.
Verified locally
lintandtypecheckexit 0;test70/70; the scanner over the whole tree reports no findings.Not run
build,deploy:dry-run,test:e2e, live Vera.Generated by Claude Code