Skip to content

fix(trufflehog): do not upload raw secrets in workflow artifacts#169

Merged
isaiah-grafana merged 7 commits into
mainfrom
fix/trufflehog-artifact-no-secrets
May 29, 2026
Merged

fix(trufflehog): do not upload raw secrets in workflow artifacts#169
isaiah-grafana merged 7 commits into
mainfrom
fix/trufflehog-artifact-no-secrets

Conversation

@isaiah-grafana
Copy link
Copy Markdown
Contributor

@isaiah-grafana isaiah-grafana commented May 26, 2026

Summary

  • Strips Raw, RawV2, Redacted, and non-safe ExtraData from TruffleHog output before artifact upload.
  • Artifacts and Grafana Bench use results-sanitized.json only; full results.json is deleted after PR comments/report generation.

Fixes trufflehog_scan artifacts exposing secret material on public repos.

Test plan

  • Run TruffleHog on a test PR and download trufflehog_scan artifact — no results.json, no Raw in results-sanitized.json
  • Confirm bench metrics job still succeeds on a grafana org repo
  • Confirm PR comments still show masked findings

Strip Raw/RawV2/Redacted and unsafe ExtraData before upload. Bench and
artifacts use results-sanitized.json only. Addresses public-repo artifact
download exposing trufflehog findings with secret material.
@isaiah-grafana isaiah-grafana requested a review from a team as a code owner May 26, 2026 20:26
@github-actions
Copy link
Copy Markdown

Semgrep Findings

1 finding(s) detected.

Severity Rule File Message
🔵 LOW deny-actions-create-github-app-token .github/workflows/periodic-zizmor.yaml:51 Do not use actions/create-github-app-token. Use the organization's approved alternative for generating GitHub App tokens.

isaiah-grafana and others added 5 commits May 28, 2026 09:42
…flow

The ruleset test path referenced fix/trufflehog-artifcat-no-secrets, which
does not exist; use fix/trufflehog-artifact-no-secrets so required checks start.

Co-authored-by: Cursor <cursoragent@cursor.com>
The feature-branch ref was only for ruleset testing; org-required should
call reusable-trufflehog @main once sanitize lands on main.
@isaiah-grafana isaiah-grafana merged commit 796b732 into main May 29, 2026
15 checks passed
@isaiah-grafana isaiah-grafana deleted the fix/trufflehog-artifact-no-secrets branch May 29, 2026 14:28
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.

2 participants