Skip to content

feat(vulns): add read-only detail vulns command for security scan findings - #339

Merged
tjdammann merged 3 commits into
mainfrom
tjdammann/vulns-command
Oct 30, 2026
Merged

tjdammann merged 3 commits into
mainfrom
tjdammann/vulns-command

Conversation

@tjdammann

@tjdammann tjdammann commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a read-only detail vulns command group for findings from Detail's security scans ("vulns"), modeled on detail bugs and detail scans. Findings have a severity instead of a priority and no review state, so there is no close / reopen / prioritize.

  • detail vulns list [repo] mirrors bugs list: --severity critical|high|medium|low (repeatable or comma-separated, default all), --sort newest|oldest|severity (default newest), --scan-id <wr_…>, --since / --until, --all, --limit (1–100, default 50), --page, --format table|json. Severity, sort and scan ID are filtered by the API. --all and the time window fetch every page and filter client-side, the same way bugs does.
  • detail vulns show <ssf_…> mirrors bugs show: ID, title, severity, file, created, commit, scan, linked issues and fix PR, then the markdown description rendered the same way as a bug summary.
  • detail vulns scans [repo] mirrors scans list for security scans: --status, --since / --until, --limit, --page, --format. Cards show per-severity counts (e.g. 14 High, 60 Medium, 412 Low) instead of open/dismissed/resolved.
  • Repo inference, pagination, JSON output, error messages and the update-notice silencing for --format json all work as they do for the bugs commands.

Other changes:

  • detail bugs list --vulns help text now says it filters bug-finder bugs flagged as security vulnerabilities, and points to detail vulns list for security-scan findings.
  • Bundled skill: detail-bugs (installed by detail skill) now has a detail vulns section and says when to use it rather than bugs list --vulns.
  • docs/HELP.md regenerated.

Dependency

Depends on usedetail/detail#18482, which adds the public endpoints GET /public/v1/vulns, GET /public/v1/vulns/{vuln_id} and GET /public/v1/vuln-scans.

Warning

The openapi.json in this PR was pulled from a local backend running #18482, not from prod, so the vendored-artifact CI step (cargo xtask check / openapi check) will fail until #18482 is deployed to prod. After that, cargo xtask generate-openapi should produce an identical file. The file uses the same formatting as xtask: I checked that re-serializing the current file reproduces it byte-for-byte.

Testing

  • cargo fmt --check, cargo clippy -- -D warnings, cargo test (345 unit tests, 18 integration) and cargo xtask check-help all pass.
  • New unit tests cover severity query building, time and scan filtering, pagination, list and show card contents, the severity breakdown, and CLI parsing (flags, bounds, --all conflicts, no mutating subcommands, JSON silencing). Integration help and no-auth tests now include vulns.
  • Smoke-tested against a local backend on forked prod data for usedetail/detail (515 vulns):
    • vulns list: default view, --severity critical,high --sort severity, --scan-id (486 for the seeded scan), --all (515 of 515), --since 7d --until 1d, and an empty-window hint. Pagination totals were correct, and --format json output was valid.
    • vulns show: a finding with a linked issue and a fix PR in both table and JSON output, plus one without a fix PR (fixPr omitted).
    • vulns scans: per-severity counts, --status / --since filters, and pagination.
    • Error paths: a malformed vuln ID, a malformed scan ID, an unknown vuln (403), an unknown scan (400) and an unknown repo.

🤖 Generated with Claude Code

…dings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aviator-app

aviator-app Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR was merged manually (without Aviator). Merging manually can negatively impact the performance of the queue. Consider using Aviator next time.


See the real-time status of this PR on the Aviator webapp.
Use the Aviator Chrome Extension to see the status of your PR within GitHub.

@tjdammann
tjdammann deployed to integration-tests October 29, 2026 23:07 — with GitHub Actions Active

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 10 files

Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack

View guided diff | Turn on auto-fix | Re-trigger cubic

…tters

VulnScan cards now show the vuln count only for completed scans or scans
that already recorded findings; in-progress, failed and DLQ'd scans with
zero counts fall back to the bare repo name, as the bugs Scan card does.

The Vuln card and show view reuse the bug linked-issue and fix-PR
formatters (via a From<&VulnLinkedIssue> for LinkedIssue conversion), and
the severity breakdown uses severity_label.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…visories

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tjdammann
tjdammann deployed to integration-tests October 30, 2026 20:33 — with GitHub Actions Active
@tjdammann
tjdammann merged commit 547c2ef into main Oct 30, 2026
14 of 15 checks passed
@tjdammann
tjdammann deleted the tjdammann/vulns-command branch October 30, 2026 21:08
@tjdammann tjdammann mentioned this pull request Oct 30, 2026
tjdammann added a commit that referenced this pull request Oct 30, 2026
Bumps the version so `release.yml` tags `v0.2.11` and cargo-dist builds
and publishes the platform artifacts.

Patch bump per the `cut-release` skill, which specifies patch unless a
minor or major is explicitly requested.

### Since v0.2.10

- `feat(vulns): add read-only detail vulns command for security scan
findings` (#339) — new `detail vulns list|show|scans` for security scan
findings, mirroring `bugs list`/`show` and `scans list`, backed by the
new `/public/v1/vulns*` endpoints. Also carried the quinn-proto, rustls,
rustls-webpki and webpki-root-certs bumps for 11 RustSec advisories.
- `chore: remove simulate_old_pagination test helper and its test`
(#338)
- `fix(bugs): clamp page on empty client-side filter results` (#335)

### Testing

`cargo check`, `cargo fmt --check`, `cargo clippy -- -D warnings`,
`cargo test` (348 lib + 18 integration), and `cargo xtask check` all
pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- av pr metadata
This information is embedded by the av CLI when creating PRs to track
the status of stacks when using Aviator. Please do not delete or edit
this section of the PR.
```
{"parent":"main","parentHead":"","trunk":"main"}
```
-->

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
integration-tests — d94413bc Deployed Oct 30, 2026 by tjdammann via Integration #385
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.

1 participant