Removing hardcoded options in GHA docker run and providing output configuration #4068
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:
When using the
trufflesecurity/trufflehog
Github Action, there's currently no way to configure--fail
, in the Github action itself, as it is hardcoded inaction.yml
here.Additionally, it's helpful to be able to take the very useful output of trufflehog and process it in our own actions so we can aggregate the data to our observability tools. To enable this, this PR also provides an
output
block that enables developers to reference Trufflehog output in their actions via${{ steps.trufflehog.outputs.results }}
This way, developers can run the github action like so:
Update: This PR now also includes a more explicit mounting of
${{ github.workspace }}
to the docker container, as before the relative path being mounted to/tmp
wouldn't pick up any changes when providing commit ranges to the scan.Checklist:
make test-community
)?make lint
this requires golangci-lint)?