GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(manifest): classify every Maven dependency scope as Maven does by jfblaa · Pull Request #1717 · SocketDev/socket-cli

Conversation

@jfblaa

@jfblaa Jeppe Fredsgaard Blaabjerg (jfblaa) commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

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-runtime and none, and an import or 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

  • A scope Maven 3 doesn't define is prod, as Maven 3 puts its jar on every classpath. A scope Maven 4 doesn't define follows the same rule, as Maven 4's default plugins do.
  • Maven 4's compile-only, test-only and test-runtime are dev, on the compile or test path its PathScope gives them.
  • Maven 4's none is on no path. The dependency and its subtree stay in the SBOM as dev, in a root that a new noClasspath record marks. The assembler leaves them off the reachability classpath and the sidecar's direct dependencies, so Coana neither analyses nor fetches them.
  • --include-configs and --exclude-configs match 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

  • New maven-compat/unknown-scopes fixture, on every Maven version: import and misspelled scopes, each with a child. Prod, on the classpath.
  • New maven-compat/maven4-scopes fixture, on the Maven 4 row: the four Maven 4 scopes, plus a none dependency sharing a child with a compile one, whose edge is kept.
  • The previous extension misses both.
  • Maven compat matrix 3.2.5 to 4.0.0-rc-6 is green.

Resolves REA-1164.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jfblaa
Jeppe Fredsgaard Blaabjerg (jfblaa) requested review from Oskar Haarklou Veileborg (BarrensZeppelin) and Martin Torp (mtorp) November 12, 2026 14:31
@cursor

cursor Bot commented Nov 12, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes core Maven dependency graph emission and reachability classpath boundaries; mistakes could mis-classify scopes or omit/exclude the wrong dependencies from scans.

Overview
Maven Socket facts no longer silently drop dependencies whose scope is outside Maven 3’s fixed five (compile, provided, runtime, system, test). The Maven extension replaces the hard-coded scope list with a Scopes helper that distinguishes Maven 3 vs Maven 4, honors --include-configs / --exclude-configs for any scope name, and labels each node prod/dev and on/off classpath the way Maven treats that scope (e.g. unknown scopes stay prod and on every classpath; Maven 4’s compile-only / test-only / test-runtime are dev; none is off all paths).

Off-classpath resolution (notably none) is emitted in a separate root with a new noClasspath record so the full subtree stays in the SBOM but is excluded from artifact fetch and from reachability. The assembler tracks per-root onClasspath, builds classpathByProject from classpath roots only, and limits direct dependencies to those on the classpath.

Regression coverage adds unknown-scopes and maven4-scopes compat fixtures plus smoke-test-scopes.sh in the Maven matrix.

Reviewed by Cursor Bugbot for commit ff82596. Configure here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mtorp
Martin Torp (mtorp) approved these changes Nov 12, 2026
View reviewed changes

@mtorp Martin Torp (mtorp) left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM ✅

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jfblaa
Jeppe Fredsgaard Blaabjerg (jfblaa) force-pushed the jfblaa/maven-sibling-artifact-ids branch from 62a940a to f6749d5 Compare November 12, 2026 15:53
Base automatically changed from jfblaa/maven-sibling-artifact-ids to v1.x November 12, 2026 16:04
@jfblaa
fix(manifest): classify every Maven dependency scope as Maven does
5676f73
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.
@jfblaa
Jeppe Fredsgaard Blaabjerg (jfblaa) force-pushed the jfblaa/maven-scope-classification branch from ff82596 to 5676f73 Compare November 12, 2026 16:09
@jfblaa
Jeppe Fredsgaard Blaabjerg (jfblaa) merged commit b5c19e4 into v1.x Nov 12, 2026
23 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@jfblaa
Jeppe Fredsgaard Blaabjerg (jfblaa) deleted the jfblaa/maven-scope-classification branch November 12, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mtorp Martin Torp (mtorp) mtorp approved these changes
@BarrensZeppelin Oskar Haarklou Veileborg (BarrensZeppelin) Awaiting requested review from BarrensZeppelin

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@jfblaa @mtorp
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.