@stroq/cli 0.5.0 → 0.5.1

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 (2) hide show
  1. package/DISCLOSURE +68 -0
  2. package/package.json +12 -8
package/DISCLOSURE ADDED
@@ -0,0 +1,68 @@
1
+ Dual-use disclosure for @stroq/cli
2
+ ===================================
3
+
4
+ Stroq is an open-source (Apache-2.0) local "action firewall" for AI coding
5
+ agents such as Claude Code, Cursor and OpenAI Codex CLI. It is a defensive
6
+ security tool. It runs entirely on the developer's own machine, and it makes
7
+ no network requests of its own: the strings `fetch(`, `curl ... | sh`,
8
+ `base64 -d`, `~/.ssh/id_rsa` and similar that appear in this package are
9
+ detection rules and recorded attack fixtures, not code paths that execute
10
+ them. Source, tests and the rule corpus: https://github.com/AGGIB/Stroq
11
+
12
+ Why an automated scanner may flag this package
13
+ ----------------------------------------------
14
+
15
+ 1. It reads credential files, locally, to protect them.
16
+ `stroq` builds an index of secret VALUES from the project's `.env*` files
17
+ and from `~/.aws/credentials`, `~/.npmrc`, `~/.netrc` and
18
+ `~/.docker/config.json`, so that it can refuse any agent action whose
19
+ arguments would send one of those values somewhere (the "secret egress
20
+ guard"). Only salted SHA-256 hashes are stored (`~/.stroq/secrets.json`);
21
+ the values themselves are never written to disk, never logged, never
22
+ transmitted, and are redacted from the audit trail. Credential-shaped
23
+ environment variables are hashed in memory only.
24
+
25
+ 2. It installs hooks into other programs' configuration, on request.
26
+ `stroq init` writes hook entries into `.claude/settings.json`,
27
+ `.cursor/hooks.json` or `.codex/hooks.json` (project or user scope), so the
28
+ agent calls `stroq hook <agent>` before and after each tool use. It only
29
+ does this when the user runs `stroq init`; it never modifies those files
30
+ otherwise, and it refuses to let a compromised agent session modify them.
31
+
32
+ 3. It ships an attack corpus.
33
+ `stroq attack` replays twelve recorded, incident-backed prompt-injection
34
+ scenarios (a protestware README, poisoned MCP results, `curl | sh`
35
+ installers, base64-encoded installers, a `~/.ssh/id_rsa` fetch, `rm -rf ~`,
36
+ secret exfiltration through `curl`) through the user's own policy in
37
+ throwaway directories, and reports which ones were blocked. The payloads
38
+ are data used to test the firewall; nothing in them is executed.
39
+
40
+ 4. It contains a large prompt-injection rule bundle.
41
+ Hundreds of regular expressions (Agent Threat Rules format) describe
42
+ malicious instructions so that they can be recognised in files, web pages,
43
+ MCP responses and command output that an agent reads. Their text
44
+ necessarily looks like the attacks they detect.
45
+
46
+ What the package does not do
47
+ ----------------------------
48
+
49
+ - No network I/O, no telemetry, no remote configuration, no auto-update.
50
+ - No install-time scripts (`preinstall`/`postinstall`/`prepare`).
51
+ - No reading of secrets beyond the files listed above, and no use of their
52
+ values other than comparing hashes.
53
+ - No modification of any file except `~/.stroq/*` (its own state), the
54
+ agent hook files written by an explicit `stroq init`, and the temporary
55
+ directories `stroq attack` creates and removes for its replay.
56
+
57
+ Intended legitimate use
58
+ -----------------------
59
+
60
+ Developers and security teams install it next to their AI coding agent so
61
+ that a prompt injection in a README, an issue comment, a web page or an MCP
62
+ result cannot turn into a `curl | sh`, a credential exfiltration, a
63
+ destructive command or a self-disabling edit of the agent's configuration.
64
+ Every decision is written to a hash-chained local audit log (`stroq log`,
65
+ `stroq verify`, `stroq why`).
66
+
67
+ Contact: https://github.com/AGGIB/Stroq/issues (security reports: see
68
+ SECURITY.md in the repository).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stroq/cli",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Local action firewall for AI agents: scans what the agent reads, taints the session, blocks dangerous follow-up actions",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -10,8 +10,12 @@
10
10
  "files": [
11
11
  "dist",
12
12
  "README.md",
13
- "LICENSE"
13
+ "LICENSE",
14
+ "DISCLOSURE"
14
15
  ],
16
+ "contentPolicy": {
17
+ "class": "dual-use"
18
+ },
15
19
  "engines": {
16
20
  "node": ">=22"
17
21
  },
@@ -36,15 +40,15 @@
36
40
  "publishConfig": {
37
41
  "access": "public"
38
42
  },
39
- "scripts": {
40
- "build": "tsup",
41
- "typecheck": "tsc --noEmit -p tsconfig.json"
42
- },
43
43
  "dependencies": {
44
44
  "yaml": "2.9.0",
45
45
  "zod": "4.5.4"
46
46
  },
47
47
  "devDependencies": {
48
- "@stroq/core": "workspace:*"
48
+ "@stroq/core": "0.5.1"
49
+ },
50
+ "scripts": {
51
+ "build": "tsup",
52
+ "typecheck": "tsc --noEmit -p tsconfig.json"
49
53
  }
50
- }
54
+ }