Repository navigation
Description
Summary
--offline is described as refusing "any connection that would leave this machine", but spackle scan --offline --pr still runs git push origin and gh pr create. Nothing checks --offline before the pull request step, and docs/PRIVACY.md tells readers to use --offline for "a run with no outside traffic" without naming --pr as an exception.
Where
internal/cli/flags.go:89:--offlinehelp, "refuse any connection that would leave this machine"internal/engine/agentic.go:545:if r.cfg.Fix.PR && !st.interrupted { ... r.lab.openPR(ctx, branch, fixed)with no offline checkinternal/gitx/pr.go:38:run(ctx, req.Dir, "push", "--set-upstream", "origin", req.Branch)internal/config/config.go: validation has no rule forofflinetogether with[fix] prdocs/PRIVACY.md:98,docs/PRIVACY.md:105: the list of what offline mode does not start leaves out--pr
Details
Offline mode already refuses the other outbound steps it controls: a git URL target (internal/engine/run.go:158), the network scanners (run.go:276), and image pulls (prove.go:109). The pull request step is the one outbound action Spackle starts itself that is not covered.
Impact
Someone who combines --offline with --pr (or has pr = true in [fix] and passes --offline) gets a push to their remote and a call to GitHub despite asking for no outside traffic. It needs both options, so it is not common, but it contradicts the flag's own help.
Suggested fix
Refuse the combination with exit code 2, the way a git URL target is refused in offline mode ("--pr pushes a branch and calls gh, which would leave this machine; drop --offline or --pr"). Then add --pr to the PRIVACY.md list of things offline mode does not start.
Acceptance criteria
-
spackle scan <dir> --offline --prexits 2 with a clear message and pushes nothing - Same when
pr = truecomes from config - A test covers both
- docs/PRIVACY.md and the CHANGELOG mention it
Getting started
- Relevant files:
internal/config/config.go(validation) orinternal/engine/run.go(the existing offline refusals),docs/PRIVACY.md - How to run tests:
go test -short ./...
Filed by repo-audit/docs-audit at 82a8ded. Severity: medium. Effort: S. audit-key: bug|internal/engine/agentic.go|offline-pr
Activity
TMHSDigital commentedon Nov 28, 2026
Fixed in 766949b: a scan with offline mode and [fix] pr (flag or config) is now refused with exit code 2 before anything runs; a run with fixes off is not refused. The MCP server is covered too. Verified with a new case in TestOfflineSkipsNetworkScannersAndRefusesClones that fails without the change, plus the short suite and lint. PRIVACY.md, config.md and the CHANGELOG list it.