Skip to content

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

Merged
shahzadhaider1 merged 7 commits into
trufflesecurity:mainfrom
eightseventhreethree:rs/feat-add-gha-image-override-input
Jul 8, 2026
Merged

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

Conversation

@eightseventhreethree

@eightseventhreethree eightseventhreethree commented May 15, 2026

Copy link
Copy Markdown
Contributor

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
Optional input with the same default image path; only affects which Docker registry is used for the scan container.

Overview
Adds an optional image input to the TruffleHog GitHub Action so workflows can pull the scanner from a registry mirror instead of the default ghcr.io/trufflesecurity/trufflehog. Default behavior is unchanged when image is omitted.

The composite action passes image into the run step and uses "${IMAGE}:${VERSION}" for docker run instead of a hardcoded registry path. README documents the new input alongside the existing version option.

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

@CLAassistant

CLAassistant commented May 15, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@eightseventhreethree

Copy link
Copy Markdown
Contributor Author

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

@gugacyber gugacyber left a comment

Copy link
Copy Markdown

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.

@eightseventhreethree

eightseventhreethree commented May 30, 2026

Copy link
Copy Markdown
Contributor Author

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

@kashifkhan0771 who else should I ping to get required approval?

@kashifkhan0771 kashifkhan0771 added the review/product-eng Team integrations reviewed, awaiting product-eng review label Jun 1, 2026
@MuneebUllahKhan222

Copy link
Copy Markdown
Contributor

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

@kashifkhan0771 who else should I ping to get required approval?

Hi @eightseventhreethree, We just need an approval from product-eng once they approve it we can go ahead with merging this PR.

@camgunz

camgunz commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Can we apply @gugacyber's suggestion:

Suggest quoting: "${IMAGE}:${VERSION}" — same fix that should apply to ${VERSION} and ${BASE} on the same line for consistency.

@eightseventhreethree
eightseventhreethree requested a review from a team as a code owner June 3, 2026 18:08
@eightseventhreethree
eightseventhreethree requested a review from a team June 3, 2026 18:08
@eightseventhreethree

eightseventhreethree commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

Can we apply @gugacyber's suggestion:

Suggest quoting: "${IMAGE}:${VERSION}" — same fix that should apply to ${VERSION} and ${BASE} on the same line for consistency.

@camgunz done here

@eightseventhreethree

Copy link
Copy Markdown
Contributor Author

@camgunz let me know what else you need from me to get this merged. ty.

@eightseventhreethree

Copy link
Copy Markdown
Contributor Author

@camgunz is there someone else I need to reach out to about getting this merged?

@shahzadhaider1
shahzadhaider1 merged commit f845f18 into trufflesecurity:main Jul 8, 2026
16 checks passed
@eightseventhreethree

Copy link
Copy Markdown
Contributor Author

@shahzadhaider1 Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review/product-eng Team integrations reviewed, awaiting product-eng review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants