renovate: don't flag packageRules covered by a top-level minimumReleaseAge - #3999
Open
munzzyy wants to merge 1 commit into
Open
renovate: don't flag packageRules covered by a top-level minimumReleaseAge#3999munzzyy wants to merge 1 commit into
munzzyy wants to merge 1 commit into
Conversation
…seAge A top-level minimumReleaseAge applies to every package, so packageRules entries without their own value are already protected. Branch 1 of the rule only looked inside packageRules, flagging fully-protected configs. Suppression requires a string value at the top level, so a top-level "minimumReleaseAge": false does not silence the rule, and entries that explicitly override with a too-low or malformed value are still flagged by branches 2 and 3.
munzzyy
force-pushed
the
renovate-min-release-age-top-level
branch
from
July 10, 2026 19:24
e083e81 to
056f64d
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Link to an issue, if relevant
Fixes #3995
Summary
renovate-missing-minimum-release-ageonly looks forminimumReleaseAgeinside eachpackageRulesentry. Renovate applies a top-levelminimumReleaseAgeto every package, so a config like this is fully protected but still gets one finding per entry:{ "minimumReleaseAge": "7 days", "packageRules": [ { "matchPackageNames": ["webpack"], "groupName": "Webpack build system" } ] }This adds a
pattern-not-insideto branch 1 (the "missing entirely" branch) that suppresses the finding when the object holdingpackageRulesalso sets a stringminimumReleaseAge. Two details were deliberate:"minimumReleaseAge": "$TOPAGE"), so a top-level"minimumReleaseAge": falsedoes not silence the rule. Theglobal-falsetest file covers this."3 days") or malformed ("banana days") is still flagged, which matches Renovate's semantics: apackageRulesvalue replaces the global one for the packages it matches.What I tested
semgrep test package_managers/renovateandsemgrep validatewith semgrep 1.169.0. All existing cases inrenovate-missing-minimum-release-age.test.jsonstill pass. The three new test files fail against the unpatched rule (on exactly the two false-positive lines) and pass with the patch. It takes three files because a top-level key applies to the whole file, so the scenarios can't share a fixture: global age beforepackageRules, global age after it, and globalfalse.Known limits
"2 days") also suppresses the per-entry findings. As far as I can tell semgrep has no way to attach a metavariable condition to apattern-not-inside, so catching a weak top-level value would need a new branch that inspects it directly. I can add that here if you want it, but it seemed like a separate decision from fixing the false positive.extends(the reporter's original setup) can't be resolved statically, so a preset-provided global age still gets flagged. The issue's own suggestion was to handle the explicit top-level key, which is what this does.I left the rule message alone since #3885 already rewrites it.