Skip to content

feat(manifest): ask for the reachability settings in the setup wizards - #1729

Open
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 4 commits into
jfblaa/facts-4-reachability-settingsfrom
jfblaa/facts-5-wizards
Open

Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 4 commits into
jfblaa/facts-4-reachability-settingsfrom
jfblaa/facts-5-wizards

Conversation

@jfblaa

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

Copy link
Copy Markdown
Contributor

Heads up, reviewer

Update wizard to configure reachability settings 🧙‍♂️


LLM Description written by Claude Code:claude-opus-5-5

socket manifest setup and socket manifest setup --dynamic-sbom-inference ask for #1728's reachability settings for each build tool that generates Socket facts, so they can be set without editing socket.json by hand.

Merges with the stack. The Coana release it needs is pinned on v1.x since #1762.

Questions
  • Whether to build before reachability analysis; a no writes "none" only to override an inherited "compile".
  • Maven, Gradle and sbt: whether to use a different JDK for the analysis, showing the one in effect and whether a parent socket.json sets it.
  • .NET: whether to start a framework-dependent build's analysis on a given runtime.
  • Gradle and sbt in pom mode aren't asked.
  • The wizards run even when a reachability value is invalid: they warn about one in the socket.json they write and replace it with the answers.
Stack
  1. fix: keep the API token and settings socket-cli passes Coana out of the build tools it runs #1725: Keep the Socket API token out of the tools Coana runs (merged)
  2. feat(manifest): generate Socket facts with Coana #1726: Generate Socket facts with Coana
  3. refactor(manifest): delete socket-cli's build-tool scripts and facts assembly #1727: Delete socket-cli's build-tool scripts and facts assembly (internal)
  4. feat(manifest): add socket.json reachability settings for the build tools #1728: socket.json reachability settings for the build tools
  5. feat(manifest): ask for the reachability settings in the setup wizards #1729: Reachability settings in the setup wizards (this PR)
  6. refactor: follow-ups to generating Socket facts with Coana #1733: Follow-ups (draft)

Changelog

In CHANGELOG.md under [Unreleased]:

Added

  • socket manifest setup and socket manifest setup --dynamic-sbom-inference ask for the reachability settings, so there is no need to edit socket.json by hand.

🤖 Generated with Claude Code

@cursor

cursor Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Interactive configuration and socket.json write logic only; no change to scan/reachability execution paths beyond what users opt into via the wizard.

Overview
socket manifest setup and the dynamic-sbom-inference recursive wizard now walk through defaults.manifest.*.reachability for .NET, Gradle, Maven, and sbt when Socket facts generation is in play, so users do not have to edit socket.json by hand.

The wizards ask whether to compile before reachability (reachability.build: compile vs overriding an inherited compile with none), whether to set a separate JDK for JVM tools (reachability.javaHome, distinct from build javaHome), and for .NET whether to pin reachability.runtimeVersion. Defaults and “no” labels reflect the effective value, including settings inherited from parent socket.json files; clearing with a blank answer writes null so a parent value is not silently kept.

Invalid or tool-incompatible reachability values are warned and stripped before prompting. Gradle/sbt in pom mode skip the reachability step. The recursive setup passes inherited reachability into each wizard and only persists fields that differ from the cascade (including nested reachability keys).

Changelog and broad unit/integration tests cover inheritance, overrides, validation, and write behavior.

Reviewed by Cursor Bugbot for commit 78fadc7. Configure here.

@mtorp Martin Torp (mtorp) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two wizard choices can change which settings a scan actually uses. The inline comments trace both cases and include the source-comment notes.

`socket manifest setup` and `socket manifest setup
--dynamic-sbom-inference` ask, for each build tool that generates facts:

- whether to build the project before reachability analysis. A no writes
  "none" only to override an inherited "compile", and otherwise leaves the
  setting unset;
- Maven, Gradle and sbt: whether to use a different JDK for the analysis,
  showing the one in effect, inherited or not;
- .NET: whether to start a framework-dependent build's analysis on a given
  runtime, taking major.minor or major.minor.patch[-prerelease].

The wizards read socket.json as written, so they run under an invalid
reachability value: they warn about what a build tool cannot take and
replace it with the answers, and ignore an invalid inherited value for
their defaults.
`socket manifest setup --dynamic-sbom-inference` wrote every accepted
default of a directory's section into its socket.json, so accepting an
inherited reachability value pinned it there. It now keeps only the fields
that differ from what the directory inherits, as it does for a build.
Answering no to a different JDK in a directory under a socket.json that
sets one writes nothing, and the scan there reads the parent's JDK;
answering yes with a blank JDK writes null, and the scan reads none.

This branch has not been deployed

No deployments
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