mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 21:11:53 +00:00
51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
name: 'Tools: TruffleHog'
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
- 'v5.*'
|
|
pull_request:
|
|
branches:
|
|
- 'master'
|
|
- 'v5.*'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
scan-secrets:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
|
|
with:
|
|
# We can't block as Trufflehog needs to verify secrets against vendors
|
|
egress-policy: audit
|
|
allowed-endpoints: >
|
|
github.com:443
|
|
ghcr.io:443
|
|
pkg-containers.githubusercontent.com:443
|
|
www.formbucket.com:443
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
# PRs only need the diff range; push to master/release walks the new range from event.before.
|
|
# 50 is enough headroom for the longest realistic PR/push chain without paying for a full clone.
|
|
fetch-depth: 50
|
|
persist-credentials: false
|
|
|
|
- name: Scan diff for secrets with TruffleHog
|
|
# Action auto-injects --since-commit/--branch from event payload; passing them in extra_args produces duplicate flags.
|
|
uses: trufflesecurity/trufflehog@27b0417c16317ca9a472a9a8092acce143b49c55 # v3.95.9
|
|
with:
|
|
extra_args: --results=verified,unknown
|