Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
ci: scope Smoke timeouts to trufflehog runs, not the build (#5317)
Bryan Beverlya25ff851410b
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.ymlindex 046be291d..907869be5 100644--- a/.github/workflows/lint.yml+++ b/.github/workflows/lint.yml@@ -60,5 +60,10 @@ jobs:- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6with:go-version: "1.27"+ # hack/checksecretparts only needs the standard library, so this job+ # finishes before any other and would otherwise claim the shared+ # go.sum-keyed cache with an empty module cache. Cache keys are+ # write-once, so that starves every later job on the branch.+ cache: false- name: Run checksecretpartsrun: go run ./hack/checksecretparts -fail ./pkg/detectorsdiff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.ymlindex 79c112b3e..2e483605c 100644--- a/.github/workflows/smoke.yml+++ b/.github/workflows/smoke.yml@@ -3,9 +3,13 @@ name: Smokeon:pull_request:+permissions:+ contents: read+jobs:smoke:runs-on: ubuntu-latest+ timeout-minutes: 15steps:- name: Checkout codeuses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6@@ -13,14 +17,17 @@ jobs:uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6with:go-version: "1.27"+ - name: Build+ run: go build -o "$RUNNER_TEMP/trufflehog" .- name: Smoke+ timeout-minutes: 10run: |set -e- go run . git https://github.com/dustin-decker/secretsandstuff.git > /dev/null- go run . github --repo https://github.com/dustin-decker/secretsandstuff.git > /dev/null+ "$RUNNER_TEMP/trufflehog" git https://github.com/dustin-decker/secretsandstuff.git > /dev/null+ "$RUNNER_TEMP/trufflehog" github --repo https://github.com/dustin-decker/secretsandstuff.git > /dev/nullzombies:runs-on: ubuntu-latest- timeout-minutes: 5+ timeout-minutes: 15steps:- name: Checkout codeuses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6@@ -28,12 +35,17 @@ jobs:uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6with:go-version: "1.27"+ - name: Build+ run: go build -o "$RUNNER_TEMP/trufflehog" .+ # The timeout covers only the scans, not the build, so a cold Go cache+ # cannot eat into the budget that detects the #3379 deadlock.- name: Run trufflehog+ timeout-minutes: 5run: |set -e- go run . git --no-verification file://. > /dev/null+ "$RUNNER_TEMP/trufflehog" git --no-verification file://. > /dev/null# This case previously had a deadlock issue and left zombies after trufflehog exited #3379- go run . git --no-verification https://github.com/git-test-fixtures/binary.git > /dev/null+ "$RUNNER_TEMP/trufflehog" git --no-verification https://github.com/git-test-fixtures/binary.git > /dev/null- name: Check for running git processes and zombiesrun: |if pgrep -x "git" > /dev/null