Skip to content

feat(action): add image input to allow registry mirror overrides#4965

Open
eightseventhreethree wants to merge 2 commits into
trufflesecurity:mainfrom
eightseventhreethree:rs/feat-add-gha-image-override-input
Open

feat(action): add image input to allow registry mirror overrides#4965
eightseventhreethree wants to merge 2 commits into
trufflesecurity:mainfrom
eightseventhreethree:rs/feat-add-gha-image-override-input

Conversation

@eightseventhreethree
Copy link
Copy Markdown

@eightseventhreethree eightseventhreethree commented May 15, 2026

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:


Note

Low Risk
Low risk: adds an optional input and threads it into the existing docker run invocation with a safe default, so behavior is unchanged unless explicitly configured.

Overview
Adds an image input 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 existing version input.

Updates the composite action to use ${IMAGE}:${VERSION} instead of a hardcoded ghcr.io/trufflesecurity/trufflehog:${VERSION}, and documents the new image option in the README.

Reviewed by Cursor Bugbot for commit 2c270c7. Bugbot is set up for automated code reviews on this repo. Configure here.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 15, 2026

CLA assistant check
All committers have signed the CLA.

@eightseventhreethree
Copy link
Copy Markdown
Author

Hey, @mustansir14 @kashifkhan0771 @MuneebUllahKhan222 anything else needed here? We have this as a real need.

Copy link
Copy Markdown

@gugacyber gugacyber left a comment

Choose a reason for hiding this comment

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

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.

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.

5 participants