Repository navigation
Conversation
Reviewer's GuideAPIExpose the PURL listing crypto filter as a repeated query parameter and pass its values to the service.
Update the SBOM crypto-filter description to cover all crypto asset types.
ImplementationFilter listed PURLs to packages that generate matching verified crypto assets, and retain the existing unfiltered service method.
Allow SBOM crypto filtering to match any crypto asset type instead of algorithms only.
TestsVerify PURL filtering matches generated crypto assets, excludes similarly named non-crypto nodes, and accepts multiple names.
Verify SBOM filtering matches both algorithm and key assets and returns no results for unknown names.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
2acfb1f to
8e4007d
Compare
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".cargo/config.toml" line_range="6" />
<code_context>
xtask-ai = "run --features ai --package xtask --"
[env]
-CARGO_WORKSPACE_ROOT = { value = "", relative = true }
\ No newline at end of file
+CARGO_WORKSPACE_ROOT = { value = "", relative = true }
</code_context>
<issue_to_address>
**Workspace builds stop at compile time**
When the build environment does not independently set `CARGO_WORKSPACE_ROOT`, `env!("CARGO_WORKSPACE_ROOT")` in `test_context::absolute`, `test-context`, and `modules/fundamental` fails during compilation because Cargo does not provide the variable, so workspace builds stop before tests or applications can run.
Restore the `.cargo/config.toml` environment entry for `CARGO_WORKSPACE_ROOT`.
</issue_to_address>
### Comment 2
<location path="modules/fundamental/src/purl/service/mod.rs" line_range="655" />
<code_context>
+ // packages (left) generating (relationship) a crypto asset (right) with a given name;
+ // the `sbom_crypto` join ensures the generated node really is a crypto asset, and not
+ // just a node which happens to share its name
+ let generated = sea_query::Query::select()
+ .column((
+ sbom_node_purl_ref::Entity,
</code_context>
<issue_to_address>
**Non-package PURLs pass crypto filter**
When a CycloneDX machine-learning model has a PURL and is the source of a `provides` relationship to a crypto asset whose name matches the filter, the subquery matches every PURL reference on a node with a `Generates` relationship, without requiring the left node to be a package. A CycloneDX machine-learning model can have a PURL and participate in `provides`, so its PURL is returned as a package generating the crypto asset even though it has no `sbom_package` row.
Require the left node to have a matching `(sbom_id, node_id)` row in `sbom_package` before returning its PURL.
</issue_to_address>Sourcery assessment
Approval pending. 2 findings to address first.
Blocking findings: .cargo/config.toml:6, modules/fundamental/src/purl/service/mod.rs:655
8e4007d to
d0aaeba
Compare
Sourcery withdrew this approval because the latest commits introduced blocking findings.
Summary by Sourcery
Fix crypto-related package counts and extend crypto asset filtering across SBOM and PURL listings.
New Features:
Bug Fixes:
Documentation:
Tests: