Add Git history safety scan#11
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88eacf2bb7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| findings.push(`${commit.slice(0, 12)} ${filePath}:${lineNo}: ${rule}`); | ||
| } | ||
|
|
||
| const commits = git(["rev-list", "--all"]).trim().split(/\r?\n/).filter(Boolean); |
There was a problem hiding this comment.
Reject shallow clones before scanning history
In CI or local clones created with a shallow fetch, this line only enumerates the commits that are present locally, so npm run check:history can report a clean scan while older commits containing secrets or private evidence were never inspected. I checked the new script's workflow and git rev-list --all is the only source of commits; add a git rev-parse --is-shallow-repository guard that fails with instructions to fetch full history before claiming that all Git commits were scanned.
Useful? React with 👍 / 👎.
Summary
Validation
History scan result: passed across 10 commits and 1,092 historical text-file versions.