Skip to content

fix(scanner): qualify the exact instructional curl placeholder - #81

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/gitleaks-exact-placeholder
Nov 4, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
fix/gitleaks-exact-placeholder

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Problem

The published scanner reported two historical Echidna documentation examples as curl-auth-header findings. Both contain the exact public instructional value your-key-here. The scanner correctly inspected the full history; changing scan scope or ignoring the path would hide unrelated credentials.

Change

Add one rule-local, whole-secret equality allowance, ^your-key-here$, to the inherited curl-auth-header rule. The upstream detector, full-history defaults, trusted-base policy checks, and ignore-file policy remain active. A durable control runs in the real-scanner self-test lane and verifies the actual detector identity for a synthetic credential and for credential values with the placeholder attached on either side.

The checked-in evidence records the exact scanner/configuration digests and the local qualification scope. It does not claim a hosted consumer result or general security assurance.

Validation

  • Gitleaks 8.30.1: eight before/after controls qualified the exact exception without accepting the three credential cases.
  • The committed helper passes all four same-path controls and requires curl-auth-header for each expected rejection.
  • The existing real-scanner regression suite and inherited detector controls pass, including full-history deleted credentials and trusted PR policy refusal cases.
  • Full, non-shallow Echidna history at 977ce94d9a83b8a3a47f54a67a14d004380fcdfa: 1,364 commits, approximately 1.69 GB, zero findings with the qualified configuration; 33.12 seconds wall time.
  • Bash syntax, actionlint 1.7.12, and git diff --check pass.

Rollout

After this source revision is published on main, repin and run the suite and Echidna consumer canaries at that same published SHA. Compare their actual detector receipts and preserved check contexts before retiring any compatibility workflows. Namespace migration is a separate change.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T18:18:17.704985Z 9200b2e PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Bug Fixes
    • The secret scanner no longer flags the exact your-key-here placeholder in curl authentication headers. Credentials and values with that placeholder as a prefix or suffix are still detected.
  • Tests
    • Added automated checks to verify the placeholder exemption and confirm that synthetic credentials continue to be detected.
  • Documentation
    • Added a record of the scanner’s qualification results and the checks performed.

The Gitleaks baseline now suppresses findings for the exact your-key-here curl placeholder. A control script and workflow step verify that credentials, including values adjoining the placeholder, still produce findings. A JSON record documents scanner qualification and consumer scan evidence.

Changes: Exact-placeholder Gitleaks qualification

Layer / File(s) Summary
Allow the exact placeholder
config/gitleaks/estate-baseline.toml
The provenance comment now identifies the baseline as derived from metadatastician/standards. A rule-specific allowlist matches only the complete extracted secret your-key-here.
Validate scanner results
actions/secret-scan-check/placeholder-control.sh, .github/workflows/secret-scanner-self-test.yml, docs/evidence/2026-11-04-gitleaks-exact-placeholder.json
The control script checks that the exact placeholder produces no finding and that a credential alone or adjoining the placeholder produces a curl-auth-header finding. The workflow runs the control against the estate baseline. The evidence record documents qualification results, consumer scan results and scope limits.

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Bug fix

Possibly related PRs

  • hyperpolymath/cicd-suite#62: Introduced the bounded Gitleaks scanner, estate baseline and real-scanner self-test workflow that this change extends.
  • hyperpolymath/cicd-suite#65: Audits published scanner revisions against consumer snapshots; this change updates the baseline used in those audits.
  • hyperpolymath/cicd-suite#64: Repairs the production caller pin to the published reusable scanner; this change updates the scanner implementation consumed by callers.
Merge Risk: Minimal · up to 9200b

The change stops the scanner from flagging the exact instructional placeholder your-key-here in curl examples. Real credentials, including values attached to the placeholder, are still reported, and a new self-test checks this. No actionable merge-blocking risk was found. The rollout plan still calls for consumer canaries at the published SHA after merge.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely summarises the main change: qualifying the exact instructional curl placeholder in the scanner.
Description check Passed The description directly explains the scanner issue, configuration change, validation, evidence, and rollout plan. It is related to the changeset.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (3 skipped: 3 unsupported.)

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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
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: ASSERTIVE
  • Plan: Advanced
  • Run ID: 2c53e95b-20d1-41cc-9b4a-8b7c3a66ddd4
Commits

Reviewing files that changed from the base of the PR and between a45e5d0 and 9200b2e.

Files selected for processing: 4
  • .github/workflows/secret-scanner-self-test.yml
  • actions/secret-scan-check/placeholder-control.sh
  • config/gitleaks/estate-baseline.toml
  • docs/evidence/2026-11-04-gitleaks-exact-placeholder.json

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

Recent review details
Context from checks skipped due to timeout: 1
  • GitHub Check: CodeRabbit
Additional context used
GitHub Check: SonarCloud Code Analysis
actions/secret-scan-check/placeholder-control.sh

[failure] 13-13: Add a default case (*) to handle unexpected values.

See more on https://sonarcloud.io/project/issues?id=hyperpolymath_cicd-suite&issues=AaGnxzQ_T4wGGiSvTsVz&open=AaGnxzQ_T4wGGiSvTsVz&pullRequest=81

Additional comments: 3
actions/secret-scan-check/placeholder-control.sh: 1

1-40: LGTM!

.github/workflows/secret-scanner-self-test.yml: 1

54-57: LGTM!

docs/evidence/2026-11-04-gitleaks-exact-placeholder.json: 1

1-132: LGTM!

@sonarqubecloud

sonarqubecloud Bot commented Nov 4, 2026

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit 8d94c37 into main Nov 4, 2026
16 checks passed
@hyperpolymath
hyperpolymath deleted the fix/gitleaks-exact-placeholder branch November 4, 2026 18:25
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