fix(trufflehog): scope merge_group scans to diff like pull_request#141
Merged
isaiah-grafana merged 4 commits intomainfrom Mar 30, 2026
Merged
fix(trufflehog): scope merge_group scans to diff like pull_request#141isaiah-grafana merged 4 commits intomainfrom
isaiah-grafana merged 4 commits intomainfrom
Conversation
Merge queue runs use github.event_name merge_group, which previously fell through to trufflehog filesystem . and scanned the entire repo. Fetch merge_group base/head SHAs and git diff --name-only to match PR behavior. Made-with: Cursor
This comment has been minimized.
This comment has been minimized.
…shell)
Zizmor flags `${{ }}` inside run: scripts as code injection via template
expansion. Use step env for PR and merge_group SHAs and reference them as
quoted shell variables.
Made-with: Cursor
… checks Rulesets run the workflow from the PR; point uses: at this branch so TruffleHog exercises reusable-trufflehog from the same ref. Revert to @main when merging. Made-with: Cursor
Made-with: Cursor
ezebunandu
reviewed
Mar 30, 2026
| fi | ||
| else | ||
| # Push to main: Scan current filesystem | ||
| # push to main (and any other events): full filesystem scan |
Contributor
There was a problem hiding this comment.
In what context do we expect a push to main or other events that would trigger a full filesystem scan?
Contributor
Author
There was a problem hiding this comment.
Good question. In practice that path is almost always push to main from the org workflow. There’s no PR/merge-group payload on that event, so it hits the else and does a full scan. The “other events” line is just a generic fallback if this reusable ever gets called another way; we don’t rely on anything else today.
ezebunandu
approved these changes
Mar 30, 2026
Contributor
ezebunandu
left a comment
There was a problem hiding this comment.
LGTM. Looks one branch of the logic will still trigger a full filesystem scan. Is that assuming that somehow, we can push directly to main without opening a PR?
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Merge queue runs use github.event_name merge_group, which previously fell through to trufflehog filesystem . and scanned the entire repo. Fetch merge_group base/head SHAs and git diff --name-only to match PR behavior.