mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-04 02:04:06 +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@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
|
|
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@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
|
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@4dd8831c5f12599465d4d45c3c447b4018a34c85 # v3.97.9
|
|
with:
|
|
extra_args: --results=verified,unknown
|