Skip to content

chore: exclude synthetic conformance fixtures from secret scanning - #7884

Closed
carles-grafana wants to merge 1 commit into
grafana:mainfrom
carles-grafana:fix/secret-scanning-conformance-fixtures
Closed

carles-grafana wants to merge 1 commit into
grafana:mainfrom
carles-grafana:fix/secret-scanning-conformance-fixtures

Conversation

@carles-grafana

Copy link
Copy Markdown
Contributor

What this PR does

Follow up on #7881 with two exact-path exclusions for fixtures in the pending secret-detection feature:

  • tools/secrets-conformance/testdata/legacy.json: a corpus explicitly marked scope: synthetic, containing provider-format test values and public examples.
  • tools/secrets-conformance/synthetic_audit_test.go: includes the synthetic manually assigned GitLab registration token in TestManuallyAssignedGitLabRegistrationToken; the test documents that the value is never submitted.

GitHub push protection still blocks the feature commit on these two files after the catalog exclusion. The displayed findings identify Slack, webhook, Stripe, and GitLab fixture values. This change excludes only those two files, not the conformance directory or all Go tests. Production code remains covered.

Verification and limitations

  • Reviewed both files in the feature branch for fixture context.
  • Parsed the configuration as YAML and checked that all five locations in the latest rejection match an exclusion.
  • Checked that neighboring conformance source files, other fixture files, and production paths remain outside the exclusions.
  • GitHub still hides 11 additional detections. Their paths are not available, so this PR does not claim to resolve every remaining rejection.
  • No application behavior changed; application tests were not run. The feature push was not retried.

As with #7881, merge this configuration into the default branch first. Forks receiving the feature push must also sync the configuration to their own default branch.

Add exact-path exclusions for the synthetic legacy corpus and the audit test containing a never-submitted GitLab registration token. These files were still blocked after the catalog exclusion; keep all other conformance files and production code covered.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The configuration changes are narrowly scoped and have no unresolved review issues.

Pull request overview

Adds narrowly scoped secret-scanning exclusions for synthetic conformance fixtures while keeping production paths covered.

Changes:

  • Excludes the synthetic legacy corpus.
  • Excludes the synthetic audit test.
  • Retains scanning for other paths.
File summaries
File Summary
.github/secret_scanning.yml Adds two exact-path fixture exclusions.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@carles-grafana

Copy link
Copy Markdown
Contributor Author

The secret-detection feature is being amended to remove tools/secrets-conformance and tools/secrets-benchmark. These two conformance fixture files will no longer be included, so their additional secret-scanning exclusions are no longer needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants