unified security auditor
简介
unified security auditor
原始描述
Unified application security skill for Coding Agent systems like OpenCode. Use when reviewing or writing code that touches authentication, authorization, use...
通过你的 Agent 添加
安装目录:unified-security/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: unified-security
description: Unified application security skill for Coding Agent systems like OpenCode. Use when reviewing or writing code that touches authentication, authorization, user input, payments, database access, secrets, deployment, dependencies, or AI/agent workflows. Includes OWASP Top 10 (2025), ASVS 5.0 highlights, agentic AI security, vibe-coded pitfalls, insecure defaults detection, supply chain risk signals, and CI/CD agent action hardening.
license: CC-BY-SA-4.0
metadata:
sources:
- name: claude-code-owasp
url: https://github.com/agamm/claude-code-owasp
license: MIT
- name: trailofbits/skills
url: https://github.com/trailofbits/skills
license: CC-BY-SA-4.0
- name: vibe-security-skill
url: https://github.com/raroque/vibe-security-skill
license: MIT
- name: VibeSec-Skill
url: https://github.com/BehiSecc/VibeSec-Skill
license: Apache-2.0
Unified Security Skill
Mission
Mission
Audit and harden codebases against real-world security failures, especially those introduced by fast AI-assisted development. Prioritize exploitable issues and provide concrete fixes.
Use When
- Reviewing code for security vulnerabilities
- Implementing authentication, authorization, sessions, or access control
- Handling user input, file uploads, or external data
- Working with secrets, API keys, cryptography, or tokens
- Implementing payments, billing, or webhooks
- Configuring databases, RLS, or security rules
- Integrating AI/LLM services or agent tools
- Designing CI/CD workflows that invoke AI agents
- Evaluating dependency and supply chain risk
Core Principles
- Never trust the client. Validate all critical data server-side.
- Defense in depth. Combine multiple controls.
- Fail closed. Missing config should disable access, not weaken it.
- Least privilege. Reduce access scope everywhere.
- Validate inputs and encode outputs for the render context.
Audit Workflow (adapt to stack)
- Secrets and environment variables
- Database access control (RLS, rules, auth guards)
- Authentication and authorization
- Rate limiting and abuse prevention
- Payments and webhook validation
- Input validation and injection risks
- XSS, output encoding, CSP, and headers
- CSRF and session protections
- AI/LLM integration safety
- Deployment configuration and prod hardening
- Insecure defaults (fail-open config)
- Supply chain risk signals
- CI/CD agent action hardening
Immediate-Flag Patterns (Critical/High)
- Secrets or service-role keys exposed client-side
- Client-controlled price, role, or access flags
- Disabled or overly permissive database rules
- Missing auth on privileged routes or APIs
- Hardcoded default credentials or weak crypto
- Unverified webhooks or signature bypasses
- Fail-open config that enables insecure operation
OWASP Top 10 (2025) Quick Map
- A01 Broken Access Control: verify ownership and deny by default
- A02 Security Misconfiguration: harden defaults, disable unused features
- A03 Supply Chain Failures: lock versions and review dependencies
- A04 Cryptographic Failures: use modern algorithms and key management
- A05 Injection: parameterize queries, validate input
- A06 Insecure Design: threat model, rate limit, design controls
- A07 Auth Failures: MFA, secure sessions, breached-password checks
- A08 Integrity Failures: verify artifacts, use SRI, avoid unsafe deserialization
- A09 Logging Failures: log security events with alerting
- A10 Exception Handling: fail closed, hide internals, log context
ASVS 5.0 Highlights
- Level 1: 12+ char passwords, auth rate limits, HTTPS everywhere
- Level 2: MFA for sensitive ops, encryption at rest, security logging
- Level 3: HSMs, formal threat modeling, pen test validation
Agentic AI Security (OWASP 2026) Summary
- ASI01 Goal hijack: isolate and validate inputs
- ASI02 Tool misuse: restrict tools and verify I/O
- ASI03 Privilege abuse: short-lived scoped tokens
- ASI04 Supply chain: verify plugins and MCP servers
- ASI05 Code execution: sandbox, review, approvals
- ASI06 Memory poisoning: segment and validate context
- ASI07 Agent comms: authenticate and encrypt
- ASI08 Cascading failures: circuit breakers, isolation
- ASI09 Trust exploitation: verify high-risk outputs
- ASI10 Rogue agents: monitoring and kill switches
Insecure Defaults Detection
- Fail-open is critical:
SECRET = env.get('KEY') or 'default'
- Fail-secure is acceptable:
SECRET = env['KEY'] (crashes if missing)
- Ignore test fixtures, templates, and docs
- Verify runtime behavior before reporting
Supply Chain Risk Signals
- Never trust the client. Validate all critical data server-side.
- Defense in depth. Combine multiple controls.
- Fail closed. Missing config should disable access, not weaken it.
- Least privilege. Reduce access scope everywhere.
- Validate inputs and encode outputs for the render context.
Audit Workflow (adapt to stack)
- Secrets and environment variables
- Database access control (RLS, rules, auth guards)
- Authentication and authorization
- Rate limiting and abuse prevention
- Payments and webhook validation
- Input validation and injection risks
- XSS, output encoding, CSP, and headers
- CSRF and session protections
- AI/LLM integration safety
- Deployment configuration and prod hardening
- Insecure defaults (fail-open config)
- Supply chain risk signals
- CI/CD agent action hardening
Immediate-Flag Patterns (Critical/High)
- Secrets or service-role keys exposed client-side
- Client-controlled price, role, or access flags
- Disabled or overly permissive database rules
- Missing auth on privileged routes or APIs
- Hardcoded default credentials or weak crypto
- Unverified webhooks or signature bypasses
- Fail-open config that enables insecure operation
OWASP Top 10 (2025) Quick Map
- A01 Broken Access Control: verify ownership and deny by default
- A02 Security Misconfiguration: harden defaults, disable unused features
- A03 Supply Chain Failures: lock versions and review dependencies
- A04 Cryptographic Failures: use modern algorithms and key management
- A05 Injection: parameterize queries, validate input
- A06 Insecure Design: threat model, rate limit, design controls
- A07 Auth Failures: MFA, secure sessions, breached-password checks
- A08 Integrity Failures: verify artifacts, use SRI, avoid unsafe deserialization
- A09 Logging Failures: log security events with alerting
- A10 Exception Handling: fail closed, hide internals, log context
ASVS 5.0 Highlights
- Level 1: 12+ char passwords, auth rate limits, HTTPS everywhere
- Level 2: MFA for sensitive ops, encryption at rest, security logging
- Level 3: HSMs, formal threat modeling, pen test validation
Agentic AI Security (OWASP 2026) Summary
- ASI01 Goal hijack: isolate and validate inputs
- ASI02 Tool misuse: restrict tools and verify I/O
- ASI03 Privilege abuse: short-lived scoped tokens
- ASI04 Supply chain: verify plugins and MCP servers
- ASI05 Code execution: sandbox, review, approvals
- ASI06 Memory poisoning: segment and validate context
- ASI07 Agent comms: authenticate and encrypt
- ASI08 Cascading failures: circuit breakers, isolation
- ASI09 Trust exploitation: verify high-risk outputs
- ASI10 Rogue agents: monitoring and kill switches
Insecure Defaults Detection
- Fail-open is critical:
SECRET = env.get('KEY') or 'default'
- Fail-secure is acceptable:
SECRET = env['KEY'] (crashes if missing)
- Ignore test fixtures, templates, and docs
- Verify runtime behavior before reporting
Supply Chain Risk Signals
- Secrets or service-role keys exposed client-side
- Client-controlled price, role, or access flags
- Disabled or overly permissive database rules
- Missing auth on privileged routes or APIs
- Hardcoded default credentials or weak crypto
- Unverified webhooks or signature bypasses
- Fail-open config that enables insecure operation
OWASP Top 10 (2025) Quick Map
- A01 Broken Access Control: verify ownership and deny by default
- A02 Security Misconfiguration: harden defaults, disable unused features
- A03 Supply Chain Failures: lock versions and review dependencies
- A04 Cryptographic Failures: use modern algorithms and key management
- A05 Injection: parameterize queries, validate input
- A06 Insecure Design: threat model, rate limit, design controls
- A07 Auth Failures: MFA, secure sessions, breached-password checks
- A08 Integrity Failures: verify artifacts, use SRI, avoid unsafe deserialization
- A09 Logging Failures: log security events with alerting
- A10 Exception Handling: fail closed, hide internals, log context
ASVS 5.0 Highlights
- Level 1: 12+ char passwords, auth rate limits, HTTPS everywhere
- Level 2: MFA for sensitive ops, encryption at rest, security logging
- Level 3: HSMs, formal threat modeling, pen test validation
Agentic AI Security (OWASP 2026) Summary
- ASI01 Goal hijack: isolate and validate inputs
- ASI02 Tool misuse: restrict tools and verify I/O
- ASI03 Privilege abuse: short-lived scoped tokens
- ASI04 Supply chain: verify plugins and MCP servers
- ASI05 Code execution: sandbox, review, approvals
- ASI06 Memory poisoning: segment and validate context
- ASI07 Agent comms: authenticate and encrypt
- ASI08 Cascading failures: circuit breakers, isolation
- ASI09 Trust exploitation: verify high-risk outputs
- ASI10 Rogue agents: monitoring and kill switches
Insecure Defaults Detection
- Fail-open is critical:
SECRET = env.get('KEY') or 'default'
- Fail-secure is acceptable:
SECRET = env['KEY'] (crashes if missing)
- Ignore test fixtures, templates, and docs
- Verify runtime behavior before reporting
Supply Chain Risk Signals
- Level 1: 12+ char passwords, auth rate limits, HTTPS everywhere
- Level 2: MFA for sensitive ops, encryption at rest, security logging
- Level 3: HSMs, formal threat modeling, pen test validation
Agentic AI Security (OWASP 2026) Summary
- ASI01 Goal hijack: isolate and validate inputs
- ASI02 Tool misuse: restrict tools and verify I/O
- ASI03 Privilege abuse: short-lived scoped tokens
- ASI04 Supply chain: verify plugins and MCP servers
- ASI05 Code execution: sandbox, review, approvals
- ASI06 Memory poisoning: segment and validate context
- ASI07 Agent comms: authenticate and encrypt
- ASI08 Cascading failures: circuit breakers, isolation
- ASI09 Trust exploitation: verify high-risk outputs
- ASI10 Rogue agents: monitoring and kill switches
Insecure Defaults Detection
- Fail-open is critical:
SECRET = env.get('KEY') or 'default'
- Fail-secure is acceptable:
SECRET = env['KEY'] (crashes if missing)
- Ignore test fixtures, templates, and docs
- Verify runtime behavior before reporting
Supply Chain Risk Signals
- Fail-open is critical:
SECRET = env.get('KEY') or 'default' - Fail-secure is acceptable:
SECRET = env['KEY'](crashes if missing) - Ignore test fixtures, templates, and docs
- Verify runtime behavior before reporting
Supply Chain Risk Signals
Flag dependencies with one or more of:
- Single maintainer or anonymous owner
- Unmaintained or archived status
- Low popularity compared to peers
- High-risk features (FFI, deserialization, code exec)
- History of critical CVEs
- No security contact or disclosure process
CI/CD Agent Actions Hardening
When workflows invoke AI agents, treat all event data as attacker-controlled.
Common AI action references:
anthropics/claude-code-actiongoogle-github-actions/run-gemini-cliopenai/codex-actionactions/ai-inference
High-risk patterns:
pull_request_targetorissue_commentwith untrusted input- Prompt fields populated via
env:intermediaries - Eval of AI output (
eval,exec,$()) - Dangerous sandbox configs (
danger-full-access,--yolo) - Wildcard allowlists (
allow-users: "*")
Safe defaults:
- Restrict triggers to trusted contexts
- Strip or escape untrusted inputs before prompts
- Lock down tools and file access
- Use least-privileged tokens and permissions
- Require human approval for sensitive actions
Output Format
Organize findings by severity: Critical, High, Medium, Low. For each issue:
- File and line(s)
- Vulnerability name
- Concrete impact
- Before/after fix
End with a prioritized summary and remediation order.
When Generating Code
Use the same checks proactively. Prefer secure patterns by default and note tradeoffs in comments when you must relax controls.
When Generating a Security Audit Report
Save into the folder/project where this skill was executed as a markdown file with todays date
Final Report Format
## Security Audit Report
**Target:** <files/component>
**Date:** <today>
**Auditor:** <ask the user for a name> OR skip and use "Automated Security Skill"
### Executive Summary
<2-3 sentences: overall risk posture, most critical issues>
### Findings
#### [CRITICAL/HIGH/MEDIUM/LOW] <Title>
- **Location:** file:line
- **Impact:** ...
- **Reproduction:** ...
- **Fix:**
```diff
- vulnerable code
+ secure code
Recommendations
## Security Audit Report
**Target:** <files/component>
**Date:** <today>
**Auditor:** <ask the user for a name> OR skip and use "Automated Security Skill"
### Executive Summary
<2-3 sentences: overall risk posture, most critical issues>
### Findings
#### [CRITICAL/HIGH/MEDIUM/LOW] <Title>
- **Location:** file:line
- **Impact:** ...
- **Reproduction:** ...
- **Fix:**
```diff
- vulnerable code
+ secure code
Clean Checks
Attribution and License
This skill is a curated, adapted work derived from:
- https://github.com/raroque/vibe-security-skill (MIT)
- https://github.com/BehiSecc/VibeSec-Skill (Apache-2.0)
- https://github.com/agamm/claude-code-owasp (MIT)
- https://github.com/trailofbits/skills (CC-BY-SA-4.0)
This unified skill is licensed under CC-BY-SA-4.0 to satisfy ShareAlike requirements.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。