Fix trufflehog-extra-args exclude-globs silently ignored - #10
Merged
Conversation
The upstream trufflehog action appends extra_args via unquoted
${ARGS:-''} in its entrypoint script, so quotes in the value are never
stripped by the shell -- they survive as literal characters glued onto
the first and last glob in a quoted comma-separated list, breaking
just those two while the middle ones keep working. Reproduced locally
by mimicking the action's exact append. Drop the quotes; none are
needed since the list has no spaces to protect.
gpmayorga
marked this pull request as ready for review
July 17, 2026 00:36
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.
What
app-ci-checks.yml'strufflehog-extra-argsdefault wrapped its comma-separated--exclude-globslist in double quotes:--exclude-globs "**/dist/**,**/build/**" ....Why this was broken
The upstream
trufflesecurity/trufflehogaction appendsextra_argsvia unquoted${ARGS:-''}in its own entrypoint script:docker run ... git file:///tmp/ --since-commit ... --branch ... --fail --no-update --github-actions ${ARGS:-''}Bash only strips quote characters when it parses them as syntax in the original script
text — not when they're embedded inside a variable's runtime value. Since
${ARGS}here isunquoted, bash performs word-splitting/globbing on the expansion but never removes the quote
characters that are part of the string. Reproduced locally:
The literal
"characters land on the first and last glob in the list ("**/dist/**and
**/build/**"here), corrupting exactly those two patterns — trufflehog never matchesthem against real paths, so they silently stop excluding anything. Middle entries in a
longer list (e.g. apps-invest's override, which puts
.env-config/**last) are equallycorrupted; this is exactly what caused apps-invest#268's
secrets-scanto flagVITE_INFURA_KEYin.env-config/*even though that path was supposedly excluded.Fix
Drop the wrapping quotes. They were never doing anything useful — the list has no spaces to
protect from word-splitting — and they actively corrupt the boundary globs. Companion fix
already pushed to apps-invest's own caller override (same bug, same root cause).
Verification
yamllint -d "{extends: relaxed, rules: {line-length: disable}}"clean (matcheslib-ci's config).🤖 Generated with Claude Code
Generated by Claude Code