feat(action): add image input to allow registry mirror overrides - #4965
Conversation
|
Hey, @mustansir14 @kashifkhan0771 @MuneebUllahKhan222 anything else needed here? We have this as a real need. |
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.
@kashifkhan0771 who else should I ping to get required approval? |
Hi @eightseventhreethree, We just need an approval from |
|
Can we apply @gugacyber's suggestion:
|
|
|
@camgunz let me know what else you need from me to get this merged. ty. |
|
@camgunz is there someone else I need to reach out to about getting this merged? |
|
@shahzadhaider1 Thank you! |
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
Optional input with the same default image path; only affects which Docker registry is used for the scan container.
Overview
Adds an optional
imageinput to the TruffleHog GitHub Action so workflows can pull the scanner from a registry mirror instead of the defaultghcr.io/trufflesecurity/trufflehog. Default behavior is unchanged whenimageis omitted.The composite action passes
imageinto the run step and uses"${IMAGE}:${VERSION}"fordocker runinstead of a hardcoded registry path. README documents the new input alongside the existingversionoption.Reviewed by Cursor Bugbot for commit eaab27e. Bugbot is set up for automated code reviews on this repo. Configure here.