Repository navigation
ci: let Dependabot label all its pull requests - #776
Conversation
Set the organisation's label `type: dependencies` on every Dependabot entry, so that its pull requests no longer get Dependabot's own labels. Remove `target-branch` from every entry: it names the default branch anyway, and while it is set, GitHub doesn't apply an entry's options, labels included, to security updates. The `ignore` rules now also apply to security updates, as intended. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewer's GuideConfigurationAdd the organisation’s dependency label to every Dependabot update entry and remove the default-branch target so the entry options also apply to security updates.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #776 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 74 74
Lines 9651 9651
=========================================
Hits 9651 9651
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Linked issuesChecked at commit 1e1c624 #775 ci: let Dependabot label all its pull requests · 3 of 4 met · 1 to check by hand
|
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".github/dependabot.yml" line_range="25" />
<code_context>
- /docker/requirements
- /examples/petstore
- /examples/gateway
- target-branch: dev
schedule:
interval: weekly
</code_context>
<issue_to_address>
**Security fixes stay blocked**
When a security advisory’s patched version requires an ignored major or minor update, an attacker can exploit a vulnerable dependency when its advisory’s patched version falls in an ignored major/minor range: Dependabot now applies these `ignore` rules to security updates and opens no remediation PR, so the vulnerable version remains in use.
Keep security fixes eligible despite version-update holds, or add an explicit process to surface and remediate advisories for dependencies covered by these ignores.
Also at `.github/dependabot.yml:69`, `.github/dependabot.yml:106`.
</issue_to_address>
### Comment 2
<location path=".github/dependabot.yml" line_range="25" />
<code_context>
- /docker/requirements
- /examples/petstore
- /examples/gateway
- target-branch: dev
schedule:
interval: weekly
</code_context>
<issue_to_address>
**Dependency updates bypass development checks**
When dependabot opens a version-update PR, dependabot targets `main` instead of `dev`, while CI only runs pull-request checks targeting `dev`, so the updates receive no expected CI checks and bypass the development-branch integration checks.
Set the Dependabot target branch to `dev` for these entries.
Also at `.github/dependabot.yml:14`, `.github/dependabot.yml:58`, `.github/dependabot.yml:69`, `.github/dependabot.yml:84`, `.github/dependabot.yml:93`, `.github/dependabot.yml:106`.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 2 findings to address first, and if the label configuration is wrong, Dependabot will add the label to generated pull requests, including security-update PRs. Reverting stops future labels but leaves labels on existing PRs; those can be removed manually, and the change does not alter the dependency updates themselves.
Blocking findings: .github/dependabot.yml:25, .github/dependabot.yml:25
Summary
Lets Dependabot label all its pull requests, security updates included, with the organisation's label
type: dependenciesonly, instead of its own labels (dependenciesplus an ecosystem label).In
.github/dependabot.yml:labels: ["type: dependencies"]to everyupdatesentry (6: pip, github-actions, three docker entries, helm).target-branch: devfrom every entry (6 entries).devis the default branch, so version updates still target it.target-branch, so that it isn't added again.ignorerules. They now also apply to security updates: the major-version holds onconnexion(build: add support for Connexion 3+ #188) andgunicorn, the holds on minor and major updates of thepythonimages and of the chart images, and the skipped example root images andfoca-common. That's intended.Nothing else changes: compared as data (keys sorted), the new file equals the old one minus
target-branchpluslabelson every entry.Closes #775
Light lane: CI configuration only (Dependabot), no secrets, permissions or release workflow touched, so the reviewer subagents were skipped; I reviewed the diff myself.
Verification
yqparses the new.github/dependabot.yml; everyupdatesentry haslabels: ["type: dependencies"]; notarget-branchis left.yq -o=json 'sort_keys(..)'): only the intended change.CI passedgreen).Declined review findings
ignorerules now suppress security updates in held ranges. Intended (see above): those updates need hand-made changes, and Dependabot alerts, code scanning and the CI image scan still surface the advisories.maininstead ofdev. Not so:devis the default branch, which Dependabot targets withouttarget-branch.Open questions
None.
🤖 Generated with Claude Code