Skip to content

Add Git history safety scan#11

Merged
PrzemyslaV88 merged 1 commit into
mainfrom
codex/add-git-history-safety-scan
May 31, 2026
Merged

Add Git history safety scan#11
PrzemyslaV88 merged 1 commit into
mainfrom
codex/add-git-history-safety-scan

Conversation

@PrzemyslaV88
Copy link
Copy Markdown
Owner

Summary

  • add a Git history scanner for old secrets, private evidence paths, and non-placeholder target material
  • expose it as npm run check:history
  • document the new command in tools/README.md

Validation

  • npm run check:history
  • npm test
  • git diff --check
  • git rev-parse --is-shallow-repository returned false

History scan result: passed across 10 commits and 1,092 historical text-file versions.

@PrzemyslaV88 PrzemyslaV88 merged commit 7854211 into main May 31, 2026
4 checks passed
@PrzemyslaV88 PrzemyslaV88 deleted the codex/add-git-history-safety-scan branch May 31, 2026 01:29
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant