-
Notifications
You must be signed in to change notification settings - Fork 76
chore: configure Konflux bot for Python and pipeline dependency updates #1283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,43 @@ | ||
| { | ||
| "$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
| "enabledManagers": [ | ||
| "tekton" | ||
| "tekton", | ||
| "pip_requirements", | ||
| "pip_setup", | ||
| "pep621", | ||
| "dockerfile", | ||
| "github-actions" | ||
| ], | ||
| "pip_requirements": { | ||
| "fileMatch": [ | ||
| "(^|/)requirements[\\w-]*\\.txt$", | ||
| "(^|/)requirements[\\w-]*\\.in$" | ||
| ] | ||
| }, | ||
| "packageRules": [ | ||
| { | ||
| "description": "Group all Tekton pipeline updates", | ||
| "matchManagers": ["tekton"], | ||
| "groupName": "Tekton pipelines" | ||
| }, | ||
| { | ||
| "description": "Group Python build dependencies", | ||
| "matchFiles": ["requirements-build.txt"], | ||
| "groupName": "Python build dependencies" | ||
| }, | ||
| { | ||
| "description": "Separate security updates for faster merging", | ||
| "matchUpdateTypes": ["patch"], | ||
| "matchCurrentVersion": "!/^0/", | ||
| "automerge": false, | ||
| "labels": ["security"] | ||
| } | ||
| ], | ||
| "vulnerabilityAlerts": { | ||
| "enabled": true, | ||
| "labels": ["security"] | ||
| }, | ||
| "schedule": [ | ||
| "before 6am on Monday" | ||
| ] | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
Renovate packageRules isVulnerabilityAlert security updates💡 Result:
To handle “security updates” (GitHub/Dependabot vulnerability alerts) in Renovate, you don’t use
matchUpdateTypes(it doesn’t include a “vulnerability” update type). Instead you configure the dedicatedvulnerabilityAlertsobject, and/or match vulnerability-fix upgrades viamatchJsonata. [2][1]1) Configure vulnerability-alert PRs (recommended)
{ "vulnerabilityAlerts": { "enabled": true, "labels": ["security"], "automerge": true } }Renovate’s
vulnerabilityAlertsconfig controls how vulnerability-fix PRs are created (e.g., labels, automerge, prCreation, branchTopic, fix strategy). [2]2) Apply
packageRulesonly to vulnerability-fix upgradesRenovate suggests matching vulnerability fixes using fields like
vulnerabilityFixVersionviamatchJsonata: [1]{ "packageRules": [ { "matchJsonata": ["$exists(vulnerabilityFixVersion)"], "labels": ["security"], "prPriority": 10 } ] }If you specifically want the boolean flag, Renovate’s runtime config for alert rules includes
isVulnerabilityAlert: true(seen in logs/debug output), so you can also match that: [4]{ "packageRules": [ { "matchJsonata": ["isVulnerabilityAlert = true"], "labels": ["security"] } ] }3) Only create PRs when vulnerabilities exist
Use the preset
security:only-security-updates(disables all normal updates, enables vulnerability alerts; also enables OSV alerts). [3]{ "extends": ["security:only-security-updates"] }Sources: Renovate config options for
matchJsonataand example expressions [1], RenovatevulnerabilityAlertsbehavior/options [2], Renovate security presetsecurity:only-security-updates[3], Renovate discussion/log output showingisVulnerabilityAlert[4].🌐 Web query:
Renovate vulnerability alerts configuration matchUpdateTypes patch💡 Result:
matchUpdateTypescan’t be used insidevulnerabilityAlerts. ThevulnerabilityAlertsblock is only for “PRs needed due to a vulnerability in the existing package version” and has its own set of supported fields (e.g.,rangeStrategy,commitMessageSuffix,prCreation,vulnerabilityFixStrategy, etc.).[1]To apply logic like “only if the vulnerability fix is a patch”, do it with a
packageRulesrule (becausematchUpdateTypesis valid only withinpackageRules).[2] For vulnerability-fix PRs, you can match them viamatchJsonatausing the presence ofvulnerabilityFixVersion.[3]Example (automerge only vulnerability-fix PRs that are patch updates):
{ "vulnerabilityAlerts": { "enabled": true }, "packageRules": [ { "description": "Automerge vulnerability fixes only when update type is patch", "matchJsonata": ["$exists(vulnerabilityFixVersion)"], "matchUpdateTypes": ["patch"], "automerge": true } ] }Sources: Renovate
vulnerabilityAlertsoption[1],matchUpdateTypes(packageRules-only)[2], andmatchJsonataexample usingvulnerabilityFixVersion[3].[1] (docs.renovatebot.com)
[2] (docs.renovatebot.com)
[3] (docs.renovatebot.com)
Citations:
🌐 Web query:
Renovate "isVulnerabilityAlert" matcher packageRules💡 Result:
isVulnerabilityAlertis not a supportedpackageRulesmatcher you can write inrenovate.json. It’s an internal flag Renovate adds to the generated “alert package rules” it builds when processing GitHub (Dependabot) vulnerability alerts (you’ll see it in debug logs asalertPackageRulesentries with"isVulnerabilityAlert": true). [2]How to configure vulnerability-alert PRs (the supported way)
1) GitHub Dependabot alerts → use the top-level
vulnerabilityAlertsobjectThis is the documented configuration hook for PRs created to fix an existing vulnerable version. [1]
{ "vulnerabilityAlerts": { "labels": ["security"], "automerge": true, "commitMessageSuffix": "[SECURITY]", "vulnerabilityFixStrategy": "lowest" } }Renovate docs list
vulnerabilityAlertsas “Config to apply when a PR is needed due to a vulnerability in the existing package version.” [1]2) OSV-based alerts → enable
osvVulnerabilityAlertsIf you want Renovate to open PRs based on OSV (osv.dev) vulnerability data, enable:
{ "osvVulnerabilityAlerts": true }This is a separate feature flag. [1]
If your goal is “apply
packageRulesonly to vulnerability PRs”There’s no documented matcher like
isVulnerabilityAlertfor that.matchUpdateTypesalso won’t help here because Renovate’s documentedmatchUpdateTypesvalues don’t include a “vulnerability” type. [1]Sources: Renovate configuration docs for
vulnerabilityAlerts,osvVulnerabilityAlerts, andmatchUpdateTypesallowed values [1], plus Renovate discussion/log output showingalertPackageRulesentries marked withisVulnerabilityAlert: true[2].The security updates rule may not work as intended.
This rule matches all patch updates (
matchUpdateTypes: ["patch"]) rather than actual security/vulnerability updates. ThematchUpdateTypesfield doesn't include a "vulnerability" type, so this rule will label any non-0.x patch update as "security" even when it's not security-related.For handling vulnerability-triggered updates, use Renovate's dedicated
vulnerabilityAlertsconfiguration object at the top level:🔧 Recommended configuration for security updates
Alternatively, if you need to apply
packageRulesonly to vulnerability-fix PRs, usematchJsonatawith$exists(vulnerabilityFixVersion):{ "description": "Separate security updates for faster merging", + "matchJsonata": ["$exists(vulnerabilityFixVersion)"], "matchUpdateTypes": ["patch"], "matchCurrentVersion": "!/^0/", "automerge": false, "labels": ["security"] }🤖 Prompt for AI Agents