·
Last changedVersion:
This version passed the hardening gate. The skill content was retained without changes. Classified findings before hardening: 1. Classified findings closed: 0. Classified findings remaining: 1. Unclassified scanner findings remaining: 0. Review findings closed: 0. Review findings remaining: 9.
1
1
Expand | File | Group | Subtype | Severity | Status |
|---|---|---|---|---|---|
SKILL.md | Prompt Injection | Direct prompt injection | Medium | Open |
1 finding
This skill produces a project-wide audit of the Endpoints product. Use it when the user wants to find what to clean up — unused endpoints, failing materialisations, materialised versions that nobody calls any more. It does not modify anything; it reports.
The deeper investigation per endpoint is diagnosing-endpoint-performance. The audit's job is to
find candidates and hand off.
The dedicated tools give a fast endpoint-level view. For call frequency, recency, and cost over
time, query the query_log table with execute-sql (endpoint-level). Per-version recency comes
from endpoint-versions — each version carries its own last_executed_at.
| Tool | What it's for |
|---|---|
| Primary read path. Query |
| Per endpoint: is materialisation eligible, current status, last run, last error (not in the system tables — use this tool) |
| All versions for one endpoint, latest first, with each version's query, materialisation state, and |
| Write path — disable ( |
| Tell the PostHog team what's missing or confusing in this flow so the product and skill improve |
Prefer reading from the system tables over the endpoints-get-all / endpoint-get tools — one
SQL query returns the whole inventory and lets you join metadata to usage in query_log.
| Category | Trigger | Typical action |
|---|---|---|
Never called | No rows in | Confirm with the user, then disable |
Stale |
| Confirm with the user; often safe to disable |
Inactive |
| Verify intent; if abandoned, delete |
Failing materialisation |
| Hand off to |
Unused materialised version | A materialised version whose | Unmaterialise that version, or roll to a newer one |
Drifted versions | Many versions exist (query changed repeatedly) | History noise — not an issue, but worth noting |
Usage counts only personal-API-key calls — an endpoint exercised solely from the Playground
tab or the app will look unused. Per-version last_executed_at is recorded only for runs since
that tracking was added, so a version can read null while still being used; always confirm before
removing.
One execute-sql query gets the whole inventory from system.data_modeling_endpoints:
No rows → the project has no endpoints; say so and stop. Don't invent issues. (The
last_executed_at column here is a convenience endpoint-level timestamp; for call frequency and
cost, use query_log in the next step.)
query_logquery_log records every personal-API-key call, tagged with the endpoint name. One query gives
recency and call counts across all endpoints:
Cross-reference with step 1:
query_log → never called via API keyquery_log also exposes query_duration_ms, read_rows, and read_bytes per call — useful to
flag expensive endpoints in the same pass. This is endpoint-level; per-version recency comes from
endpoint-versions (step 3).
For each materialised endpoint, call endpoint-materialization-status (this isn't in the system
tables). Surface any with status: "Failed" separately — these are active failures, not staleness.
Then call endpoint-versions and read each version's last_executed_at: a materialised
version that's null or long stale is an unused-materialised-version candidate. Treat this as a
lead, not proof — per-version recency only counts API-key runs since tracking was added, so confirm
with the user before unmaterialising.
Render a prioritised report grouped by category. Don't dump raw JSON; use a readable table per section:
The exact format is less important than: prioritised, grouped, actionable, and hand-off clear.
End with a clear question, not a decision:
endpoint-update with
is_materialized: false per versionendpoint-update with is_active: falsediagnosing-endpoint-performanceNever act from the audit alone. Disabling or unmaterialising affects external API consumers; always confirm before modifying.
system.data_modeling_endpoints (metadata)
and query_log (endpoint-level call counts, recency, cost) via execute-sql answer most of the
audit. Per-version recency comes from endpoint-versions (each version's last_executed_at).endpoint-update with is_materialized: false — not deleting the endpoint.is_active: false was deliberately turned off. Don't
recommend deletion unless the user confirms it's truly abandoned.Get started with chainctlchainctl skill install public/posthog/auditing-endpoints:latest
Bring Chainguard's hardening pipeline to your first-party skills — custom rulesets, automated remediation, full audit trail.
skills.cgr.dev/public/github.com/posthog/skills/omnibus/auditing-endpoints:latest
MIT
HARDENING.md
LICENSE
SKILL.md