Skip to content

fix(scan): generate facts without downloads under --reach-disable-dependency-downloads - #1778

Merged
Jeppe Fredsgaard Blaabjerg (jfblaa) merged 5 commits into
v1.xfrom
jfblaa/rea-1214-offline-facts
Dec 1, 2026
Merged

Jeppe Fredsgaard Blaabjerg (jfblaa) merged 5 commits into
v1.xfrom
jfblaa/rea-1214-offline-facts

Conversation

@jfblaa

@jfblaa Jeppe Fredsgaard Blaabjerg (jfblaa) commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Heads up, reviewer

[Edit me, human!]


Claude Code · claude-opus-5-5

With --reach-disable-dependency-downloads, socket scan create --reach and socket scan reach now ask Coana to generate their Socket facts without downloads too, so Gradle, Maven, sbt and .NET builds resolve from the user's own caches. Before, only Coana's analysis got the option, and facts generation ahead of it still downloaded.

The option needs Coana 15.15.8 (coana-tech/coana-package-manager#2880), which #1780 pinned. An older --reach-version fails with a clear message instead of an unknown option.

Tests
  • run-manifest-facts.test.mts: listing and generating pass --disable-dependency-downloads and require Coana 15.15.8 only when the context disables downloads.
  • handle-create-new-scan.test.mts: a reachability scan with the option disables downloads in the context.
  • handle-scan-reach.test.mts: the context disables downloads exactly when the option is set.
  • End to end, socket scan reach --dynamic-sbom-inference on a Maven project with an isolated local repository: with the option, Coana 15.15.7 is refused, and 15.15.8 reports an uncached dependency as unresolved in offline mode without downloading it, then succeeds once it is cached; without the option it downloads.

🤖 Generated with Claude Code

…endency-downloads

A reachability scan with --reach-disable-dependency-downloads passed the option only to Coana's
analysis, so the build tools resolving its facts first still downloaded. Facts generation now asks
Coana for the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ndency-downloads

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…facts

socket scan reach takes the option too, so its facts generation now
resolves from the build tools' caches as scan create's does. Generating
facts without downloads needs Coana 15.15.8, the first release whose
generate-socket-facts takes --disable-dependency-downloads, so an older
--reach-version fails with a clear message instead of an unknown option.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cursor

cursor Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Targeted CLI-to-Coana flag wiring with version gating and tests; no auth or data-model changes.

Overview
Fixes --reach-disable-dependency-downloads so it applies during Socket facts generation for --dynamic-sbom-inference, not only during the reachability analysis step. Coana’s generate-socket-facts now receives --disable-dependency-downloads when the CLI context requests offline resolution, so Gradle, Maven, sbt, and .NET resolve from local caches instead of fetching during fact generation.

SocketFactsContext gains disableDependencyDownloads, wired from scan flows: handle-create-new-scan sets it when reachability is enabled and the flag is on; handle-scan-reach forwards reachDisableDependencyDownloads into dynamic SBOM inference. When downloads are disabled, the minimum Coana version is raised from 15.15.4 to 15.15.8 (the release that supports the new Coana flag).

Tests cover Coana argv, minimum version selection, and scan-handler context propagation. The changelog documents the behavior under Unreleased Fixed.

Reviewed by Cursor Bugbot for commit 3ebb976. Configure here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[agent] Looks good. The inline comments are simplification opportunities only; nothing in this review hunts for correctness bugs.

…facts generation

Coana's generate-socket-facts takes --disable-dependency-downloads for any
purpose, and the reach-only rule already lives in the CLI's flag validation,
so the scan handlers pass the option through unchanged. Coana's
--disable-dependency-downloads is now one shared constant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Moves the changelog entry under a new Unreleased heading, since 1.18.1
was released from the block it was in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jfblaa
Jeppe Fredsgaard Blaabjerg (jfblaa) merged commit a1775b1 into v1.x Dec 1, 2026
22 checks passed
@jfblaa
Jeppe Fredsgaard Blaabjerg (jfblaa) deleted the jfblaa/rea-1214-offline-facts branch December 1, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants