Actions(trufflehog): Fix for external PRs (#108215)

This commit is contained in:
Mariell Hoversholm
2025-07-17 10:16:19 +00:00
committed by GitHub
parent f7891a27d2
commit aa169a123e
+6 -4
View File
@@ -21,15 +21,17 @@ jobs:
contents: read # clone the repo
steps:
- name: Calculate fetch depth
id: fetch_depth
shell: bash
run: echo "fetch_depth=$(( ${{ github.event.pull_request.commits }} + 2 ))" >> "$GITHUB_OUTPUT"
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
ref: ${{ github.head_ref }}
fetch-depth: ${{ steps.fetch_depth.outputs.fetch_depth }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Trufflehog
uses: trufflesecurity/trufflehog@eafb8c5f6a06175141c27f17bcc17941853d0047 # v3.90.0
with:
base: ${{ github.event.pull_request.base.sha }}
head: ${{ github.event.pull_request.head.sha }}
extra_args: --results=verified