feat(action): add image input to allow registry mirror overrides#4965
Open
eightseventhreethree wants to merge 2 commits into
Open
Conversation
jamesrhoat-gemini
approved these changes
May 15, 2026
Author
|
Hey, @mustansir14 @kashifkhan0771 @MuneebUllahKhan222 anything else needed here? We have this as a real need. |
kashifkhan0771
approved these changes
May 19, 2026
gugacyber
reviewed
May 20, 2026
gugacyber
left a comment
There was a problem hiding this comment.
The feature is useful and the default behavior is preserved, but line 102 has a shell injection risk: ${IMAGE} is unquoted in the docker run invocation. If a workflow passes image: "ghcr.io/evil/image --privileged", the extra tokens will be interpreted as additional flags by the shell before docker sees them.
Suggest quoting: "${IMAGE}:${VERSION}" — same fix that should apply to ${VERSION} and ${BASE} on the same line for consistency.
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.
Description:
Adds an optional image input to the TruffleHog GitHub Action, defaulting to
ghcr.io/trufflesecurity/trufflehog. Users in environments that require a registry mirror can override it without any change to default behavior.Checklist:
make lintthis requires golangci-lint)?Note
Low Risk
Low risk: adds an optional input and threads it into the existing
docker runinvocation with a safe default, so behavior is unchanged unless explicitly configured.Overview
Adds an
imageinput to the GitHub Action so users can override the TruffleHog Docker image (e.g., to use a registry mirror) while still selecting the tag via the existingversioninput.Updates the composite action to use
${IMAGE}:${VERSION}instead of a hardcodedghcr.io/trufflesecurity/trufflehog:${VERSION}, and documents the newimageoption in the README.Reviewed by Cursor Bugbot for commit 2c270c7. Bugbot is set up for automated code reviews on this repo. Configure here.