mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-04 19:21:51 +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@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
|
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
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@37b77001d0174ebec2fcca2bd83ff83a6d45a3ab # v3.95.3
|
|
with:
|
|
extra_args: --results=verified,unknown
|