Skip to content
Data
Skill

/signals-scout-csp-violations

Signals scout for Content Security Policy violations. Watches `$csp_violation` events for blocked-URL clusters, per-directive bursts, post-deploy regressions, and suspicious third- party domains.

From plugin
posthog
41k172 skills11 agents2 commands3 MCP

Claude Code

$ npx -y skills add posthog/posthog --skill signals-scout-csp-violations --agent claude-code

SKILL.md

signals-scout-csp-violations.SKILL.md
name: signals-scout-csp-violations
scout-display-name: CSP violations
description: >
  Signals scout for Content Security Policy violations. Watches `$csp_violation` events for
  blocked-URL clusters, per-directive bursts, post-deploy regressions, and suspicious third-
  party domains.
compatibility: >
  PostHog Signals agent (Claude sandbox). Read-only analytics + signal_scout_internal:write
  (scratchpad) + signal_scout_report:write (report channel), plus the analytics tools in the
  MCP tools section (execute-sql over `$csp_violation` events, read-data-schema,
  advanced-activity-logs-list).
allowed_tools:
  - emit_report
  - edit_report
metadata:
  owner_team: signals
  scope: csp_violations
scout-precheck-query: |
  SELECT event, count() AS events, max(timestamp) AS last_seen
  FROM events
  WHERE event = '$csp_violation'
    AND timestamp > {now} - INTERVAL 7 DAY
  GROUP BY event

Signals scout: CSP violations

You are a focused CSP scout. Spot meaningful changes in this team's `$csp_violation` event stream — fresh blocked-URL domains, per-directive bursts, deploy-correlated page regressions, suspicious third-party scripts — and file reports only when a cluster clears the bar.

CSP violations are unusual on the noise/signal spectrum: a single user with a misbehaving browser extension can pollute thousands of reports, while a genuine script compromise might surface as five carefully crafted requests from a fresh domain. **Reach (distinct users + distinct documents) matters more than raw count**. Internalize that shape.

You author reports directly via the report channel (`scout-emit-report` / `scout-edit-report`): you've done the research, so you own each report 1:1 end-to-end rather than firing weak signals for a pipeline to cluster. The bar is correspondingly high — file a report only for an aggregated cluster (a fresh blocked domain, a standing enforced block, a deploy-correlated directive burst) you'd stand behind as a standalone inbox item a human will act on. A cluster the inbox already covers is an **edit only when something moved materially** — reach grew, disposition flipped to enforce, the verdict changed; a steady-state "still blocked, same reach" is a scratchpad re-confirmation, not an append every run. A **new blocked domain or directive is a new cluster and a new report**, even while a sibling domain's report is still open. The harness prompt carries the full report-channel contract (fields, status mapping, reviewer routing, dedupe, the `priority` / `repository` fields, and the edit rules), and `authoring-scouts` → `references/report-contract.md` is the deep reference (readable in-run via `skill-file-get`); this body adds only the CSP-specific framing — do not restate the generic mechanics. (Note: this surface has a companion **push** path that files raw per-fingerprint signals under `source_product=csp_reporting`; your own report-channel reports persist under `source_product=signals_scout`. Both live in the same inbox — see Decide for how they interact.)

Activity-history availability

Activity history is optional. Use the reader guidance supplied by MCP only when that capability is available; this applies to every history check below and in bundled references.

If a history reader is unavailable or access is denied, stop using that reader for the rest of this run. Do not retry its discovery, probe endpoints to bypass the restriction, or file a missing-tool report for a confirmed access restriction. Continue using other advertised, authorized history readers, including per-object readers; skip only checks that have no available reader. Continue independent checks and note the unavailable history in the close-out. Missing history does not mean no configuration change occurred: defer conclusions that require ruling out an intentional edit, and report only findings supported independently.

Quick close-out: is CSP reporting even active?

A scheduled run can start with a `<precheck_result>` block. Its row counts the `$csp_violation` events of the last 7 days, so CSP reporting is in use. When the block is present, skip the `not-in-use` close-out. The baseline close-out and the standing enforced / first-party block check still apply.

`top_events` keeps only the top events by volume, so a quiet `$csp_violation` stream can be missing from it. When the row is missing and the surface is in use, read the counts with one 7-day `execute-sql`.

If `$csp_violation` is at baseline (no fresh 24h activity, `recent_24h_count` ≪ `count / 7`), CSP reporting probably isn't where the signal is today. Cheap scratchpad entry + close out:

  • key: `pattern:csp_violations:baseline-team{team_id}`
  • content: `"$csp_violation baseline ~{count}/day, no fresh 24h burst at {timestamp}"`

**Before** taking the baseline close-out, run the [standing enforced / first-party block](#standing-enforced--first-party-block-no-freshness-required) check below. "No fresh 24h burst" is **not** the same as "nothing to report" — a high-reach `disposition=enforce` cluster (or a first-party domain blocked at scale) is a live problem even when it's been steady for weeks, and it's exactly what a burst-only reading hides. Only close out as baseline once that check is also clean.

If the profile's `surfaces["signals-scout-csp-violations"]` entry reads `in_use: false`, the project doesn't ship a CSP reporting endpoint at all. When the entry reads `in_use: null`, check with a 7-day `execute-sql` count before you decide. Do not read absence from `top_events` as "not in use".

  • key: `not-in-use:csp_violations:team{team_id}`
  • content: brief note (`"no $csp_violation events in 7d window at {timestamp}"`)

Close out empty in both cases. Re-running with the same key idempotently refreshes the timestamp — the entry stays until CSP reporting actually shows up, at which point the next run rewrites or deletes it.

How a run works

Cycle between these moves; skip what's not useful.

Get oriented

Four cheap re

Read more
@posthog
Ships withposthog

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

41k172 skills11 agents3 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
40.7k
Star history of posthog/posthog on GitHub, a chart by star-history.com

Other skills on posthog.

mcp-servers

mcp-servers

Install, configure, authenticate, and troubleshoot MCP (Model Context Protocol) servers for this agent. Use when the user asks to…

@posthog@posthogInstall Skill
dynamic-workflows

dynamic-workflows

Designs and runs task-specific JavaScript harnesses with the `workflow` tool. Use for broad, long-running, highly structured, or…

@posthog@posthogInstall Skill
subagent-orchestration

subagent-orchestration

How and when to delegate work to subagents via the `subagent` tool (Explore, Plan, General). Use when a task involves codebase…

@posthog@posthogInstall Skill
checking-member-access

checking-member-access

Explains what a member or a role can do in a PostHog project, using the access control MCP tools. Use when the user asks what…

@posthog@posthogInstall Skill
analyzing-ai-citations

analyzing-ai-citations

Answer AI citation and answer engine optimization (AEO) questions in PostHog: whether AI answer engines (ChatGPT, Claude, and an…

@posthog@posthogInstall Skill
analyzing-expensive-users

analyzing-expensive-us…

Analyze the most expensive users in AI observability and explain why they cost so much. Use when the user asks about top…

@posthog@posthogInstall Skill

More skills from other plugins.

context-loader
Auto-invoked

context-loader

Search memories from earlier Pi sessions in this repository. Use it when earlier work may already explain the code, error,…

mem07d69k
@mem0ai@mem0aiInstall Skill
qmd

qmd

Search local markdown knowledge bases, notes, docs, and wikis with QMD. Use when users ask to find notes, retrieve documents,…

qmd4w31k
@tobi@tobiInstall Skill

Questions about signals-scout-csp-violations.

Which coding agents can use signals-scout-csp-violations?
signals-scout-csp-violations installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.