ci: pin actions, read-only perms, secret scan, parser tests#4
Closed
muhammademanaftab wants to merge 3 commits into
Closed
ci: pin actions, read-only perms, secret scan, parser tests#4muhammademanaftab wants to merge 3 commits into
muhammademanaftab wants to merge 3 commits into
Conversation
The transcript parser (the most fragile code in the repo) and the new redaction pass had no tests, and CI could neither catch a committed secret nor ran with least privilege. - test_capture.py: fixture-driven tests for the transcript parser (extraction, auto-injected-prompt skipping, tool_use field filtering, pending-background skip) and for redaction / truncation. Runs in CI. - ci.yml: top-level `permissions: contents: read`; actions pinned to commit SHAs with a version comment; a gitleaks job scanning full history so the "grep the diff before push" rule is machine-enforced. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The parser tests embed deliberately fake secrets (fake AWS/GitHub/ OpenAI keys) so the redaction pass can be exercised. Add a gitleaks config that extends the default ruleset and allowlists that one test file, so the secret-scan job does not flag its fixtures. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Remove the vacuous exemption on the secret-is-gone assertion (both exempted kinds pass without it), add cases for prefixed env-var assignments (GITHUB_TOKEN=, DB_PASSWORD=, STRIPE_SECRET_KEY:, AWS_SECRET_ACCESS_KEY=), and cover the https-only refusal in load_env(). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
muhammademanaftab
force-pushed
the
ci-tests
branch
from
July 6, 2026 10:33
be08a32 to
1f3977f
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.
Second of four staged hardening PRs. Stacked on #3 (base branch
security-hardening); rebase todeveloponce #3 merges.What and why
The transcript parser (the most fragile code in the repo) and the new redaction pass had no tests, and CI ran with default write permissions, unpinned actions, and no secret scan.
content/old_string/new_stringdropped), pending-background skip, and redaction/truncation for every pattern class. Runs in CI.permissions: contents: read;actions/checkoutandactions/setup-pythonpinned to commit SHAs (version in a comment); agitleaksjob scanning full history so HARD rule security: redact secrets, enforce https, harden the ingest backend #3 (grep the diff before push) is machine-enforced.Verification
python3 skills/setup/test_capture.py-> 9 passed locally.🤖 Generated with Claude Code