openpitstop 1.9.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/PRIVACY.md +77 -90
  2. package/README.md +365 -887
  3. package/dist/agentBudget.d.ts +33 -0
  4. package/dist/agentBudget.js +165 -0
  5. package/dist/agentBudget.js.map +1 -0
  6. package/dist/analyzers/ledger/index.d.ts +2 -1
  7. package/dist/analyzers/ledger/index.js +10 -1
  8. package/dist/analyzers/ledger/index.js.map +1 -1
  9. package/dist/analyzers/types.d.ts +2 -0
  10. package/dist/candidate.d.ts +20 -0
  11. package/dist/candidate.js +87 -0
  12. package/dist/candidate.js.map +1 -0
  13. package/dist/cli.js +1 -1
  14. package/dist/cli.js.map +1 -1
  15. package/dist/commands/ask.d.ts +0 -8
  16. package/dist/commands/ask.js +36 -34
  17. package/dist/commands/ask.js.map +1 -1
  18. package/dist/commands/budget.d.ts +1 -0
  19. package/dist/commands/budget.js +12 -3
  20. package/dist/commands/budget.js.map +1 -1
  21. package/dist/commands/drive.js +77 -51
  22. package/dist/commands/drive.js.map +1 -1
  23. package/dist/commands/fix.d.ts +7 -0
  24. package/dist/commands/fix.js +90 -108
  25. package/dist/commands/fix.js.map +1 -1
  26. package/dist/commands/gate.js +6 -2
  27. package/dist/commands/gate.js.map +1 -1
  28. package/dist/commands/pen.d.ts +3 -1
  29. package/dist/commands/pen.js +31 -42
  30. package/dist/commands/pen.js.map +1 -1
  31. package/dist/commands/readyCheck.d.ts +1 -1
  32. package/dist/commands/readyCheck.js +6 -36
  33. package/dist/commands/readyCheck.js.map +1 -1
  34. package/dist/commands/scan.d.ts +6 -5
  35. package/dist/commands/scan.js +26 -28
  36. package/dist/commands/scan.js.map +1 -1
  37. package/dist/commands/verify.d.ts +3 -1
  38. package/dist/commands/verify.js +5 -1
  39. package/dist/commands/verify.js.map +1 -1
  40. package/dist/evidence.js +4 -0
  41. package/dist/evidence.js.map +1 -1
  42. package/dist/installer/targets.js +1 -1
  43. package/dist/installer/targets.js.map +1 -1
  44. package/dist/intent.d.ts +4 -7
  45. package/dist/intent.js +41 -77
  46. package/dist/intent.js.map +1 -1
  47. package/dist/pen/dynamic.d.ts +1 -24
  48. package/dist/pen/dynamic.js +10 -1
  49. package/dist/pen/dynamic.js.map +1 -1
  50. package/dist/pen/fix.js +5 -1
  51. package/dist/pen/fix.js.map +1 -1
  52. package/dist/repro/generate.js +1 -0
  53. package/dist/repro/generate.js.map +1 -1
  54. package/dist/repro/pen.js +1 -0
  55. package/dist/repro/pen.js.map +1 -1
  56. package/dist/repro/run.d.ts +1 -0
  57. package/dist/repro/run.js +17 -1
  58. package/dist/repro/run.js.map +1 -1
  59. package/dist/sandbox/container.d.ts +9 -0
  60. package/dist/sandbox/container.js +129 -0
  61. package/dist/sandbox/container.js.map +1 -0
  62. package/dist/sandbox/worker.d.ts +1 -0
  63. package/dist/sandbox/worker.js +41 -0
  64. package/dist/sandbox/worker.js.map +1 -0
  65. package/dist/scanCache.d.ts +27 -0
  66. package/dist/scanCache.js +89 -0
  67. package/dist/scanCache.js.map +1 -0
  68. package/dist/verify/acceptance.d.ts +5 -1
  69. package/dist/verify/acceptance.js +29 -16
  70. package/dist/verify/acceptance.js.map +1 -1
  71. package/dist/verify/architecture.d.ts +5 -1
  72. package/dist/verify/architecture.js +6 -1
  73. package/dist/verify/architecture.js.map +1 -1
  74. package/dist/verify/baseline.d.ts +5 -1
  75. package/dist/verify/baseline.js +5 -1
  76. package/dist/verify/baseline.js.map +1 -1
  77. package/dist/verify/chain.js +17 -0
  78. package/dist/verify/chain.js.map +1 -1
  79. package/dist/verify/flow.d.ts +2 -0
  80. package/dist/verify/flow.js +18 -3
  81. package/dist/verify/flow.js.map +1 -1
  82. package/dist/verify/gateMatrix.d.ts +4 -0
  83. package/dist/verify/gateMatrix.js +23 -12
  84. package/dist/verify/gateMatrix.js.map +1 -1
  85. package/dist/verify/holdout.d.ts +5 -1
  86. package/dist/verify/holdout.js +8 -2
  87. package/dist/verify/holdout.js.map +1 -1
  88. package/dist/verify/regression.d.ts +5 -1
  89. package/dist/verify/regression.js +6 -1
  90. package/dist/verify/regression.js.map +1 -1
  91. package/dist/verify/stack.d.ts +5 -1
  92. package/dist/verify/stack.js +6 -1
  93. package/dist/verify/stack.js.map +1 -1
  94. package/dist/verify/state.d.ts +5 -1
  95. package/dist/verify/state.js +6 -1
  96. package/dist/verify/state.js.map +1 -1
  97. package/dist/verify/verifier.d.ts +5 -1
  98. package/dist/verify/verifier.js +6 -1
  99. package/dist/verify/verifier.js.map +1 -1
  100. package/docs/release-controls.md +107 -0
  101. package/package.json +70 -69
  102. package/templates/pitstop.command.md +17 -5
  103. package/templates/pitstop.prompt.md +390 -390
  104. package/scripts/__pycache__/gen-gifs.cpython-313.pyc +0 -0
  105. package/scripts/gen-gifs.py +0 -231
package/PRIVACY.md CHANGED
@@ -1,90 +1,77 @@
1
- # OpenPitStop Privacy Statement
2
-
3
- **Zero telemetry. Zero SaaS. Zero accounts. Nothing leaves your machine unless
4
- you explicitly ask for it.**
5
-
6
- This is not a marketing sentence — it is a guarantee you can verify. OpenPitStop
7
- is a local CLI: it reads files on your machine, writes reports to
8
- `.pitstop/` on your machine, and makes network calls only in the exact,
9
- explicit cases listed below.
10
-
11
- ## What OpenPitStop never does
12
-
13
- - **No telemetry.** No analytics SDK, no anonymous usage stats, no crash
14
- reporting, no "phone home" of any kind — not even a version check.
15
- - **No SaaS, no accounts, no cloud.** There is no OpenPitStop server, no
16
- dashboard, no login. Nothing to sign up for.
17
- - **No code uploads.** `scan`, `try`, `verify`, `gate`, `integrity`, `pen`,
18
- `ledger`, `watch`, `trends`, `digest`, `share`, `honesty`, `test` — every
19
- one of these analyzes your files locally. Your source never leaves your
20
- machine.
21
- - **No third-party processes** are ever spawned that you didn't initiate
22
- (`scan` runs the scanners you have installed, e.g. `gitleaks`, `semgrep`,
23
- `osv-scanner`, `pip-audit`; `test` runs your own test scripts — or honestly
24
- reports them as `skipped`).
25
- - **The static security pass is fully offline.** It reads files and matches
26
- patterns on your machine; it never sends code anywhere. The only network
27
- calls in the entire security pipeline are the dependency audits listed
28
- below.
29
- - **No auto-updates.** The CLI never updates itself or checks for updates.
30
- You control when you run a newer version (`npx openpitstop@latest`).
31
-
32
- ## The complete list of network calls
33
-
34
- Every outbound connection OpenPitStop (or the tools it invokes) can make:
35
-
36
- | When | What connects | What it sends | Where it goes |
37
- |---|---|---|---|
38
- | You run `npx openpitstop` or `npm i -g openpitstop` | npm client | package download (standard npm request) | registry.npmjs.org |
39
- | `scan`/`try` — security category on a JS repo | `npm audit` | your lockfile's dependency list (the standard npm audit payload) | registry.npmjs.org |
40
- | `scan`/`try` — security category on Python repos | `pip-audit` (if installed) | dependency list | its configured index |
41
- | `scan`/`try` — security category on other stacks | `osv-scanner` (if installed) | manifest/lockfile data | the OSV API (osv.dev) |
42
- | `pen` / `scan --ledger` | *nothing external* | — | none |
43
-
44
- Everything else — including the entire `pen` and `ledger` dynamic phases — runs
45
- against **your own app on localhost**: outbound HTTP is intercepted in-process
46
- (nock) or rerouted to a local recording proxy, raw sockets are blocked, and
47
- known payment-gateway hosts are answered with mocked receipts. If a request
48
- cannot be intercepted, the run **aborts** (`exit 77`) rather than letting it
49
- through. Nothing your app says ever reaches a real payment gateway or any real
50
- third party.
51
-
52
- Audit results (`npm audit`, `osv-scanner`) are cached locally for 24 hours
53
- (keyed on your lockfile's hash) so repeated scans inside one fix loop don't hit
54
- the registry again — the cache is a local file, deleted when you delete it.
55
-
56
- ## What OpenPitStop stores
57
-
58
- All local, all in your repo:
59
-
60
- - `.pitstop/` — sealed scan/verify/pen/ledger evidence, audit caches, memory
61
- notes. Human-readable JSON, signed with a `sha256` fingerprint so the files
62
- are tamper-evident (and so *you* can detect any tampering).
63
- - `PITSTOP_REPORT.md`, `PITSTOP_PEN_REPORT.md`, `PITSTOP_BADGE.svg`,
64
- `PITSTOP_CARD.html` — the reports you explicitly asked for.
65
- - `PITSTOP_BADGE.json` — only with `report --badge-json`; it contains the
66
- score, nothing else.
67
-
68
- Nothing is written outside your project except the `/pitstop` slash-command
69
- files that `pitstop install` places in your AI tool's own config directories —
70
- and `install --uninstall` removes exactly those files and nothing else.
71
-
72
- ## How to verify all of this
73
-
74
- 1. **Read the source.** The CLI is fully open (MIT). The network surface is
75
- small and greppable: `npm audit`, `osv-scanner`, `pip-audit`, and the
76
- localhost-only sandbox in `src/sandbox/` are the entire surface.
77
- 2. **Watch it with a firewall.** Run `npx openpitstop scan` with your
78
- firewall in "ask" mode: the only connections you'll be asked about are the
79
- npm/osv audits above — and none at all during `pen` or `ledger`.
80
- 3. **Disconnect.** `scan`, `verify`, `gate`, `integrity`, `pen`, `ledger`
81
- (ledger replays against your app locally) all run fully offline. Only the
82
- dependency-audit categories degrade (to an honest `skipped` with a hint) —
83
- they never block or fake anything.
84
-
85
- ## The short version
86
-
87
- > OpenPitStop is a referee that lives on your machine. It keeps score in your
88
- > repo, ships no data anywhere, and calls out any network at all — because the
89
- > whole point is that the numbers can't be argued with. If we ever needed a
90
- > server, the honesty brand would die with it; so we won't.
1
+ # OpenPitStop privacy and execution boundaries
2
+
3
+ OpenPitStop is a local CLI with no telemetry service, hosted account requirement or
4
+ automatic update checker. Its built-in intent routing and static pattern analysis do
5
+ not call a language model. External tools, repository scripts and an explicitly launched
6
+ coding agent have their own behavior and privacy policies.
7
+
8
+ ## Network activity
9
+
10
+ | Operation | Possible connection and data |
11
+ |---|---|
12
+ | npm installation / npx | Package downloads from the configured registry |
13
+ | Dependency audits | npm audit, pip-audit or osv-scanner may send dependency information to their configured services |
14
+ | Opt-in Semgrep | Registry configurations may download rules; behavior also depends on the installed tool's configuration |
15
+ | Tests, builds, verification commands and app startup | Execute repository/operator-defined code, which can access the network with the current process permissions |
16
+ | HTTP acceptance criteria | Send the requests declared in the acceptance contract |
17
+ | Live pen / ledger | Run inside a Linux Docker container with networking disabled; the preload/proxy records supported traffic internally |
18
+ | External coding agent (`drive` or your host CLI) | May send prompts and repository context to its configured provider and consume provider credits |
19
+
20
+ The built-in static pass does not upload source. This is not a blanket guarantee about
21
+ the external tools or scripts invoked by a full workflow. To require offline execution,
22
+ enforce it with a firewall or isolated environment; disconnected audits may report skipped
23
+ results, and network-dependent verification may fail.
24
+
25
+ ## Live testing
26
+
27
+ Live pen, ledger and their replay tests require Docker. The app and attack runner share
28
+ a disposable container with networking disabled, a read-only root, a non-root user,
29
+ no Linux capabilities, and resource limits. Only a sanitized staging copy is mounted
30
+ read-only. The real repository, host home, Docker socket and environment credentials
31
+ are not mounted or forwarded. Common credential filenames and `.env*` are omitted;
32
+ secrets embedded in ordinary source files are still part of that source.
33
+
34
+ The preload/proxy provides observation inside the OS boundary. Containers share the
35
+ host kernel and are not a guarantee against kernel/runtime vulnerabilities. Use
36
+ a maintained Docker installation and a trusted runtime image. Ordinary tests, builds
37
+ and acceptance commands outside live security retain their documented host permissions.
38
+
39
+ ## Stored data
40
+
41
+ - `.pitstop/`: scan and verification results, security evidence, activity history,
42
+ dependency-audit caches, plans, memory and content snapshots for scan reuse.
43
+ - `PITSTOP_*` reports, HTML cards and badges requested by the workflow.
44
+ - Generated `pitstop-repro-*` tests and patch proposals. Automatic `fix` can apply
45
+ supported source patches on a new branch; `--no-apply` still writes repros and reports.
46
+ - Installation writes command/skill files in the displayed project and user locations;
47
+ optional hooks change the repository's git hooks.
48
+ - Deep verification creates temporary worktrees. Holdout and acceptance configuration
49
+ can live outside the repository, and holdout full evidence is stored externally.
50
+
51
+ Scan snapshots contain file paths and hashes, not file bodies or raw environment values.
52
+ Other reports and evidence may contain snippets, request/response information or sensitive
53
+ findings. Review artifacts before publishing them or sending them to an agent.
54
+
55
+ Evidence digests detect content changes that do not update the digest. They are not
56
+ authenticated signatures and do not protect against a writer who recomputes the hash.
57
+ Use trusted CI and filesystem permissions for authoritative evidence and hidden holdouts.
58
+
59
+ ## Costs and retention
60
+
61
+ Local checks do not use model credits. `budget` reports recorded activity and test/build
62
+ time; it does not know your provider's bill. External agent usage is charged according
63
+ to that agent's provider configuration. Drive enforces shared launch/time/prompt
64
+ limits and records reservations in `.pitstop/agent-budget-latest.json`. An optional
65
+ dollar ceiling delegates enforcement to a supported provider; unsupported providers
66
+ refuse it. Actual tokens and actual cost remain explicitly unknown.
67
+
68
+ Dependency audits use local caches; full scan reuse has its own bounded freshness policy.
69
+ Artifacts persist locally until removed. Keep baselines and repros needed by your
70
+ verification workflow; removing them removes that evidence, not the underlying risk.
71
+
72
+ ## Inspect the implementation
73
+
74
+ Start with `src/analyzers/security.ts`, `src/sandbox/`, `templates/pen/preload.cjs`,
75
+ `src/commands/drive.ts`, `src/verify/acceptance.ts` and `src/scanCache.ts`.
76
+ See [release controls](docs/release-controls.md) for enforced boundaries and remaining
77
+ limits, and the [engineering assessment](docs/engineering-review.md) for the broader review.