seamshield 0.1.0 → 0.1.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/README.md +127 -0
  2. package/package.json +30 -3
package/README.md ADDED
@@ -0,0 +1,127 @@
1
+ # SeamShield
2
+
3
+ SeamShield is the security layer for AI-built JavaScript and TypeScript apps. It scans for the predictable flaws that vibecoded projects ship: committed secrets, client-exposed server keys, client-only auth, open platform rules, unsafe agent config, and dependency supply-chain risks.
4
+
5
+ The current product surface is:
6
+
7
+ - `npx seamshield scan` - CLI scanner with table, JSON, and SARIF output.
8
+ - `npx seamshield fix-plan` - writes agent-ready remediation prompts.
9
+ - `npx seamshield agent-context` - writes SeamShield instructions for Claude Code or Cursor.
10
+ - `npx seamshield guard install` / `guard check` - Claude Code PreToolUse guard for insecure edits and commands.
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ npm install -g seamshield
16
+ # or
17
+ npx seamshield scan .
18
+ ```
19
+
20
+ Requires Node.js 20 or newer.
21
+
22
+ ## Scan
23
+
24
+ ```bash
25
+ npx seamshield scan .
26
+ npx seamshield scan . --format json
27
+ npx seamshield scan . --format sarif
28
+ npx seamshield scan . --fail-on high
29
+ npx seamshield scan . --offline
30
+ ```
31
+
32
+ Exit codes:
33
+
34
+ - `0` - no findings at or above the selected `--fail-on` threshold.
35
+ - `1` - findings at or above the threshold.
36
+ - `2` - CLI usage or scanner failure.
37
+
38
+ `--offline` disables npm registry and OSV checks. Static rules still run.
39
+
40
+ ## Fix Plan
41
+
42
+ ```bash
43
+ npx seamshield fix-plan .
44
+ ```
45
+
46
+ This writes `.seamshield/fix-plan.json` with:
47
+
48
+ - the finding list,
49
+ - redacted evidence,
50
+ - per-finding `agent_prompt` text,
51
+ - one combined `agent_markdown` block for Claude Code, Cursor, or another coding agent.
52
+
53
+ ## Agent Context
54
+
55
+ ```bash
56
+ npx seamshield agent-context . --claude
57
+ npx seamshield agent-context . --cursor
58
+ ```
59
+
60
+ Claude writes or updates `CLAUDE.md`. Cursor writes `.cursor/rules/seamshield.mdc`.
61
+
62
+ ## Claude Code Guard
63
+
64
+ ```bash
65
+ npx seamshield guard install .
66
+ ```
67
+
68
+ The guard installs a Claude Code `PreToolUse` hook for `Write`, `Edit`, `MultiEdit`, and `Bash`.
69
+
70
+ It denies block-severity edits such as hardcoded provider keys, service-role keys, private keys, committed dotenv files, open Firebase rules, or RLS disablement. Bash checks deny obvious dangerous commands such as `git add .env*`, `curl ... | sh`, and installs of npm packages that do not resolve.
71
+
72
+ Guard behavior is fail-open: if the hook errors, it allows the tool call and appends diagnostics to `.seamshield/guard.log`. CI/release gates should stay fail-closed.
73
+
74
+ ## Configuration
75
+
76
+ Create `.seamshield/config.yaml`:
77
+
78
+ ```yaml
79
+ ignore:
80
+ - vendored/**
81
+ rules:
82
+ disable:
83
+ - ss/auth/client-only-guard
84
+ ```
85
+
86
+ Suppress a single finding inline:
87
+
88
+ ```ts
89
+ // seamshield-ignore ss/secrets/hardcoded-provider-key
90
+ const fixtureKey = "sk_live_test_fixture_only";
91
+ ```
92
+
93
+ ## Privacy
94
+
95
+ SeamShield v0.x runs locally. Static scanning does not transmit source code. Network dependency checks send package names and versions to the npm registry and OSV only; use `--offline` to disable them. Secret evidence is redacted before findings, JSON, SARIF, and fix plans are emitted.
96
+
97
+ ## Rule Coverage
98
+
99
+ The rule pack covers:
100
+
101
+ - secrets and client exposure,
102
+ - Next.js auth footguns,
103
+ - Supabase, Convex, and Firebase platform mistakes,
104
+ - dependency lockfile, pinning, hallucinated-package, and OSV vulnerability checks,
105
+ - agent config secrets and overbroad permissions.
106
+
107
+ Rules map back to the SeamShield framework files under `seamshield-final-framework/` and `AI_AGENT_DROP_IN.md`.
108
+
109
+ ## Development
110
+
111
+ ```bash
112
+ pnpm install
113
+ pnpm build
114
+ pnpm test
115
+ pnpm typecheck
116
+ ```
117
+
118
+ Before publishing:
119
+
120
+ 1. Revoke any exposed npm token and mint a fresh token.
121
+ 2. Run `pnpm build`, `pnpm test`, and `pnpm typecheck`.
122
+ 3. Verify `node packages/cli/dist/index.js scan examples/vulnerable-next-app --offline`.
123
+ 4. Publish from `packages/cli` after confirming package contents with `npm pack --dry-run`.
124
+
125
+ ## Framework
126
+
127
+ The original SeamShield framework remains in `seamshield-final-framework/`: Runtime, Artifact, Update, and Evidence planes; OPA policies; schemas; validators; and adoption guidance.
package/package.json CHANGED
@@ -1,13 +1,39 @@
1
1
  {
2
2
  "name": "seamshield",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Security scanner for AI-generated apps: finds the flaws vibecoded projects predictably ship",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
+ "homepage": "https://github.com/KaraboGerald/SeamShield#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/KaraboGerald/SeamShield.git",
11
+ "directory": "packages/cli"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/KaraboGerald/SeamShield/issues"
15
+ },
16
+ "keywords": [
17
+ "security",
18
+ "scanner",
19
+ "cli",
20
+ "ai",
21
+ "vibecoding",
22
+ "secrets",
23
+ "sast",
24
+ "nextjs",
25
+ "supabase",
26
+ "firebase",
27
+ "claude-code",
28
+ "cursor",
29
+ "osv",
30
+ "sarif"
31
+ ],
7
32
  "bin": {
8
- "seamshield": "./dist/index.js"
33
+ "seamshield": "dist/index.js"
9
34
  },
10
35
  "files": [
36
+ "README.md",
11
37
  "dist",
12
38
  "rules",
13
39
  "schemas"
@@ -16,7 +42,8 @@
16
42
  "node": ">=20"
17
43
  },
18
44
  "scripts": {
19
- "build": "tsup src/index.ts --format esm --clean && tsc -p tsconfig.build.json && rm -rf rules schemas && cp -R ../rules/rules ../rules/schemas .",
45
+ "build": "tsup src/index.ts --format esm --clean && tsc -p tsconfig.build.json && rm -rf rules schemas && cp -R ../rules/rules ../rules/schemas . && cp ../../README.md README.md",
46
+ "prepack": "pnpm run build",
20
47
  "test": "vitest run"
21
48
  },
22
49
  "dependencies": {