Repository navigation
feat(security): wire CLI package scanner to /v2/packages/assess/local - #1200
Merged
Merged
Conversation
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
PyRo1121
force-pushed
the
feat/cli-local-advisory-assess-v2
branch
2 times, most recently
from
December 1, 2026 17:07
8f1d329 to
3b8ec44
Compare
…policy verdicts and OSV fallback
PyRo1121
force-pushed
the
feat/cli-local-advisory-assess-v2
branch
from
December 1, 2026 17:27
3b8ec44 to
6ed71a4
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.
Summary
Wires OMG CLI's
VulnerabilityScannerto the new edge-cachedPOST https://advisories.latham.cloud/v2/packages/assess/localbatch endpoint for all supported OS package ecosystems and language registries (npm,PyPI,crates.io,Go,Debian,Ubuntu,Fedora,Alpine,Red Hat,Rocky Linux,AlmaLinux,SUSE,openSUSE,Wolfi,Chainguard,Linux):src/core/security/vulnerability.rs):{ ecosystem, name, version }coordinates in batches of up to 32 per request instead of per-package upstream OSV round trips.Cache-Control: no-cacheonAssessmentUse::Admissionto bypass Cloudflare's 30s edge cache for fresh revalidation; uses the 30s edge cache + local 5-minuteLOCAL_ASSESS_CACHEforAssessmentUse::Review.schema_version == 2, exact result length, and 1-to-1 coordinate correspondence (name+version), failing closed on any mismatch.policy_verdictenforcement intoAdvisoryRiskReview:reject_malware/reject_exploited(0-day or CISA KEV) → mapped toAdvisorySeverity::Criticalwith[MALWARE]/[0-DAY]/[KEV]evidence tags, triggeringAdvisoryReviewKind::CriticalAdvisory(refuses unattended installs; requires explicit"install-unsafe"interactive consent).warn_vulnerable→ surfaces findings with severity, EPSS, and fixed-version evidence (AdvisoryReviewKind::Advisory).warn_partial/status == "partial"→ mapped toPackageCoverage::Unknown { reason: EvidenceUnavailable, .. }(AdvisoryReviewKind::CoverageUnknown— never silently treated as safe, never falsely rejected as malware).allow→PackageCoverage::Assessedwith no findings./v1/arch/advisories(withIf-None-MatchETag304).Homebrew) and isolatedwith_osv_endpointtests continue using the OSV path cleanly.Verification
--no-default-features) with 0 compiler warnings and 54 unit tests passed, 0 failed acrosscore::security::vulnerability,core::security::advisory_review, andcore::security::package_review, including 3 new contract tests:core::security::vulnerability::local_assess_tests::local_assess_ecosystem_filter_covers_supported_and_excludes_homebrewcore::security::vulnerability::local_assess_tests::local_assess_batches_35_coordinates_and_maps_all_policy_verdictscore::security::vulnerability::local_assess_tests::local_assess_fails_closed_on_mismatched_coordinateOpen in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.