Skip to content

feat(scan): add --reach-retain-facts-file to keep the reachability report (1.1.124)#1372

Merged
Martin Torp (mtorp) merged 2 commits into
v1.xfrom
feature/reach-retain-facts-file
Jun 19, 2026
Merged

feat(scan): add --reach-retain-facts-file to keep the reachability report (1.1.124)#1372
Martin Torp (mtorp) merged 2 commits into
v1.xfrom
feature/reach-retain-facts-file

Conversation

@mtorp

@mtorp Martin Torp (mtorp) commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Two changes, shipped together as 1.1.124:

  1. New --reach-retain-facts-file flag on socket scan create --reach (the tier 1 reachability path).
  2. Coana CLI bump 15.5.015.5.4.

--reach-retain-facts-file

By default, after a successful socket scan create --reach, the CLI deletes the .socket.facts.json reachability report that the analysis writes into the scan directory. Some users want to keep that file afterwards (e.g. to inspect or debug the reachability output), which isn't possible today. This flag opts out of the post-scan cleanup so the report is left in place.

  • Default (flag off): unchanged — .socket.facts.json is removed after a successful scan (failed scans already leave it for debugging).
  • --reach-retain-facts-file (flag on): the file is kept.

The flag's help text and the changelog carry an explicit warning:

You must delete the retained .socket.facts.json before running a fresh tier 1 reachability scan. A stale .socket.facts.json left in the scan directory is picked up as a pre-generated input and silently overrides fresh analysis, so the new scan's results will not be reliable.

Changes

  • New reachRetainFactsFile flag in the shared reachability-flags.mts (the --reach-* namespace) and on the ReachabilityOptions type, threaded through the scan-create / scan-reach / CI / GitHub paths.
  • Gated the .socket.facts.json cleanup in handle-create-new-scan.mts on the new flag.
  • Bumped @coana-tech/cli from 15.5.0 to 15.5.4 (package.json + pnpm-lock.yaml). For details on what's in this Coana release, see the Coana Changelogs.
  • Bumped version 1.1.1231.1.124 and added a CHANGELOG.md entry covering both changes.
  • Updated the affected unit tests and regenerated the two --help snapshots.

Verification

  • pnpm check:tsc
  • pnpm check:lint
  • Affected unit tests ✅; --help snapshots rebuilt and passing with Coana 15.5.4 inlined.

Docs

User-facing documentation (CLI reference + tier 1 reachability guide) for the new flag is being updated separately in socketdev/docs.

…port (1.1.124)

By default `socket scan create --reach` deletes the `.socket.facts.json` report from the scan directory after a successful scan. The new `--reach-retain-facts-file` flag opts out of that cleanup so the report can be inspected, with a clear warning that the file must be deleted before the next tier 1 scan: a stale facts file is picked up as a pre-generated input and would make those results unreliable.
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​coana-tech/​cli@​15.5.4741007998100

View full report

@mtorp Martin Torp (mtorp) merged commit 55c80a6 into v1.x Jun 19, 2026
12 checks passed
@mtorp Martin Torp (mtorp) deleted the feature/reach-retain-facts-file branch June 19, 2026 12:31
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