Repository navigation
fix(manifest): classify every Maven dependency scope as Maven does - #1717
Conversation
PR SummaryMedium Risk Overview Off-classpath resolution (notably Regression coverage adds Reviewed by Cursor Bugbot for commit ff82596. Configure here. |
62a940a to
f6749d5
Compare
The Maven facts extension kept only Maven 3's five scopes and silently dropped any other dependency, subtree included. Maven 3 puts the jar of a scope it does not know (`import`, or a typo, in <dependencies>) on every classpath, and Maven 4 adds compile-only, test-only, test-runtime and none. Scopes Maven 3 does not know are now prod. Maven 4's compile-only, test-only and test-runtime are dev, on the compile or test path its PathScope gives them. Its none is on no path: the dependency and its subtree stay in the SBOM as dev, in a root the new noClasspath record marks, and the assembler leaves them off the reachability classpath and the sidecar's direct dependencies. --include-configs and --exclude-configs match any scope name. Resolves REA-1164.
ff82596 to
5676f73
Compare
LLM Description written by Claude Code:claude-opus-5-5
Stacked on #1716, since both change how the Maven extension walks a module's graph.
Maven Socket facts kept only Maven 3's five scopes and silently dropped every other dependency, subtree included. That covered Maven 4's
compile-only,test-only,test-runtimeandnone, and animportor misspelled scope in<dependencies>. Maven 3 compiles and runs against such a jar, so this was both an SBOM miss and a reachability blind spot.What changes
compile-only,test-onlyandtest-runtimeare dev, on the compile or test path itsPathScopegives them.noneis on no path. The dependency and its subtree stay in the SBOM as dev, in a root that a newnoClasspathrecord marks. The assembler leaves them off the reachability classpath and the sidecar's direct dependencies, so Coana neither analyses nor fetches them.--include-configsand--exclude-configsmatch any scope name.These rules follow a measured comparison: Maven 3.9.9 and 4.0.0-rc-6, and the CycloneDX Maven plugin, cdxgen, Trivy and Syft. The decisions are recorded in REA-1164.
Verification
maven-compat/unknown-scopesfixture, on every Maven version:importand misspelled scopes, each with a child. Prod, on the classpath.maven-compat/maven4-scopesfixture, on the Maven 4 row: the four Maven 4 scopes, plus anonedependency sharing a child with a compile one, whose edge is kept.Resolves REA-1164.
🤖 Generated with Claude Code