You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(security): accept reviewed platform fixtures, placeholders and hashes by commit and path - #11
Platform's weekly full-history credential scan has failed since it started. After #10, it still reports 19 path/rule pairs. 17 of them are test fixtures, documentation placeholders, a public OAuth client ID, a Secret Manager secret name and file hashes. The code owner approved excepting them. While the scan is always red, a new real finding in history would look like the usual failure.
Fix
Add 13 exceptions to the platform-only block. Each matches rule, path and the exact commits that added or carried the finding, all together.
Each exception covers one file, except two: the two entity-retriever docs share their commits and rule, and so share one exception.
Any other commit on these paths is still scanned and blocked.
No secret value appears in the exceptions.
The two .env findings on the stale branch cursor/docx-spurious-paragraphs-6ea9 are deliberately left out. They may be real credentials and need the owner's rotation decision.
Verification
Real history: I ran the workflow's scan step locally with gitleaks 8.30.1 over all platform history (FULL_HISTORY=true, REPOSITORY=60xAI/ai-brain-platform):
main (f15f7ec4): result=10, 19 path/rule pairs;
this branch: result=10, only azure-ad-client-secret .env and generic-api-key .env remain.
New test:test_platform_fixture_exceptions_only_cover_their_own_commits commits a synthetic key on an excepted fixture path in a new commit and requires the scan to block it.
Full suite:python3 -m unittest discover -s tests passes.
An independent review confirms that each excepted finding is not a live credential, without printing values.
Risk and rollback
Two-way door. Scan configuration only. Revert the commit to roll back.
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Summary by CodeRabbit
Security
Secret scanning now recognizes approved fixtures, placeholders, and documentation examples in specified files and commits.
Added a check confirming that a synthetic API key in a test file is still flagged.
No actionable comments were generated in the recent review.
Walkthrough
The Gitleaks workflow adds commit- and path-bound allowlists for reviewed fixtures and values. A test verifies that a synthetic key outside the allowed commits is reported as a finding.
Changes: Scoped Gitleaks exceptions
Layer / File(s)
Summary
Add commit- and path-bound allowlists .github/workflows/gitleaks.yml
The workflow adds exceptions for specified rules, commits and paths. The exceptions cover test fixtures, placeholders, documentation headers and file hashes.
60xAI/.github#10: Adds an exception for the same auth.py path and rule, overlapping with the finding described for this PR.
Suggested labels:two-way door
Suggested reviewers:fergus-mw
Merge Risk: Minimal · up to 76e4c
This change narrows secret-scan exceptions to specific reviewed commits and paths, and a test confirms that new commits on those paths are still scanned. It has no runtime impact and can be reverted cleanly. Merge risk is minimal.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the main change: a security fix that accepts reviewed platform fixtures, placeholders and hashes, scoped by commit and path. The raw summary and PR objectives confirm that the change a…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: a security fix that accepts reviewed platform fixtures, placeholders and hashes, scoped by commit and path. The raw summary and PR objectives confirm that the change adds Gitleaks allowlists bound to specific rule IDs, paths and commits, plus a test for the synthetic key case. The title is specific and accurate, though it is long at 92 characters, which is above the preferred concise length.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Errors were encountered while retrieving linked issues.
Errors: 1
LINEAR integration encountered authorization issues. Please disconnect and reconnect the integration in the CodeRabbit UI.
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Essentials
Run ID: 42b9eade-3dca-48f0-808b-fc276036f524
Commits
Reviewing files that changed from the base of the PR and between f15f7ec and 76e4c82.
Files selected for processing: 2
.github/workflows/gitleaks.yml
tests/test_secret_scan.py
Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.
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
two-way doorCheap to reverse and restore the previous behavior.
1 participant
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.
Problem
Platform's weekly full-history credential scan has failed since it started. After #10, it still reports 19 path/rule pairs. 17 of them are test fixtures, documentation placeholders, a public OAuth client ID, a Secret Manager secret name and file hashes. The code owner approved excepting them. While the scan is always red, a new real finding in history would look like the usual failure.
Fix
.envfindings on the stale branchcursor/docx-spurious-paragraphs-6ea9are deliberately left out. They may be real credentials and need the owner's rotation decision.Verification
FULL_HISTORY=true,REPOSITORY=60xAI/ai-brain-platform):main(f15f7ec4):result=10, 19 path/rule pairs;result=10, onlyazure-ad-client-secret .envandgeneric-api-key .envremain.test_platform_fixture_exceptions_only_cover_their_own_commitscommits a synthetic key on an excepted fixture path in a new commit and requires the scan to block it.python3 -m unittest discover -s testspasses.Risk and rollback
Two-way door. Scan configuration only. Revert the commit to roll back.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit