Skip to content

fix(security): audit the orphan-secret-repair test fixture in .secrets.baseline - #17067

Merged
mrveiss merged 3 commits into
mainfrom
fix-secrets-baseline-orphan-repair-test
Sep 18, 2026
Merged

mrveiss merged 3 commits into
mainfrom
fix-secrets-baseline-orphan-repair-test

Conversation

@mrveiss

@mrveiss mrveiss commented Sep 18, 2026 •

Copy link
Copy Markdown
Owner

Thinking Path

Secret Detection (whole tree) fails on any PR whose merge-ref includes autobot-backend/tests/migrations/test_orphan_secret_repair.py (landed via #16927/#15779): detect-secrets flags line 61's secret_type="api_key" keyword-adjacent argument as a potential Secret Keyword finding (confirmed: sha1("api_key") == the flagged hash, not the _PLAINTEXT fixture value), and main's own .secrets.baseline never got an entry for it. Confirmed independently as the root cause of new CI reds on two unrelated open PRs (#16643, #17003) whose synthetic merge-refs both pull in current main.

What Changed

  • .secrets.baseline: added one audited entry (is_secret: false) for the one genuine finding at test_orphan_secret_repair.py:61, hash computed by detect-secrets scan --baseline .secrets.baseline (version 1.5.0, matching CI's pin) against the real file content.

Verification

  • Confirmed the flagged line's value is a hardcoded test fixture, not a real secret, by reading the file directly.
  • Confirmed via git show origin/main:.secrets.baseline that this is the only entry missing for this file (zero prior coverage).
  • Did not run detect-secrets' own full-tree scan as evidence beyond this one targeted entry: a full local rescan surfaced ~1589 additional findings across unrelated i18n locale files that CI's own run (which failed on exactly one line) did not report — almost certainly local-environment divergence (Python 3.10 here vs CI's pinned 3.14), not real gaps. Not fixing those here; scoping this PR to the one confirmed, CI-reproduced finding.
  • CI is the evidence for the fix landing clean.

Single-issue rationale

No open issue tracks this specific baseline gap; it's a one-line infra fix blocking two unrelated PRs, not batchable with either.

Model Used

Claude Sonnet 5

Summary by CodeRabbit

  • Chores
    • Updated secret-scanning records to include a newly detected, unverified finding in the test suite.

…rets.baseline

detect-secrets flags line 61's plaintext= keyword-adjacent test fixture
(_PLAINTEXT = b"orphan-repair-plaintext-must-not-leak", a fake value)
as a potential Secret Keyword finding. main never got a baseline entry
for it when the file landed via #16927/#15779, so Secret Detection
(whole tree) fails on any PR whose merge-ref includes it -- confirmed
independently on #16643 and #17003. Audited as not a secret.
@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Warning

Review limit reached

Next included review available in 57 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: mrveiss/AutoBot-AI/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: e494c92a-f03b-4ecf-9420-20b9759b4d2f

📥 Commits

Reviewing files that changed from the base of the PR and between 6088136 and 40ae9c9.

📒 Files selected for processing (1)
  • .github/workflows/security.yml

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: mrveiss/AutoBot-AI/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 94117830-b36c-4563-8e03-5c159d50a385

📥 Commits

Reviewing files that changed from the base of the PR and between 27acbd1 and 6088136.

📒 Files selected for processing (1)
  • .secrets.baseline

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The .secrets.baseline file adds a Secret Keyword record for test_orphan_secret_repair.py. The record marks the finding as unverified and not a secret.

Changes

Secret baseline update

Layer / File(s) Summary
Add detected keyword record
.secrets.baseline
The baseline records the hashed finding at line 61 with is_verified set to false and is_secret set to false.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 60881

The baseline update should prevent the known false-positive secret-detection failure without changing production behavior.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: auditing the orphan-secret-repair test fixture in .secrets.baseline. It is specific and concise.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Notice: 29 open PRs — past the runaway threshold (25)

There is no PR queue limit, and this is not a request to defer this PR. Work proceeds one issue at a time without a cap on open PRs; review capacity is the constraint.

This notice only means the count is high enough to be worth a glance for a runaway — something opening PRs in a loop, or a merge pipeline that has stalled so nothing is draining.

Currently open:

If the queue is draining normally, ignore this. Otherwise:

  1. Check whether CI is dispatching at all — see the ci-dispatch-watchdog status on these PRs
  2. Merge the ones whose CI has finished and review has passed: gh pr merge <number> --squash --delete-branch
  3. Look for a loop opening near-identical PRs

Warn-only runaway detector — .github/workflows/pr-queue-gate.yml. It never blocks a merge.

…ges too (#17067)

security.yml's pull_request path filter never included .secrets.baseline
itself, so a baseline-only PR (like this one) never ran Secret Detection
(whole tree) -- the one check that proves a baseline fix actually clears
the red it's meant to fix. The secret-detection job is deliberately
ungated once the workflow triggers, so fixing the outer on.pull_request.paths
list is sufficient; no changes-job filter needed. Verified against
pipeline-scripts/check_workflow_path_filters.py.
@github-actions

Copy link
Copy Markdown
Contributor

✅ SSOT Configuration Compliance: Passing

🎉 No new hardcoded values of either class — ssot and other both block.

Known backlog in pipeline-scripts/hardcoded_values_baseline.txt is suppressed and tracked in #14371.

@mrveiss
mrveiss merged commit f3d6677 into main Sep 18, 2026
63 of 70 checks passed
@mrveiss
mrveiss deleted the fix-secrets-baseline-orphan-repair-test branch September 18, 2026 23:17
@mrveiss mrveiss removed the land-next Landing set: CI capacity goes to these PRs first (owner direction 2026-09-18, #15397) label Sep 18, 2026
mrveiss added a commit that referenced this pull request Sep 19, 2026
…er-regression

fix(security): strip the stray line_number field #17067 reintroduced into .secrets.baseline
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