davsclaus opened a new pull request, #30857:
URL: https://github.com/apache/camel/pull/30857

   _Claude Code on behalf of Claus Ibsen_
   
   [CAMEL-27565](https://issues.apache.org/jira/browse/CAMEL-27565)
   
   `camel dependency audit --by-artifact` of the Camel CLI lists one row per 
vulnerable JAR, which answers "what do I upgrade". The `camel-report:audit` 
goal (CAMEL-27345) only had the table by CVE. This adds the same view to Maven 
builds:
   
   ```shell
   mvn camel-report:audit -Dcamel.audit.byArtifact=true
   ```
   
   ```text
   [WARNING] SEVERITY  SCORE  ARTIFACT                               CVES  
FIXES ALL  VIA
   [WARNING] CRITICAL    9.8  org.apache.commons:commons-text:1.9       1  
1.10.0
   [WARNING] HIGH        8.3  org.yaml:snakeyaml:1.33                   1  2.0
   [WARNING] MEDIUM      6.5  org.apache.commons:commons-lang3:3.11     1  
3.18.0     commons-text
   [WARNING] 3 vulnerabilities in 3 of 3 dependencies of com.acme:orders
   ```
   
   - New `byArtifact` option (`camel.audit.byArtifact`, default `false`). The 
rows come from `CveScan.artifactRows()`, the same as the CLI: the worst 
severity and highest score of the CVEs of each JAR, their count, the version 
that fixes all of them (`Camel x.y.z` for a Camel advisory, `none` when one has 
no fix) and the VIA chain.
   - The JSON report then also has `vulnerableArtifacts` and `artifacts` (the 
rows of `camel dependency audit --by-artifact --json`). Unlike the CLI, 
`findings` stays, as the report keeps the suppressed findings beside them. The 
SARIF report is unchanged (one rule per CVE).
   - There is no USED column: the goal does not know the endpoints of the 
routes, as before.
   - The column layout of the two tables is shared in `AuditReport.lines()`.
   - The plugin docs have the option and an example.
   
   Tests: two new tests in `AuditReportTest` (table and JSON by artifact), 8 of 
8 pass. The output above is from a real run of the goal (installed into a 
scratch local repo) on a project with commons-text 1.9 and snakeyaml 1.33, 
against OSV.dev.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to