Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
pr-approval-check: use separate workflow to check approvals (#4530)
j2fwcff9dd2945d8
diff --git a/.github/workflows/pr-approval-check.yml b/.github/workflows/pr-approval-check.ymlindex b0de0729e..9fdfd3e6b 100644--- a/.github/workflows/pr-approval-check.yml+++ b/.github/workflows/pr-approval-check.yml@@ -1,26 +1,45 @@name: PR Approval Checkon:- pull_request_review:- types: [submitted, dismissed]- pull_request_target:- types: [opened, reopened, synchronize]+ workflow_run:+ workflows: ["Receive PR"]+ types: ["completed"]++permissions:+ actions: readjobs:approval:- runs-on: ubuntu-latest+ runs-on: ubuntu-slimsteps:+ - name: Download artifact from triggering run+ uses: actions/download-artifact@v6+ with:+ run-id: ${{ github.event.workflow_run.id }}+ name: prnum+ github-token: ${{ github.token }}++ - name: Read inputs+ id: get-prnum+ run: |+ set -euo pipefail+ echo "prnum=$(cat prnum.txt)" >> "$GITHUB_OUTPUT"+- name: Mint installation tokenid: app-token- uses: actions/create-github-app-token@v2+ uses: actions/[email protected]with:app-id: ${{ secrets.PR_APPROVAL_CHECK_APP_ID }}private-key: ${{ secrets.PR_APPROVAL_CHECK }}- name: Require Product Eng approval- uses: trufflesecurity/pr-approval-check@v1+ uses: trufflesecurity/pr-approval-check@workflow-triggeredwith:org: trufflesecurityapprover_team: product-eng+ owner: ${{ github.event.workflow_run.repository.owner.login }}+ repo: ${{ github.event.workflow_run.repository.name }}+ head: ${{ github.event.workflow_run.head_sha }}+ number: ${{ steps.get-prnum.outputs.prnum }}github_token: ${{ steps.app-token.outputs.token }}diff --git a/.github/workflows/receive-pr.yml b/.github/workflows/receive-pr.ymlnew file mode 100644index 000000000..00127f8d7--- /dev/null+++ b/.github/workflows/receive-pr.yml@@ -0,0 +1,25 @@+name: "Receive PR"++on:+ pull_request_target:+ types: [opened, synchronize, reopened, ready_for_review]+ pull_request_review:+ types: [submitted, edited, dismissed]++jobs:+ prnum:+ runs-on: ubuntu-slim+ steps:+ - name: Determine PR Number+ id: build+ run: |+ echo "PR: ${{ github.event.pull_request.number }}"+ echo "${{ github.event.pull_request.number }}" > prnum.txt++ - name: Submit+ uses: actions/upload-artifact@v5+ with:+ name: prnum+ path: prnum.txt+ retention-days: 1+