signals-scout-csp-violations
Qué hace
Este scout vigila las infracciones de la Política de Seguridad de Contenido, que son informes de que el navegador bloqueó un script o una conexión. Está pensado para equipos centrados en la seguridad que quieren detectar pronto un script de terceros nuevo o un despliegue defectuoso.
Cuándo usarla
- ✓Cuando tu sitio empieza de repente a bloquear un dominio externo nuevo.
- ✓Cuando muchos usuarios infringen una regla de la política de seguridad de contenido tras un despliegue.
- ✓Cuando una sola dirección bloqueada aparece en muchas páginas, lo que puede indicar un script sospechoso.
Link de la skill
https://github.com/PostHog/posthog/blob/master/products/signals/skills/signals-scout-csp-violations/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Dime si nuestra política de seguridad está bloqueando dominios externos nuevos en nuestro sitio.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
Agrupa las infracciones por dirección bloqueada y por directiva, y después comprueba a cuántos usuarios y páginas distintos afecta cada grupo. Un solo usuario con una extensión del navegador defectuosa cuenta mucho menos que muchos usuarios chocando con el mismo bloqueo.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
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 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.
Preguntas frecuentes
¿Por qué importa más el alcance que el recuento bruto?
Un solo usuario con una extensión defectuosa puede generar miles de informes, mientras que un problema real suele afectar a varios usuarios distintos.
¿Cambia mi política de seguridad?
No. Solo vigila e informa de las infracciones que ve.
¿Qué es una directiva?
Es la parte de la política de seguridad que una infracción rompe, como el tipo de script o de conexión que se bloqueó.
Detalles
Descripción original del autor
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.
repo: PostHog/posthog
Popularidad
- Estrellas en GitHub
- 41 mil
- Posición en el ranking
- #6922
- Licencia
- —
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
depot-ci
41 milAyuda a tu agente a configurar y ejecutar flujos de Depot CI, una alternativa a GitHub Actions, y a leer los registros de ejecución.
depot-container-builds
41 milAyuda a tu agente a crear imágenes de Docker en los constructores remotos de Depot, incluidas las multiplataforma, y a corregir fallos.
depot-github-runners
41 milAyuda a tu agente a pasar los trabajos de GitHub Actions a runners gestionados por Depot, elegir su tamaño y etiquetas y resolver problemas de configuración.
editing-agents-md
41 milAyuda a tu agente a decidir si una regla debe ir en un archivo AGENTS.md o CLAUDE.md, y a escribirla para que se cumpla sin sobrecargar el archivo.
Skills parecidas
reverse-engineer-anything
422 milAyuda a tu agente a revisar apps y paquetes ya publicados para explicar sus funciones, comparar versiones o guiar una reconstrucción, usando la herramienta REA.
1password
394 milAyuda a tu agente a instalar la CLI de 1Password, iniciar sesión y leer o inyectar secretos sin imprimir sus valores en el chat.
healthcheck
394 milAyuda a tu agente a auditar el ordenador o servidor que ejecuta OpenClaw en busca de riesgos de seguridad, como SSH, cortafuegos, actualizaciones y copias de seguridad, y después sugerir arreglos seguros.