Skip to content

Commit 56cc744

Browse files
authored
fix: let the secret scan run for Dependabot (#385)
Closes #383. `betterleaks` is a required status check, and the job excluded Dependabot by actor name: ```yaml github.actor != 'dependabot[bot]' ``` A required check that never reports does not merely go unreported — it blocks the merge. Asked directly rather than read off `mergeStateStatus`, the merge API says so in one line: ``` Repository rule violations found Required status check "betterleaks" is expected. ``` So **every Dependabot pull request in every consumer of this repository was unmergeable by construction**, with `--admin` the only way through — which is precisely what a required check exists to prevent. Observed on `netresearch/t3x-nr-browser-ai#51` and `netresearch/t3x-nr-passkeys-be#120`; on a human-authored pull request in the same repository minutes later, both `betterleaks` and `gitleaks / Secret Scanning` report SUCCESS. ## Why removing the filter is safe The exclusion was not compensating for anything. The job's permissions are `contents: read` and `security-events: write`, and it reads no `secrets.*` — so the usual reason to skip bot pull requests (no access to repository secrets) does not apply here. `git log -S` places the line in the initial org-wide workflow commit of 31 March, alongside everything else, rather than in a change made in response to a problem. The result is that bot dependency updates get scanned rather than waived. That is strictly more coverage than today, not less. ## What this does not decide Every repository checked runs **both** Dependabot and Renovate, and their `dependabot.yml` covers `composer` and `github-actions` — both of which Renovate also covers. In `t3x-nr-vault`, Renovate opened 5 of the last 60 pull requests and Dependabot 0. So Dependabot may be redundant in the repositories that have both, and retiring it there would remove this class of problem rather than fix it. That is a separate decision, and it is not uniform: `netresearch/timetracker` has no `renovate.json` at all, so Dependabot is its only updater. This change helps that case either way.
2 parents 46098f1 + b89dd03 commit 56cc744

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/gitleaks.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,14 @@ jobs:
3434
name: Secret Scanning
3535
runs-on: ubuntu-latest
3636
timeout-minutes: 10
37+
# Deliberately no actor filter. betterleaks is a required status check, and a
38+
# required check that never reports blocks the merge -- excluding Dependabot
39+
# here made every one of its pull requests unmergeable by construction
40+
# (netresearch/.github#383). The job needs no secrets, so nothing stops it
41+
# from running for a bot.
3742
if: >-
3843
!inputs.skip &&
39-
github.event_name != 'merge_group' &&
40-
github.actor != 'dependabot[bot]'
44+
github.event_name != 'merge_group'
4145
permissions:
4246
contents: read
4347
security-events: write

0 commit comments

Comments
 (0)