Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/gitleaks-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@
# uses: roleme/workflows/.github/workflows/gitleaks-reusable.yml@<sha>
#
# fetch-depth: 0 lets gitleaks scan full history, not just the tip.
# PR commenting is disabled so the job needs only contents: read — otherwise
# gitleaks-action tries to POST a PR comment and fails on pull_request events
# with "Resource not accessible by integration" unless granted
# pull-requests: write. The job summary still surfaces any findings.
# PR commenting is disabled (GITLEAKS_ENABLE_COMMENTS=false) so we don't need
# pull-requests: write. But on pull_request events gitleaks-action still calls
# GET /pulls/{n}/commits to scan only the PR's commits, which needs
# pull-requests: read — without it the run fails "Resource not accessible by
# integration". Findings surface via the job summary + SARIF artifact.
name: gitleaks (reusable)

on:
workflow_call: {}

permissions:
contents: read
pull-requests: read

jobs:
scan:
Expand Down