Trufflehog with circleci

Viewed 86

I am trying to integrate Trufflehog with circleci for secret scanning on each PR. I have used a docker image with Trufflehog-3.6.11 binary installed. My circleci config is as follows.

scan_trufflehog:
    docker:
      - image: gcr.io/********/trufflehog:3.6.11
        auth:
          username: ********
          password: ********
    steps:
      - checkout
      - run: 
          command: |
            trufflehog filesystem --directory=. --debug -j

The job fails with error:

{"level":"debug","msg":"running version 3.6.11","time":"2022-07-28T12:40:02Z"}
2022/07/28 12:40:02 [updater parent] run
{"error":"cannot move binary (exit status 1)","level":"fatal","msg":"error occured with trufflehog updater ","time":"2022-07-28T12:40:02Z"}

Exited with code exit status 1

I get the same error if I use git/github options instead of filesystem. Any suggestions where I might be going wrong?

1 Answers

Run it with --no-update, that worked with me. I ran a docker image on docker desktop and I had the same error as you until I added that extra flag.

trufflehog github --no-update --repo=https://github.com/trufflesecurity/test_keys.git
Related