Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trufflehog:ignore - buildkite - gh action #3976

Open
sean-simmons-progress opened this issue Mar 13, 2025 · 0 comments
Open

trufflehog:ignore - buildkite - gh action #3976

sean-simmons-progress opened this issue Mar 13, 2025 · 0 comments
Labels

Comments

@sean-simmons-progress
Copy link

sean-simmons-progress commented Mar 13, 2025

Please review the Community Note before submitting

TruffleHog Version

Status: Downloaded newer image for ghcr.io/trufflesecurity/trufflehog:latest
gh action: trufflehog 3.88.15

Trace Output

https://gist.github.com/sean-simmons-progress/d62a2103910865f54fd3c1f399d32641

Expected Behavior

With the tufflehog:ignore set on any line, it should skip that line correct?

Actual Behavior

It fails the PR because its claiming that the secret is unverified. Its not even a secret, this is a git commit sha thats used to checkout a specific version of a plugin:

EX:

  - foo-bar:
      valuebool: true
      fileDefinitio: .pathtoFile.yml
      env:
        - PLUGIN_TOOL: e5637ca1ed34a227eba86ae30761010f308b2d1b

even when setting the ignore value, it still fails:

  - foo-bar:
      valuebool: true
      fileDefinitio: .pathtoFile.yml
      env:
        - PLUGIN_TOOL: e5637ca1ed34a227eba86ae30761010f308b2d1b #tufflehog:ignore 

https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/about-commits#about-commits

Steps to Reproduce

Setup a trufflehog action
add a line on any file that allows lines with #tufflehog:ignore - that contains a test secret
commit it back to source
open a PR
run the action against the PR.

it should fail the PR.

Additional Context

in order to fix this I have to pass a: --exclude-detectors="Buildkite" in the extra_args:

name: trufflehog secret scan
on:
  workflow_dispatch:
  pull_request:
    branches: [ main ]

jobs:
  TruffleHog:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
      
      - name: TruffleHog secret scan
        uses: trufflesecurity/trufflehog@main
        with:
          path: ./
          extra_args: --log-level=5 --exclude-detectors="Buildkite"
        continue-on-error: false

References

  • #0000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant