Skip to content

Commit c082471

Browse files
WIP: reword warlock false-positive strings in context-mill content (#218)
Reword threat-shaped-but-benign strings so the wizard's warlock scanner stops flagging context-mill's own content as security findings. Covers the authored strings only (example-app demo copy, commandments.yaml, audit skill text). Fetched-doc and wizard-contract cases tracked separately. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 009cde8 commit c082471

39 files changed

Lines changed: 41 additions & 41 deletions

File tree

context/commandments.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ commandments:
4444
- posthog-js is the JavaScript SDK package name
4545
- posthog.init() MUST be called before any other PostHog methods (capture, identify, etc.)
4646
- posthog-js is browser-only — do NOT import it in Node.js or server-side contexts (use posthog-node instead)
47-
- Autocapture is ON by default with posthog-js (tracks clicks, form submissions, pageviews). Do NOT disable autocapture unless the user explicitly requests it.
47+
- Autocapture is ON by default with posthog-js (tracks clicks, form submissions, pageviews). Keep autocapture enabled unless the user explicitly asks to turn it off.
4848
- NEVER send PII in posthog.capture() event properties — no emails, full names, phone numbers, physical addresses, IP addresses, or user-generated content
4949
- PII belongs in posthog.identify() person properties (email, name, role), NOT in capture() event properties
5050
- Call posthog.identify(userId, { email, name, role }) on login AND on page refresh if the user is already logged in
5151
- Call posthog.reset() on logout to unlink future events from the current user
5252
- For SPAs without a framework router, capture pageviews with posthog.capture($pageview) or use the capture_pageview history_change option in init for History API routing
5353

5454
javascript_node:
55-
- posthog-node is the Node.js server-side SDK package name – do NOT use posthog-js on the server
55+
- posthog-node is the Node.js server-side SDK package name; posthog-js is browser-only, so use posthog-node on the server instead
5656
- 'Include enableExceptionAutocapture: true in the PostHog constructor options'
5757
- Add posthog.capture() calls in route handlers for meaningful user actions – every route that creates, updates, or deletes data should track an event with contextual properties
5858
- Add posthog.captureException(err, distinctId) in the application's error handler (e.g., Express error middleware, Fastify setErrorHandler, Koa app.on('error'))
@@ -143,7 +143,7 @@ commandments:
143143

144144
tanstack-start:
145145
- Use PostHogProvider in the root route (__root.tsx) for client-side tracking
146-
- Use posthog-node for server-side event capture in API routes (src/routes/api/) - do NOT use posthog-js on the server
146+
- Use posthog-node for server-side event capture in API routes (src/routes/api/) posthog-js is browser-only
147147
- Create a singleton PostHog server client to avoid re-initialization on every request
148148

149149
laravel:

context/skills/audit-attribution/description.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Every finding produced by this skill must meet the standards in [posthog-best-pr
6363
## Abort statuses
6464

6565
Report abort states with `[ABORT]` prefixed messages. The wizard catches these and terminates the run — do not halt yourself.
66-
- No PostHog SDK initialization found
66+
- PostHog SDK initialization not found
6767

6868
## Framework guidelines
6969

context/skills/audit-attribution/references/1-presence.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Run **two `Grep` calls in parallel**, both with `output_mode: "files_with_matche
3232

3333
### b. Abort or continue
3434

35-
- **Init grep returns zero hits anywhere in the project:** emit `[ABORT] No PostHog SDK initialization found` and stop. The wizard catches `[ABORT]` and terminates the run. Do NOT seed the ledger in this case.
35+
- **Init grep returns zero hits anywhere in the project:** emit `[ABORT] PostHog SDK initialization not found` and stop. The wizard catches `[ABORT]` and terminates the run. Do NOT seed the ledger in this case.
3636
- **Init found:** continue to (c). Even projects with no explicit click-id capture rely on PostHog's built-in UTM auto-capture; each step's individual rules decide whether to skip or warn based on the kind of evidence present.
3737

3838
### c. Seed the audit ledger

context/skills/audit-autocapture/description.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ After the final step writes the report, delete `.posthog-audit-checks.json`.
6565

6666
Report abort states with `[ABORT]` prefixed messages. The wizard catches these and terminates the run — do not halt yourself.
6767

68-
- No PostHog SDK initialization found (no `posthog.init` anywhere in the codebase)
68+
- PostHog SDK initialization not found (no `posthog.init` anywhere in the codebase)
6969

7070
## Framework guidelines
7171

context/skills/audit-autocapture/references/1-presence.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ If init sites are found, `Read` each file once and inspect the init options for
2929

3030
## Decision
3131

32-
- **Grep returns zero hits anywhere in the project:** emit `[ABORT] No PostHog SDK initialization found` and stop. The wizard catches `[ABORT]` and terminates the run.
32+
- **Grep returns zero hits anywhere in the project:** emit `[ABORT] PostHog SDK initialization not found` and stop. The wizard catches `[ABORT]` and terminates the run.
3333
- **Init found, `autocapture: false` is explicitly set on every init site:** autocapture is fully off. Resolve all three Step 2 fix checks (`autocapture-intentional`, `autocapture-mask-config`, `autocapture-allowlists`) in a single `audit_resolve_checks` call with `status: "pass"` and `details: "skip: autocapture explicitly disabled in init config"`. Then continue to Step 3 — optimize-side checks still have work to do for the dead-clicks and ratio checks.
3434
- **Init found, autocapture not fully disabled:** continue normally.
3535

context/skills/audit-events/description.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ After the final step writes the report, delete `.posthog-audit-checks.json`.
6565

6666
Report abort states with `[ABORT]` prefixed messages. The wizard catches these and terminates the run — do not halt yourself.
6767

68-
- No PostHog SDK initialization found (no `posthog.init` and no `posthog.capture` anywhere in the codebase)
68+
- PostHog SDK initialization not found (no `posthog.init` and no `posthog.capture` anywhere in the codebase)
6969

7070
## Framework guidelines
7171

context/skills/audit-events/references/1-presence.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Run **two `Grep` calls in parallel**, both with `output_mode: "files_with_matche
2323

2424
## Decision
2525

26-
- **Both greps return zero hits anywhere in the project:** emit `[ABORT] No PostHog SDK initialization found` and stop. The wizard catches `[ABORT]` and terminates the run.
26+
- **Both greps return zero hits anywhere in the project:** emit `[ABORT] PostHog SDK initialization not found` and stop. The wizard catches `[ABORT]` and terminates the run.
2727
- **Init found, capture not found:** continue. Step 2 (fix) will detect this and resolve its four ledger checks with skip details. Step 3 (optimize) still has work to do because pageview defaults and downstream usage may still matter.
2828
- **Both found:** continue normally.
2929

context/skills/audit-identify/description.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ After the final step writes the report, delete `.posthog-audit-checks.json`.
6666

6767
Report abort states with `[ABORT]` prefixed messages. The wizard catches these and terminates the run — do not halt yourself.
6868

69-
- No PostHog SDK initialization found (no `posthog.init` and no `posthog.identify` anywhere in the codebase)
69+
- PostHog SDK initialization not found (no `posthog.init` and no `posthog.identify` anywhere in the codebase)
7070

7171
## Framework guidelines
7272

context/skills/audit-identify/references/1-presence.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Run **two `Grep` calls in parallel**, both with `output_mode: "files_with_matche
2323

2424
## Decision
2525

26-
- **Both greps return zero hits anywhere in the project:** emit `[ABORT] No PostHog SDK initialization found` and stop. The wizard catches `[ABORT]` and terminates the run.
26+
- **Both greps return zero hits anywhere in the project:** emit `[ABORT] PostHog SDK initialization not found` and stop. The wizard catches `[ABORT]` and terminates the run.
2727
- **Init found, identify not found:** continue. Step 2 (fix) will detect this and resolve its four ledger checks with skip details. Step 3 (optimize) still has work to do because `person_profiles` config still matters even without identify calls.
2828
- **Both found:** continue normally.
2929

context/skills/audit-session-replay/references/2-session-replay-fix.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Emit one `mcp__wizard-tools__audit_resolve_checks` call with a single update for
8181
```
8282
You are an audit subagent. Resolve exactly one rule and return: replay-disabled-in-test-envs.
8383
84-
Read this skill's bundled `how-to-control-which-sessions-you-record.md` reference once (typically `.claude/skills/audit-session-replay/references/how-to-control-which-sessions-you-record.md`; otherwise discover with `Glob` `**/skills/audit-session-replay/references/how-to-control-which-sessions-you-record.md`). Test and CI runs that don't disable session replay flood the recording pipeline with synthetic, useless sessions that consume your replay quota.
84+
Read this skill's bundled `how-to-control-which-sessions-you-record.md` reference once (typically `.claude/skills/audit-session-replay/references/how-to-control-which-sessions-you-record.md`; otherwise discover with `Glob` `**/skills/audit-session-replay/references/how-to-control-which-sessions-you-record.md`). Test and CI runs that leave session replay enabled flood the recording pipeline with synthetic, useless sessions that consume your replay quota.
8585
8686
Run **three** Greps in parallel:
8787
- `posthog\.init\(|new PostHog\(|posthog\.Posthog\(|Posthog\(` — every PostHog initialization.

0 commit comments

Comments
 (0)