feat: exploit intelligence integration#2534
Conversation
There was a problem hiding this comment.
Sorry @Strum355, your pull request is larger than the review limit of 150000 diff characters
068214e to
c74a322
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2534 +/- ##
==========================================
+ Coverage 72.17% 72.51% +0.34%
==========================================
Files 465 480 +15
Lines 28702 30309 +1607
Branches 28702 30309 +1607
==========================================
+ Hits 20715 21980 +1265
- Misses 6813 7069 +256
- Partials 1174 1260 +86 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
||
| /// Base URL of the Exploit Intelligence web UI for deep-linking to reports. | ||
| #[arg(long, env = "EXPLOIT_INTELLIGENCE_UI_URL")] | ||
| pub exploit_intelligence_ui_url: Option<String>, |
There was a problem hiding this comment.
I assume if exploit_intelligence_url is set, so must be this one (and others). We need to make sure this information is available. Clap supports this.
There was a problem hiding this comment.
I assume if exploit_intelligence_url is set, so must be this one (and others).
Not necessarily true, although it may be the most common case in practice. The EI client both serves the UI and provides the API (or an API gateway, whichever) so its entirely possible that the same URL is used.
ctron
left a comment
There was a problem hiding this comment.
I think that, unless impossible, this should go into it's own module. It doesn't seem to be "fundemental".
Also, how can the UI evaluate if this feature is configured or not?
ruromero
left a comment
There was a problem hiding this comment.
Review: Exploit Intelligence Integration
Solid feature with well-designed job queue, comprehensive tests, and good resilience patterns. The convention and code quality items below should be addressed before merge.
See inline comments for details.
Thanks for pointing this out, seems my changes disappeared into a git stash. Im taking the approach of adding a flag to {"version":"0.5.0-rc.1","readOnly":false,"exploitIntelligence":false,"build":{...}}
Ill have a look into this 👍 |
4e515b5 to
fe36624
Compare
…ion (#2435) Create database entities and migration for tracking Exploit Intelligence analysis jobs. Every job has at least one component row — CycloneDX single-component jobs get exactly one, SPDX product jobs get N. Job table tracks lifecycle (sbom_id, vulnerability_id, status) while all per-component results (scan_id, finding, advisory_id) live exclusively on the component table. Report URLs are derived at query time from config + scan_id, not stored. Includes composite index on (sbom_id, vulnerability_id) for the find_active_job deduplication query, and FK indexes per CONVENTIONS.md. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ints (#2464) Implements TC-4677
- Renumber EI migration from m0002250 to m0002270 to resolve collision with m0002250_create_cpe_status - Move create.exploitIntelligence permission from read:document to create:document scope (write operations should not be gated by read-only access) - Remove duplicate doc comment on compute_job_report_url Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add 17 service-level tests covering job creation, dedup, dequeue
mechanics (visibility timeout, retry exhaustion, batch limit),
status guard enforcement, failure cascade to components, visibility
extension, component lifecycle, and excluded component semantics.
Add 12 runner-level tests using wiremock to mock the EI service API,
covering both CycloneDX and SPDX flows: successful analysis with
findings, VEX advisory ingestion, EI-side analysis failure, upload
rejection, transient retry, all-excluded products, mixed components,
product-level failure, and error classification.
Fix advisory_id not being linked to components after VEX ingestion
(strip_prefix("urn:uuid:") failed when the ingestor returned a
plain UUID without the prefix).
Fix dequeue_jobs returning stale pre-update models by reflecting
the UPDATE in memory before returning.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…te of EI support is enabled
…-intelligence - New crate modules/exploit-intelligence/ (trustify-module-exploit-intelligence) with its own Error type (3 variants: Unavailable, Database, Any) and ResponseError impl - Moved all 13 EI source files, updated crate::exploit_intelligence:: → crate:: paths, replaced SourceDocument round-trip with direct StorageKey::from_sha256() - Cleaned fundamental: removed pub mod exploit_intelligence, removed ei_service parameter from configure(), removed backon/reqwest/bytes from deps, removed EI imports from 5 integration test files and test helpers - Rewired server: imports now come from trustify_module_exploit_intelligence, EI endpoints mounted directly in /api scope alongside importer/ingestor/fundamental
db0c4ef to
de5108a
Compare
Summary
Feature branch merge for Exploit Intelligence integration.
Tasks implemented:
Implements TC-4441
Related trustify-ui PR: guacsec/trustify-ui#1125