security-audit
यह क्या करती है
यह स्किल किसी बदलाव, जैसे ब्रांच, pull request या फ़ाइल, में ऐसी सुरक्षा खामियाँ जाँचती है जिनका हमलावर सचमुच फ़ायदा उठा सके। यह उन डेवलपर्स के लिए है जिन्हें सामान्य चेतावनियों की लंबी सूची के बजाय केंद्रित समीक्षा चाहिए।
कब इस्तेमाल करें
- ✓जब आप मर्ज से पहले किसी नई सुविधा या pull request की सुरक्षा जाँच चाहें।
- ✓जब किसी खास फ़ाइल में एक्सेस कंट्रोल, injection या cross-site scripting की चिंता हो।
- ✓जब किसी जोखिम भरे बदलाव, जैसे नया webhook handler, पर दूसरी नज़र चाहिए।
Skill का लिंक
https://github.com/PostHog/posthog/blob/master/.agents/skills/security-audit/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरी ब्रांच के बदलावों में सुरक्षा खामियाँ जाँचिए, और मुझे सिर्फ़ असली समस्याएँ बताइए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह पहले बदलाव से एक थ्रेट मॉडल बनाती है, यानी क्या सुरक्षित रखना है, उस तक कौन पहुँच सकता है और कौन हमला कर सकता है। फिर यह हर खतरे के हिसाब से कोड जाँचती है और केवल वे बग बताती है जिन्हें यह दिखा सकती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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,filesandgh 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_idscoping 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
अक्सर पूछे जाने वाले सवाल
क्या यह हर संभावित समस्या बताती है?
नहीं। इसे केवल असली और प्रदर्शित किए जा सकने वाले बग बताने के लिए बनाया गया है, काल्पनिक चिंताएँ या स्टाइल की टिप्पणियाँ नहीं।
मैं इसे किस पर लगा सकता हूँ?
आप ब्रांच, pull request नंबर या लिंक, फ़ाइल या फ़ोल्डर, या सुविधा का छोटा विवरण दे सकते हैं।
क्या यह किसी इंसान की सुरक्षा समीक्षा की जगह लेती है?
नहीं। यह संभावित बग जल्दी खोजने में मदद करती है, पर बड़े बदलावों की समीक्षा किसी योग्य व्यक्ति से होनी ही चाहिए।
जानकारी
लेखक का मूल विवरण
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
लोकप्रियता
- GitHub स्टार
- 41k
- रैंकिंग में स्थान
- #6817
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
depot-ci
41kयह आपके एजेंट को Depot CI वर्कफ़्लो सेट अप करने, चलाने और माइग्रेट करने में मदद करती है, साथ ही रन के लॉग पढ़ने में।
depot-container-builds
41kयह आपके एजेंट को Depot के रिमोट बिल्डर पर Docker इमेज बनाने में मदद करती है, जिसमें मल्टी-प्लेटफ़ॉर्म इमेज और बिल्ड सुधार शामिल हैं।
depot-github-runners
41kयह आपके एजेंट को GitHub Actions जॉब Depot के मैनेज्ड रनर पर ले जाने, रनर का साइज़ और लेबल चुनने, और रनर सेटअप की समस्याएँ ठीक करने में मदद करती है।
editing-agents-md
41kयह आपके एजेंट को तय करने में मदद करती है कि कोई नियम AGENTS.md या CLAUDE.md में जाए या नहीं, और उसे ऐसे लिखे कि फ़ाइल भारी न हो।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।