Repository navigation
feat(scan): add --dynamic-sbom-inference-continue-on-resolution-errors - #1820
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 7 commits into
Conversation
A hung build tool could stall --dynamic-sbom-inference indefinitely. Each build root now has a timeout covering all of its build tool runs together: --dynamic-sbom-inference-build-timeout on scan create, scan reach and fix, and --build-timeout on the manifest command. Values use the format of --reach-analysis-timeout, and 0 turns the timeout off. Coana applies the timeout. A Coana too old to take one gets no default, and setting the flag requires the first Coana that applies it.
The default build timeout drops from an hour to 10 minutes per build root, enough to resolve dependencies on an empty cache while catching a hung build sooner. A root whose socket.json sets reachability.build to "compile" gets 20 minutes on a reachability scan, as it also builds the project. A timeout given on the command line applies to every root. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Coana 15.15.10 predates the build timeout and rejects the field, so sending it there would fail every --dynamic-sbom-inference request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The scan commands now name --dynamic-sbom-inference-build-timeout when given the manifest command's --build-timeout, a timeout too large to send is an input error, and the help says the compile default applies to reachability scans. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
efce1ef to
ab495d8
Compare
With the flag (--continue-on-resolution-errors on socket manifest dynamic-sbom-inference), a build root whose failure Coana blames on the project's own build is left out, with the build roots it holds back, instead of aborting the run; every other root still produces Socket facts. Failures of Coana, Socket's backend or the CLI still abort. socket scan create reads a left-out root's manifest files as it does without --dynamic-sbom-inference; reachability analysis and socket fix leave the root out. The flag needs a Coana that reports what a failed build read and that marks for depscan only the files each build read.
ab495d8 to
7feb27b
Compare
PR SummaryMedium Risk Overview The recursive manifest walker now tracks what each failed root holds back (modules Coana reported, directory-wide fallback, or nested builds of their own that still run), exposes Scan behavior for left-out roots: Docs, changelog, CLI help, and extensive tests cover held-back modules, unreported failures, and flag validation/rename rules on scan commands. Reviewed by Cursor Bugbot for commit 7feb27b. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 7feb27b. Configure here.
| // The first Coana that reports what a failed build read, and that marks for | ||
| // depscan only the files each build read, so a left-out root's manifest files | ||
| // are still scanned. | ||
| export const CONTINUE_ON_RESOLUTION_ERRORS_MIN_COANA_VERSION = '15.15.11' |
There was a problem hiding this comment.
Left-out manifests still skipped
High Severity
CONTINUE_ON_RESOLUTION_ERRORS_MIN_COANA_VERSION is 15.15.11, and the changelog says that release still scans a left-out root’s manifest files. That Coana build only reports what the failed build read (#2923). It still writes skipEcosystems, and factsOnlyTypes still includes the failed root’s ecosystem, so depscan drops those manifests while the run also discards their Socket facts. A scan that “continues” can omit that project’s dependencies and still exit successfully.
Triggered by learned rule: Do not flag Coana CLI flag compatibility — @coana-tech/cli version is pinned
Reviewed by Cursor Bugbot for commit 7feb27b. Configure here.


Adds
--dynamic-sbom-inference-continue-on-resolution-errorstosocket scan create,socket scan reachandsocket fix(--continue-on-resolution-errorsonsocket manifest dynamic-sbom-inference), so one project whose build fails no longer aborts--dynamic-sbom-inferencefor a whole repository. A build root whose failure Coana blames on the project's own build is left out with a warning, along with the build roots it holds back, and every other root still produces Socket facts. Failures of Coana, Socket's backend or the CLI still abort.Do not merge before Coana releases coana-tech/coana-package-manager#2928 and
v1.xpins that release. Until then Coana writesskipEcosystems, so depscan would also skip a left-out root's manifest files.CONTINUE_ON_RESOLUTION_ERRORS_MIN_COANA_VERSIONand the changelog entry then move from 15.15.11 (the first release with #2923, which reports what a failed build read) to that release.What happens to a left-out root
socket scan create: the scan reads its manifest files as it does without--dynamic-sbom-inference.socket scan create --reach: the same, but reachability analysis leaves it out.socket scan reach,socket fix: the analysis leaves it out.socket manifest dynamic-sbom-inference: exits successfully when every failure was left out; text output marks the root(left out), JSON outcomes carryblame,reasonandskipped.What a failed build holds back
projectdirectory) still run.Behaviour
socket.jsonskip carries Coana's blame too, so the flag can leave it out.--reach-version.--continue-on-resolution-errorsat the prefixed flag, as they do for--ignore-unresolvedand--build-timeout.socket.jsonsetting.Tests
generate-recursive-manifests.test.mts: what a failed reactor holds back for known, unknown and unreported modules, and for a Coana failure, with and without the flag.run-manifest-facts.test.mts: Coana's blame and projects, an empty project list read as unreported, and the minimum Coana version.run-dynamic-sbom-inference.test.mts: the warningsscan create,scan create --reachandscan reachgive for a left-out root;handle-manifest-dynamic-sbom-inference.test.mts: skipped failures succeed, others fail and name the flag only for a project's own failure.reject-manifest-only-flags.test.mts: the pointer for--continue-on-resolution-errorsand its negation.