backend-security-audit
Defensive backend security review for source code, API servers, auth flows, database access, dependency configuration, secrets handling, file uploads, webhooks, background jobs, and deployment settings. Use when Codex is asked to audit, review, deep research, harden, or find vulnerabilities in a user's own backend or authorized codebase, and to report findings before making fixes.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- backend-security-audit
- description
- Defensive backend security review for source code, API servers, auth flows, database access, dependency configuration, secrets handling, file uploads, webhooks, background jobs, and deployment settings. Use when Codex is asked to audit, review, deep research, harden, or find vulnerabilities in a user's own backend or authorized codebase, and to report findings before making fixes.
02 资源文件 2
- 参考文档agents/openai.yaml252 B
- 参考文档references/audit-checklist.md3.8 KB
03 SKILL.md 正文
Backend Security Audit
Overview
Perform a defensive, evidence-led backend security audit. Find as many real vulnerabilities and risky patterns as possible, report them clearly to the user, then ask whether to implement fixes.
Use this only on systems the user owns or is authorized to assess. Do not provide exploit payloads, attack playbooks, or instructions for compromising third-party systems.
Audit Workflow
-
Establish scope from the repository:
- Identify backend entry points, framework, package manager, runtime, API routes, middleware, auth/session libraries, database layer, background jobs, file storage, webhook handlers, and deployment files.
- Read project docs, environment examples, schema files, route definitions, middleware, and dependency manifests before judging individual files.
- Prefer
rgandrg --filesfor discovery.
-
Load the checklist when needed:
- Read
references/audit-checklist.mdbefore the detailed pass, or when the backend uses unfamiliar patterns. - Use it as coverage guidance, not as a substitute for code-specific reasoning.
- Read
-
Trace trust boundaries:
- For each external input path, follow data from request, queue message, webhook, file upload, CLI job, or third-party callback into validation, authorization, persistence, side effects, and responses.
- Pay special attention to paths that cross user, tenant, organization, admin, payment, or internal-service boundaries.
-
Verify findings against code:
- Report a finding only when there is concrete evidence in the code or configuration.
- Include file references and the relevant behavior. Avoid vague claims like "may be vulnerable" unless the uncertainty is explicitly explained.
- Separate confirmed vulnerabilities from hardening recommendations.
-
Assess severity:
Critical: likely account takeover, remote code execution, credential exposure, broad data breach, auth bypass, or payment/security boundary compromise.High: unauthorized access/modification of sensitive data, tenant isolation failure, privilege escalation, serious injection, exploitable SSRF, or dangerous file handling.Medium: meaningful security weakness requiring specific conditions, missing defense-in-depth around sensitive paths, weak session/cookie/CORS/CSRF posture, dependency risk with reachable impact.Low: limited-impact leak, minor misconfiguration, logging issue, weak validation with constrained impact, or maintainability issue that increases security risk.
-
Report before fixing:
- Lead with findings ordered by severity.
- For each finding include: severity, title, affected file(s), evidence, impact, likely exploit scenario in defensive terms, and recommended fix.
- Include "No finding" notes only for important areas that were checked and looked safe.
- End by asking whether the user wants fixes implemented.
Review Priorities
Cover these areas during the audit:
- Authentication: login, registration, password reset, email verification, OAuth callbacks, MFA, session creation, session rotation, logout, cookies, JWTs, API keys.
- Authorization: object ownership, tenant/org membership, role checks, admin checks, horizontal/vertical privilege escalation, IDOR, route-level and service-level enforcement.
- Input handling: schema validation, type coercion, parser limits, unsafe deserialization, query parameters, JSON bodies, multipart uploads, path parameters.
- Injection: SQL/NoSQL, command, template, LDAP, ORM raw queries, unsafe dynamic code, shell-outs, path traversal.
- Data exposure: sensitive fields in API responses, logs, errors, caches, analytics, client bundles, OpenAPI specs, debug endpoints.
- Secrets: committed credentials, weak env handling, secret logging, token storage, overbroad service keys.
- Web security: CORS, CSRF, cookies, redirects, host header trust, rate limits, request size limits, security headers where backend-controlled.
- File and media handling: upload validation, MIME/content sniffing, storage permissions, filename/path use, malware scanning expectations, signed URL scope.
- SSRF and outbound requests: user-controlled URLs, metadata services, internal host access, redirect following, DNS/IP allowlists.
- Webhooks and integrations: signature verification, replay protection, idempotency, event trust, payment state transitions.
- Dependencies and supply chain: vulnerable packages, unsafe lifecycle scripts, lockfile drift, unmaintained auth/security libraries.
- Deployment: production debug flags, database/network exposure, TLS assumptions, container permissions, cloud IAM, public buckets.
Output Format
Use this structure:
**Findings**
1. [Severity] Title
- Evidence: `path/to/file.ext:line` and concise code behavior.
- Impact: What can go wrong.
- Scenario: Defensive abuse case, without weaponized payloads.
- Fix: Specific implementation direction.
**Checked**
- Important surfaces reviewed with no confirmed issue.
**Next**
Should I implement the fixes for these findings?
If no vulnerabilities are found, say that clearly, summarize the reviewed surfaces, note residual risk, and offer targeted hardening or tests.
04 同仓库更多 Skills
x-content
Create, rewrite, critique, select formats for, discover opportunities for, and learn from X/Twitter content and X Articles for a technical AI-native developer/builder account. Use when turning ideas, source posts, releases, benchmarks, results, conversations, authenticated For You or creator-watch opportunities, or project evidence into an Original, Quote, Thread, Reply, or Article; reviewing article titles/outlines/visual briefs/launch hooks; improving drafts; choosing additive contributions from live X context; or learning from own-account outcomes. Own content intelligence only; compose with agent-browser for live X state and Growth OS for discovery provenance, approvals, measurement, and publication.
writing-plans
Create detailed implementation plans for multi-step software work before editing code. Use when requirements or a specification must become concrete file-level tasks, interfaces, acceptance criteria, risks, rollout, or explicitly required validation. Default to no test creation, test modification, test execution, TDD, regression-test, or coverage work unless the user, authoritative specification, or mandatory repository policy explicitly requires testing.
systematic-debugging
Root-cause debugging for concrete technical failures including bugs, failing builds or tests, integration issues, performance regressions, and unexpected behavior. Use before proposing or implementing a repair when diagnosis is required. Reproduce the symptom, trace the responsible owner, maintain one leading causal hypothesis, and falsify it with the smallest direct evidence. Compose with Causal Coding for source mutation; testing is opt-in and requires independent authorization.
skill-creator
Guide for creating and updating high-quality skills by translating workflows, conventions, and reusable processes into well-structured skills. Includes context, use case examples and spec for skills. Use this skill whenever a user asks to create, update, edit, improve, package, or troubleshoot a skill, and also for conversational questions about skills in ChatGPT (e.g., "What are skills?", "What can I use skills for?", "What are the best skill use cases for me?", "Where can I find my skills?").
reflexion
Self-refinement, multi-perspective critique, verification, and durable lesson curation adapted from NeoLabHQ Reflexion. Use when the user asks to reflect, self-review, critique, double-check, verify and improve prior work, run a rigorous review, memorize lessons, or says "then reflect" after a coding, analysis, or writing task. Supports repository-aware evidence gathering and works without subagents or Claude hooks.
ponytail
Enforce Ponytail's lazy-senior-developer approach for coding, fixing, refactoring, design, dependency choices, and explicit Ponytail modes such as review, audit, debt, gain, and help. Prefer YAGNI, existing code, standard library, native platform features, existing dependencies, low reader load, and the smallest correct diff. For source mutation, keep Causal Coding authoritative for scope, testing authorization, verification cadence, and stopping. On connected WSL/Linux targets, compose with MCP Harness Router and use `wsl-web-harness` for authoritative repository work.