Closed skeweredlogic closed 9 months ago
Since we can't mount to "/", I think an easy fix for this is to define a working directory in the docker command within the action.yml
file.
Ex:
docker run --rm -v "$REPO_PATH":/tmp -w /tmp ....
@zricethezav @codevbus any thoughts on this idea?
docker run --rm -v "$REPO_PATH":/tmp -w /tmp ....
I've seen this in lots of GHAs, I'd say it's a good solution.
@skeweredlogic https://github.com/trufflesecurity/trufflehog/pull/2393 should fix it. Please reopen this issue if the problem persists.
Thank you! will be able to test when #2396 is closed.
Please review the Community Note before submitting
TruffleHog Version
This PR introduced the change: #2138
Trace Output
gist
Expected Behavior
When using the
-x
flag with an ignore file argument, the file path specified should not break when relative to the repo/local filesystem root.Actual Behavior
Because the referenced file was copied into
/tmp
, but the entrypoint runs from/
,trufflehog
cannot find it.Steps to Reproduce
.truffleignore
file used with the-x
flag to ignore specific paths/files.trufflehog
similarly to how it would be done in GHA:docker run --rm -v .:/tmp ghcr.io/trufflesecurity/trufflehog:latest filesystem /tmp --fail --no-update --github-actions -x .truffleignore --trace
.trufflehog
cannot find the file specified.Environment
action.yml
)Additional Context
References
0000