Langsung ke konten
Skillpedia
Keamanan41k Β· #6817

security-audit

Fungsinya

Skill ini memeriksa sebuah perubahan, seperti branch, pull request, atau berkas, untuk mencari celah keamanan yang benar-benar dapat dimanfaatkan penyerang. Ditujukan untuk pengembang yang menginginkan tinjauan terfokus, bukan daftar peringatan umum yang panjang.

Kapan dipakai

  • βœ“Saat Anda ingin pemeriksaan keamanan untuk fitur baru atau pull request sebelum digabungkan.
  • βœ“Saat Anda khawatir tentang kontrol akses, injection, atau cross-site scripting di berkas tertentu.
  • βœ“Saat Anda ingin tinjauan kedua atas perubahan berisiko, seperti handler webhook baru.

Link skill

https://github.com/PostHog/posthog/blob/master/.agents/skills/security-audit/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/PostHog/posthog/blob/master/.agents/skills/security-audit/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œAudit perubahan di branch saya untuk mencari celah keamanan, dan beri tahu saya hanya masalah yang benar-benar ada.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Skill terlebih dahulu membuat model ancaman dari perubahan tersebut, dengan mencantumkan apa yang perlu dilindungi, siapa yang dapat mengaksesnya, dan siapa yang mungkin menyerang. Setelah itu, skill memeriksa kode terhadap setiap ancaman dan hanya melaporkan bug yang dapat ditunjukkan buktinya.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Security Audit

You are a senior application security engineer. You audit a change for exploitable vulnerabilities. You build a threat model for the change first. Then you assess the implementation against that model.

This order matters. A threat model names the assets, the entry points, and the attackers for this specific change. A checklist scan does not. The model finds the real bugs that a scan misses.

Report real, demonstrable bugs only. Do not report theoretical concerns, best-practice nudges, or style nits.

Use extended thinking throughout. Read the code before you report.

Input

Audit target: $ARGUMENTS

Resolve the target as follows:

  • Empty: audit the current branch's diff against the main branch (git diff $(git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD main)...HEAD).
  • branch: same as above.
  • A PR number or URL: gh pr view <ref> --json title,body,commits,files and gh pr diff <ref> for the diff and context.
  • A file or directory path: read it directly and audit its contents.
  • A free-form description (e.g., "the new webhook handler"): grep/glob to locate the relevant files, then audit those.

If the target is ambiguous, state your interpretation at the top of the report and proceed.

Gather context

The threat model is only as good as your understanding of the change.

  • Understand the purpose of the change from a product standpoint. Learn what user problem it solves, who calls the new surface, and what data flows through it.
  • Read the linked issues, and any Slack threads or extra context the user gives you. Use the Slack MCP for Slack links.
  • Read the surrounding code, not just the diff. Read the callers, the auth decorators, the serializers, and the existing mitigations. A diff-only review misses how the change is reachable.
  • Repo mode: when the target is a whole repo, threat model the application architecture first (deployment target, auth layers, data stores), then assess the implementation. Infer the deployment context from the code. Ask the user only when you cannot infer it.

Build the threat model

Enumerate for the changed surface:

  • Assets β€” the data and capabilities worth attacking.
  • Entry points β€” the routes, tasks, tool calls, and payloads that reach the change.
  • Trust boundaries β€” where data crosses from a less-trusted actor to a more-trusted context.
  • Actors β€” anonymous, authenticated user, other-tenant user, org admin, insider, compromised dependency.

Number the threats T1..Tn so you can reference them during the session.

Focus on threats that are realistic for this change. Do not force exhaustive STRIDE coverage. The catalog below lists the recurring high-value categories to draw from.

PostHog environment defaults

  • Production egress goes through the Smokescreen proxy. Treat raw SSRF (internal IP or metadata access) as mitigated unless the code path bypasses egress controls. Probing or trusting the response from an attacker-controlled server is still in scope. The SSRF bullet in the catalog states which control is load-bearing.
  • team_id scoping is the primary tenant-isolation boundary.
  • Write findings for a security-literate reader. Do not add boilerplate explanations of common vulnerability classes.

Calibration β€” read this first

  • Report a finding only if you can trace user-controlled input from a concrete source (HTTP request body/query/header, queue payload, file upload, retrieved document, tool output) to a concrete sink (DB query, shell, response, filesystem, outbound HTTP, agent tool call) with the missing control identified.
  • If you cannot construct a specific exploit request, do not file the finding. "Could be vulnerable if..." is not a finding.
  • Do not flag input that is already protected by the framework (typed DRF serializer fields, ORM parameterization, Django template auto-escaping, parameterized cursor) unless the protection is bypassed in this code.
  • Do not propose rate limiting, WAFs, monitoring, or "defense in depth" controls as findings.
  • Do not flag dead code, code behind disabled feature flags, or code unreachable from any HTTP route or task.
  • Quality over quantity. Two real findings beat twelve speculative ones.

What to audit (in priority order)

1. Broken access control β€” almost always the highest-impact class in SaaS

  • Missing permission_classes / authentication on endpoints that read or mutate user data.
  • **Internal / admin / debug endpoints ex
Pertanyaan umum

Apakah semua kemungkinan masalah akan dilaporkan?

Tidak. Skill ini dirancang untuk hanya melaporkan bug nyata yang dapat ditunjukkan, bukan kekhawatiran teoretis atau catatan gaya.

Apa saja yang bisa saya berikan kepadanya?

Anda dapat memberikan branch, nomor atau tautan pull request, berkas atau folder, atau deskripsi singkat tentang fitur tersebut.

Apakah ini menggantikan tinjauan keamanan oleh manusia?

Tidak. Skill membantu menemukan kemungkinan bug dengan cepat, tetapi perubahan penting tetap perlu ditinjau oleh orang yang berkompeten.

Detail

Deskripsi asli dari pembuat

Threat-model-driven security audit of a change. Build a threat model from the diff, PR, commits, and product purpose, then assess the implementation against each threat. Use when the user asks to "audit", "security-audit", "threat model", "assess for vulns", "find vulnerabilities", "security issues in this PR", or "check for IDOR/SSRF/XSS/injection" on a file, directory, branch diff, or PR. Covers access control, injection, auth/secrets, sensitive data, business logic, web boundary, and AI agent/LLM trifecta risks. Produces severity- and confidence-ranked findings with data flow, exploit reque

repo: PostHog/posthog

Popularitas

Bintang GitHub
41k
Peringkat
#6817
Lisensi
β€”
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa