-
Notifications
You must be signed in to change notification settings - Fork 53
49 lines (43 loc) · 1.66 KB
/
Copy pathsecret-scan.yml
File metadata and controls
49 lines (43 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# SPDX-FileCopyrightText: Copyright (c) NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
name: secret-scan
on:
push:
branches: [main, 'release-**']
pull_request:
branches: [main, 'release-**']
merge_group:
types: [checks_requested]
workflow_dispatch:
permissions:
actions: read
contents: read
pull-requests: write
concurrency:
group: secret-scan-${{ github.ref }}
cancel-in-progress: true
jobs:
trufflehog-secret-scan:
name: Secret Scan with TruffleHog
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run TruffleHog Scan
# No repository secrets or custom env vars are required; PR comments are disabled.
uses: dsx-ai-factory/dsx-github-actions/.github/actions/trufflehog-scan@9a9ce3a7770a8b53d2726afa920be3276bc3ddd7
with:
# On merge_group there is no push/PR context for TruffleHog to derive a
# diff range from, so it errors with "BASE == HEAD" and fails the gate,
# blocking the merge queue. Pass the merge queue's base..head range
# explicitly. push and pull_request events keep the empty defaults so
# the action uses its own event-based range.
base: ${{ github.event_name == 'merge_group' && github.event.merge_group.base_sha || '' }}
head: ${{ github.event_name == 'merge_group' && github.event.merge_group.head_sha || '' }}
extra-args: '--results=verified,unknown'
post-pr-comment: 'false'
fail-on-findings: 'true'
version: '3.95.2'