fix(ops): allow gmpctl to ignore specified modules; loop#2008
Open
bwplotka wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces the ability to ignore specific Go modules during dependency upgrades by adding an ignored_modules configuration option to gmpctl. The feedback suggests optimizing the module lookup by using a map instead of a slice to achieve O(1) complexity, which requires updating the parsing logic, the signature of compileUpdateList, and the unit tests. Additionally, it is recommended to make the unit test hermetic by avoiding external NVD API calls triggered by osv entries in the mock JSON.
bwplotka
force-pushed
the
gmpctl-ignore
branch
2 times, most recently
from
July 24, 2026 21:04
418d60d to
510daf6
Compare
bwplotka
force-pushed
the
gmpctl-ignore
branch
5 times, most recently
from
July 24, 2026 22:14
6b0f1b3 to
0896a8b
Compare
Signed-off-by: bwplotka <bwplotka@google.com>
Signed-off-by: bwplotka <bwplotka@google.com>
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.
This PR improves
gmpctl vulnfixreliability by adding module ignoring capabilities, fixing dependency parsing, and adding multi-pass vulnerability resolution.Changes Included
Ignored Modules Support:
vuln_ignored_modulessetting in.gmpctl.default.yaml.-vuln-ignore-modulesflag togmpctlandvulnupdatelistto skip specific Go module upgrades (such asgithub.com/prometheus/prometheus) during vulnerability remediation.Dependency Update Bug Fix (
lib.sh):release-lib::gomod_vulnfixparsing ofvulnupdatelistoutput (using$1instead of$2to correctly extractmodule@versionrather than CVE IDs).sedtogo get "${mod_path}@${desired_version}"to reliably update both direct and indirect dependencies ingo.mod.Multi-Pass Vulnerability Resolution (
vulnfix.sh):vulnfix.shto handle chained/transitive vulnerability fixes (e.g., when updating a module reveals a higher patch requirement in subsequent scans).Tests:
vulnupdatelist/vuln_test.goverifying ignored module logic and update list compilation.