Skip to content
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

feat: support updating config ignores #248

Merged
merged 9 commits into from May 10, 2024
Merged

Conversation

G-Rath
Copy link
Owner

@G-Rath G-Rath commented Feb 2, 2024

This adds a --update-config-ignores flag that aims to update the osv-detector configs to ignore all found vulnerabilities for the related lockfile if a config exists.

For now I'm keeping this as a draft because while I think it's actually good to go, the main cli tests defeated me a bit as it's painful to craft all the different tests required; that's also why I've not yet done any cleanup or deduplication of the test helpers.

There's also a few "extensions" on this that could be done, including having the detector note when there are ignored vulnerabilities that are no longer present, a custom indent level, and better handling of existing ignores (rather than requiring --no-config-ignores be set).

@G-Rath G-Rath force-pushed the support-generating-config branch from 4dda372 to d9fccbe Compare May 2, 2024 19:17
G-Rath added a commit that referenced this pull request May 10, 2024
This upgrades us to use the latest v3 version of the YAML library along with updating our unmarshal functions to use the new interface.

While this annoyingly adds ~20kb to the binary, it gives us access to more stuff like information about comments and line numbers when unmarshalling and the ability to write indented output (which will be used for #248) - ultimately, we might as well just get the upgrade over with.
@G-Rath G-Rath force-pushed the support-generating-config branch from d9fccbe to 9bfce32 Compare May 10, 2024 02:12
@G-Rath G-Rath marked this pull request as ready for review May 10, 2024 02:29
@G-Rath G-Rath merged commit 2cb582b into main May 10, 2024
8 checks passed
@G-Rath G-Rath deleted the support-generating-config branch May 10, 2024 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant