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 the reviewed platform sign-in webhook by commit and path - #10
Real history: I ran the workflow's scan step locally with gitleaks 8.30.1 over a fresh clone of all platform history (FULL_HISTORY=true, REPOSITORY=60xAI/ai-brain-platform):
main (b07fd2dd): result=10, 20 path/rule pairs, including slack-webhook-url backend/app/api/routes/auth.py;
this branch: result=10, the same pairs minus the webhook pair (19).
New test:test_platform_webhook_exception_only_covers_its_own_commits commits a synthetic, unissued webhook on the excepted path in a new commit and requires the scan to block it. With the commits binding removed, it fails; with the binding, it passes.
What each check proves: the new test is the blocking side: a new commit on the excepted path still fails. A test cannot create the five historical commit SHAs, so the suppression side is proven by the real-history scan above.
Full suite:python3 -m unittest discover -s tests: 10 tests OK.
What this does not fix
The scan stays red on 19 other pairs. Two are on .env in a stale branch (cursor/docx-spurious-paragraphs-6ea9) and may be real credentials, so they need a rotation review, not an exception. The other 17 look like test fixtures, placeholders, Secret Manager names and hashes, and need an owner decision before any exception is added.
Rollout
After this lands, platform's secret-scan.yml pin moves to the new main commit in its own PR.
Risk and rollback
Two-way door. Scan configuration only. Revert the commit to roll back.
No actionable comments were generated in the recent review.
Walkthrough
The workflow adds a Gitleaks allowlist for a Slack webhook finding in one repository, restricted to specified commits and a file path. A test verifies that the scanner still reports a synthetic finding for that rule.
Changes: Scoped Gitleaks exception
Layer / File(s)
Summary
Scoped exception and scan test .github/workflows/gitleaks.yml, tests/test_secret_scan.py
The workflow limits the exception to one repository, the slack-webhook-url rule, five commits and backend/app/api/routes/auth.py. The test checks that a synthetic finding is reported with result 10 and that rule ID.
60xAI/.github#9: It adds a caller-scoped exception for the same rule and file path using the same Gitleaks allowlist mechanism.
Suggested reviewers:fergus-mw
Merge Risk: Minimal · up to 950ad
The change adds a narrowly scoped secret-scan exception for one reviewed webhook and keeps new findings on the same path blocked. No actionable merge-blocking risk was found, and rollback is a configuration revert.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: a security fix that accepts the reviewed platform sign-in webhook, scoped by commit and path. The raw summary confirms a Gitleaks allowlist for the Slack webhook rule,…
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.
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check
Explanation
The title names the main change: a security fix that accepts the reviewed platform sign-in webhook, scoped by commit and path. The raw summary confirms a Gitleaks allowlist for the Slack webhook rule, limited to five commits and backend/app/api/routes/auth.py, plus a test that checks the exception covers only those commits. The title is specific and matches the changeset. The conventional-commit prefix is acceptable.
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: 4aa6a3a4-bc7b-441f-88f0-cad3e8095e92
Commits
Reviewing files that changed from the base of the PR and between b07fd2d and 950ad50.
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 (run https://github.com/60xAI/ai-brain-platform/actions/runs/43804138912). One of its 20 path/rule pairs is the sign-in Slack webhook in
backend/app/api/routes/auth.py, ruleslack-webhook-url. The code owner reviewed it and decided to keep it (https://github.com/60xAI/ai-brain-platform/issues/1601). The same webhook in pipelines history was handled in #9.Fix
60xAI/ai-brain-platform. It matches rule, path and exact commit together.development:3757fbb3,43c569cf,9799135e,b83bddef,dd8da03b.[[allowlists]]withtargetRules, like the pipelines block, not a second[[rules]]block (see Secret scan: a second generic-api-key rule block silently drops the first block's exceptions for the workspace #8).Verification
FULL_HISTORY=true,REPOSITORY=60xAI/ai-brain-platform):main(b07fd2dd):result=10, 20 path/rule pairs, includingslack-webhook-url backend/app/api/routes/auth.py;result=10, the same pairs minus the webhook pair (19).test_platform_webhook_exception_only_covers_its_own_commitscommits a synthetic, unissued webhook on the excepted path in a new commit and requires the scan to block it. With thecommitsbinding removed, it fails; with the binding, it passes.python3 -m unittest discover -s tests: 10 tests OK.What this does not fix
The scan stays red on 19 other pairs. Two are on
.envin a stale branch (cursor/docx-spurious-paragraphs-6ea9) and may be real credentials, so they need a rotation review, not an exception. The other 17 look like test fixtures, placeholders, Secret Manager names and hashes, and need an owner decision before any exception is added.Rollout
After this lands, platform's
secret-scan.ymlpin moves to the newmaincommit in its own PR.Risk and rollback
Two-way door. Scan configuration only. Revert the commit to roll back.