Fix CVE sync reliability and per-subcommand CLI help (v0.2.1) - #3
Merged
Merged
Conversation
Improve NVD fetch error messages and proxy-safe body decoding, make --years imply --full for year feed syncs, and route each top-level CLI subcommand through a dedicated parser so --help shows only relevant flags. Co-authored-by: Cursor <cursoragent@cursor.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.
Improve NVD fetch error messages and proxy-safe body decoding, make --years imply --full for year feed syncs, and route each top-level CLI subcommand through a dedicated parser so --help shows only relevant flags.
Summary
This release fixes confusing CVE sync failures (especially through proxychains), corrects
--yearsfeed behavior, and gives every top-level CLI subcommand its own--helpoutput with only relevant flags.CVE sync fixes
"error decoding response body" (month sync via proxychains)
Accept-Encoding: identity.NVD_API_KEY)."HTTP 404 Not Found" (
cve sync --years 2025)--yearswas silently ignored unless--fullwas also passed, so the command only fetched incrementalmodified/recentfeeds instead of year feeds.--yearsnow implies--fulland prints a notice when that happens.Other NVD error improvements
nvd: nvd:error prefix; errors use{e:#}for full context.CLI help improvements
Previously,
chronosphere cve --help(and other subcommands) showed global engagement flags (-e,-t,-c, etc.) even when irrelevant.*Cliparser via early dispatch (try_early_dispatch).run,targets,list, …): engagement flags appear under an Engagement section.cve,where,deploy,mcp-config, …): no engagement clutter.chronosphere targets add --helpshowsaddflags plus engagement options.Files changed
src/cve/rate_limit.rssrc/cve/providers/nvd.rsget_text/get_byteshelperssrc/cve/sync.rs--yearsimplies--full; clearer NVD error messagessrc/cli.rsEngagementOpts, per-subcommand parsers,try_early_dispatchsrc/main.rsCargo.toml/Cargo.lockTest plan
chronosphere cve sync --month 2026-03through proxychains completes NVD importchronosphere cve sync --years 2025downloadsnvdcve-2.0-2025(not modified/recent only)chronosphere cve --help— no engagement flags; examples shownchronosphere cve sync --help— sync flags onlychronosphere run --help— run flags + Engagement sectionchronosphere targets add --help— add flags + Engagement sectionchronosphere where --help— minimal (no engagement)chronosphere deploy --help— deploy flags onlychronosphere -e lab run <cmd-id>still works with leading engagement flagscargo test cvepasses