feat: add Cloudsmith scanPackage, getPackageVulnerabilities and quarantinePackage components#5565
Conversation
|
👋 Commands for maintainers:
|
048e2c1 to
a073488
Compare
Docs Impact ReviewThis PR adds three new Cloudsmith components that form a multi-step, asynchronous vulnerability management pipeline; the component reference docs are updated, but a workflow overview section explaining how the pieces chain together is missing. Suggested docs updates:
Why: The three new components introduce an asynchronous, cross-component security workflow that is not obvious from reading each component's section in isolation. The Maintainer commands
Posted automatically by warp-gateway · commit a073488 |
|
Risk: 28/100 (low) SummaryAdds three new Cloudsmith action components (ScanPackage, QuarantinePackage, GetPackageVulnerabilities) in Go and TypeScript, following the same patterns as the existing Cloudsmith actions merged in #5568. Concerns
Recommended reviewers: bender-rodriguez-unit1 |
a073488 to
a5d217f
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a5d217f. Configure here.
a5d217f to
07688bc
Compare
Rebuilt on top of upstream's merged Cloudsmith integration. Adds three new actions on top of the existing getPackage/resync/tag/delete set: - scanPackage: schedule a vulnerability scan for a package - quarantinePackage: quarantine or release a package - getPackageVulnerabilities: fetch the latest vulnerability scan result Includes client methods, component registration, example outputs, frontend mappers, types, tests, and regenerated docs. Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
07688bc to
9adebe4
Compare

What changed
Extended the Cloudsmith integration with three new action components, built on top of the existing
getPackage/resyncPackage/tagPackage/deletePackageactions:cloudsmith.scanPackage) — schedules a vulnerability scan for a package.cloudsmith.quarantinePackage) — quarantines or releases a package.cloudsmith.getPackageVulnerabilities) — fetches the latest vulnerability scan result for a package.Why
To automate security workflows around Cloudsmith packages — trigger an on-demand scan after upload or before promotion, gate releases on vulnerability findings, and quarantine (or later release) packages that violate security/license policy. Scan results are asynchronous, so
scanPackageschedules the scan whilegetPackageVulnerabilitiesretrieves the outcome once it completes.How
Backend
Extended
pkg/integrations/cloudsmith/with:scan_package.go—cloudsmith.scanPackageaction; calls the package/scan/endpoint and emits the repository/package identifiers confirming the scan was scheduled.quarantine_package.go—cloudsmith.quarantinePackageaction with a Quarantine/Release select; calls the/quarantine/endpoint and emits the updated package object.get_package_vulnerabilities.go—cloudsmith.getPackageVulnerabilitiesaction; reads the top-level/vulnerabilities/endpoint and emits the most recent scan result (severity, counts, package ref).client.go— addedScanPackage,QuarantinePackage(+PackageQuarantineRequest), andGetPackageVulnerabilities(+VulnerabilityScanResult/VulnerabilityPackageRef) client methods/types.cloudsmith.go— registered the three new actions.example.go+ example output JSON files for each component.repositoryandpackagefields for dynamic runtime values, and reuse the existingresolvePackageMetadata/parseRepositoryIDhelpers.Frontend
Added
web_src/src/pages/app/mappers/cloudsmith/:scan_package.ts,quarantine_package.ts,get_package_vulnerabilities.ts— node mappers with subtitles and execution-details rendering.index.ts— registered the three mappers and their event-state entries (quarantinePackageuses a custom state registry for quarantine vs. release).types.ts— addedScanPackageConfiguration,QuarantinePackageConfiguration,GetPackageVulnerabilitiesConfiguration,VulnerabilityScanResult, andVulnerabilityPackageRef.