Repository navigation
feat(scan): add --dynamic-sbom-inference-ignore-unresolved - #1818
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 1 commit into
Conversation
Scanning many repositories with --dynamic-sbom-inference needed a socket.json in each to tolerate unresolved dependencies. The new flag on scan create, scan reach and fix applies to every build and overrides socket.json, as --ignore-unresolved does on the manifest command. The scan commands do not declare --ignore-unresolved, --exclude-configs, --include-configs or --verbose, so each could take the scan target as its value. They are now rejected with a pointer to the flag or socket.json setting to use instead. DynamicSbomInference now carries the selected ecosystems and the ignore-unresolved override together.
PR SummaryMedium Risk Overview Dynamic SBOM options are now a
Reviewed by Cursor Bugbot for commit 3ac31b0. Configure here. |
Adds
--dynamic-sbom-inference-ignore-unresolvedtosocket scan create,socket scan reachandsocket fix, so many repositories can be scanned with--dynamic-sbom-inferencewithout asocket.jsonin each. It tolerates unresolved dependencies in every build and overridesignoreUnresolvedfromsocket.json,buildsentries included.The scan commands now reject
--ignore-unresolved,--exclude-configs,--include-configsand--verbose. They never declared them, so each silently took the next argument, which can be the scan target, as its value. The error names the flag or thesocket.jsonsetting to use instead.Why only this setting
It is the only build setting that is the same across unrelated repositories. Java homes, build tool binaries, options and configurations are per repository and stay in
socket.json.Implementation notes
DynamicSbomInference = { ignoreUnresolved, purlTypes }replaces the bare purl type list passed from the commands to facts generation, so later options join it as fields.dynamicSbomInferenceFlags; giving one without--dynamic-sbom-inferenceis an input error.Tests
reachability-flags.test.mts: parsing, and the requires---dynamic-sbom-inferenceerror.reject-manifest-only-flags.test.mts: each rejected flag and its message.run-dynamic-sbom-inference.test.mts,generate-recursive-manifests.test.mts: the override reaches every build,buildsentries included.