Token导航 LogoToken导航

Agent Skill · 研究检索

security-audit(安全审计)

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

security-audit 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 30,718。

总安装 2,832周安装 118GitHub Stars 公开资料未说明下载 944核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:security-audit(安全审计)
来源仓库:https://github.com/aakash-dhar/claude-skills
仓库路径:skills/security-audit
安装命令:
npx skills add https://github.com/aakash-dhar/claude-skills --skill security-audit
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/aakash-dhar/claude-skills --skill security-audit

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

全面扫描代码与配置的安全漏洞,输出风险评级与修复优先级。适用于CI/CD流水线集成、上线前合规检查与第三方审计支持。提供快速致胜方案与长期加固建议双重改进路径。security-audit 属于研究检索类 Skill,可作为该场景下的辅助能力补充。不能替代人工深度审查,关键系统需二次验证结论准确性。

涉及生产凭据时应采用临时令牌并限制生命周期时长。

来源仓库内路径:skills/security-audit

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/aakash-dhar/claude-skills --skill security-aud…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

security-audit 怎么安装?

在终端执行 npx skills add https://github.com/aakash-dhar/claude-skills --skill security-audit。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

security-audit 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

security-audit 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

security-audit 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

security-audit 用的人多吗?

公开数据是累计安装 2,832 次,近一周安装 118 次,下载 944 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

security-audit 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
security-audit

安全审计 · 本页

2,832—接触敏感数据未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Security Audit Skill

When auditing code for security, follow this structured process. Treat every finding seriously — a single vulnerability can compromise an entire system.

1. Secrets & Credentials

Scan the entire codebase for exposed secrets:

  • Hardcoded API keys, tokens, passwords in source code
  • Secrets in config files committed to Git (.env, config.json, settings.py)
  • Secrets in logs — sensitive data printed in console.log, logger.info, etc.
  • Secrets in error messages — stack traces or error responses leaking internals
  • Secrets in comments — old credentials left in TODO or commented-out code
  • Secrets in Git history — check if secrets were committed and later removed (still in history)

Check commands:

# Search for common secret patterns
grep -rn "password\|secret\|api_key\|apikey\|token\|private_key\|AWS_SECRET\|DATABASE_URL" --include="*.ts" --include="*.js" --include="*.py" --include="*.env" --include="*.json" --include="*.yaml" --include="*.yml" .

# Check for .env files committed
git ls-files | grep -i "\.env"

# Check git history for secrets
git log --all --diff-filter=D -- "*.env" "*.pem" "*.key"

Verify:

  • Is a .gitignore in place with .env, *.pem, *.key, *.p12?
  • Are secrets loaded from environment variables or a vault (not files)?
  • Is there a .env.example with placeholder values (not real secrets)?

2. Injection Attacks

SQL Injection

// 🔴 VULNERABLE — string concatenation in query
const user = await db.query(`SELECT * FROM users WHERE id = '${req.params.id}'`);

// ✅ SAFE — parameterized query
const user = await db.query('SELECT * FROM users WHERE id = $1', [req.params.id]);

NoSQL Injection

// 🔴 VULNERABLE — user input directly in query object
const user = await User.find({ username: req.body.username });

// ✅ SAFE — explicitly cast to string
const user = await User.find({ username: String(req.body.username) });

Command Injection

// 🔴 VULNERABLE — user input in shell command
exec(`convert ${req.body.filename} output.png`);

// ✅ SAFE — use execFile with arguments array
execFile('convert', [sanitizedFilename, 'output.png']);

XSS (Cross-Site Scripting)

// 🔴 VULNERABLE — unsanitized HTML rendering
element.innerHTML = userInput;
// React: dangerouslySetInnerHTML={{ __html: userInput }}

// ✅ SAFE — use textContent or sanitize
element.textContent = userInput;
// React: use DOMPurify.sanitize() before dangerouslySetInnerHTML

Path Traversal

// 🔴 VULNERABLE — user controls file path
const file = fs.readFileSync(`./uploads/${req.params.filename}`);

// ✅ SAFE — resolve and validate path stays within allowed directory
const safePath = path.resolve('./uploads', req.params.filename);
if (!safePath.startsWith(path.resolve('./uploads'))) throw new Error('Invalid path');

Template Injection

  • Check for user input passed directly into template engines (Jinja2, EJS, Handlebars)
  • Verify auto-escaping is enabled

3. Authentication & Authorization

Authentication Flaws

  • Weak password requirements — no minimum length, complexity, or breach checking
  • Missing rate limiting on login endpoints (brute force risk)
  • Missing account lockout after failed attempts
  • Insecure password storage — plaintext, MD5, SHA1 (use bcrypt/argon2 with proper cost)
  • Missing MFA on sensitive operations
  • Session tokens in URLs — tokens should be in headers or httpOnly cookies
  • No session expiration — tokens that never expire

Authorization Flaws

  • Missing authorization checks — endpoints accessible without verifying user permissions
  • IDOR (Insecure Direct Object Reference) — accessing other users' data by changing an ID
  • Privilege escalation — regular user can access admin endpoints
  • Missing resource ownership checks — user A can modify user B's data
// 🔴 VULNERABLE — IDOR: no ownership check
app.get('/api/orders/:id', async (req, res) => {
  const order = await Order.findById(req.params.id);
  res.json(order);
});

// ✅ SAFE — verify ownership
app.get('/api/orders/:id', async (req, res) => {
  const order = await Order.findById(req.params.id);
  if (order.userId !== req.user.id) return res.status(403).json({ error: 'Forbidden' });
  res.json(order);
});

4. Data Exposure

  • Sensitive data in API responses — returning passwords, tokens, SSNs, full credit card numbers
  • Verbose error messages in production — stack traces, database details, internal paths
  • Missing field filtering — returning entire database objects instead of specific fields
  • Sensitive data in client-side storage — tokens in localStorage (use httpOnly cookies)
  • PII in logs — names, emails, IPs logged without redaction
  • Missing data encryption — sensitive data stored unencrypted at rest
  • CORS misconfiguration — Access-Control-Allow-Origin: * on authenticated endpoints
// 🔴 VULNERABLE — leaking sensitive fields
res.json(user);

// ✅ SAFE — explicit field selection
res.json({
  id: user.id,
  name: user.name,
  email: user.email,
});

5. Input Validation

  • Missing validation — no checks on request body, params, query strings
  • Type confusion — expecting a number but accepting a string
  • Missing length limits — unbounded input that could cause DoS
  • Missing file upload validation — no checks on file type, size, or content
  • Regex DoS (ReDoS) — catastrophic backtracking on malicious input
  • Missing content-type validation — accepting unexpected content types

Verify:

  • Is there a validation library in use (Zod, Joi, class-validator, Pydantic)?
  • Are all API endpoints validating input before processing?
  • Are file uploads restricted by type, size, and scanned for malware?

6. Dependencies

Run these checks:

# Node.js
npm audit
# or
npx better-npm-audit audit

# Python
pip audit
# or
safety check

# Check for outdated packages
npm outdated
pip list --outdated

Look for:

  • Known CVEs in dependencies
  • Outdated packages with known vulnerabilities
  • Abandoned packages — no updates in 2+ years
  • Typosquatting risk — verify package names are correct
  • Excessive permissions — packages requesting more access than needed
  • Lockfile present — package-lock.json or yarn.lock committed

7. HTTP Security Headers

Check if these headers are set:

  • Content-Security-Policy — prevents XSS and data injection
  • Strict-Transport-Security — enforces HTTPS
  • X-Content-Type-Options: nosniff — prevents MIME type sniffing
  • X-Frame-Options: DENY — prevents clickjacking
  • Referrer-Policy — controls referrer information
  • Permissions-Policy — restricts browser features
# Check response headers
curl -I https://your-app.com

8. Cryptography

  • Weak hashing — MD5 or SHA1 for passwords (use bcrypt, scrypt, or argon2)
  • Weak encryption — DES, RC4, ECB mode (use AES-256-GCM)
  • Hardcoded encryption keys — keys should be in environment variables or a vault
  • Missing TLS — HTTP connections for sensitive data
  • Weak JWT — using alg: none or HS256 with a short secret
  • Predictable random values — using Math.random() for tokens (use crypto.randomBytes)
// 🔴 VULNERABLE — predictable token
const token = Math.random().toString(36);

// ✅ SAFE — cryptographically secure
const token = crypto.randomBytes(32).toString('hex');

9. Infrastructure & Configuration

  • Debug mode in production — verbose errors, stack traces, debug endpoints
  • Default credentials — admin/admin, root/root still active
  • Unnecessary ports open — database ports exposed to the internet
  • Missing rate limiting — no protection against DoS
  • Missing request size limits — large payloads causing OOM
  • Insecure CORS — wildcard origins on authenticated endpoints
  • Missing CSRF protection — state-changing endpoints without CSRF tokens

10. Stack-Specific Checks

Node.js / Express

  • Verify helmet middleware is installed and configured
  • Check express.json() has a size limit: express.json({limit: '10kb'})
  • Verify cookie settings: httpOnly, secure, sameSite
  • Check for prototype pollution in object merging (lodash.merge, Object.assign with user input)
  • Verify child_process calls sanitize all inputs
  • Check that express-rate-limit is applied to auth endpoints
  • Look for event emitter memory leaks (missing removeListener)
  • Verify no use of eval(), Function(), or vm.runInNewContext() with user input

Python / Django

  • Verify DEBUG = False in production settings
  • Check ALLOWED_HOSTS is not ['*']
  • Verify CSRF middleware is enabled
  • Check for raw SQL queries without parameterization
  • Verify SECRET_KEY is loaded from environment, not hardcoded
  • Check for pickle deserialization of user input (RCE risk)
  • Verify django-cors-headers is configured with specific origins
  • Check that @login_required or permission classes are on all protected views
  • Look for unsafe YAML loading (yaml.load() without Loader=SafeLoader)
  • Verify SECURE_SSL_REDIRECT, SESSION_COOKIE_SECURE, CSRF_COOKIE_SECURE are True in production

Python / Flask

  • Verify app.secret_key is not hardcoded
  • Check for missing @login_required decorators on protected routes
  • Verify Jinja2 auto-escaping is enabled (default in Flask, but check custom templates)
  • Check that flask-talisman or similar is used for security headers
  • Verify flask-limiter is applied to auth and sensitive endpoints
  • Check for unsafe file uploads (missing secure_filename() from werkzeug)

React / Next.js

  • Check for dangerouslySetInnerHTML with unsanitized input
  • Verify no tokens stored in localStorage (use httpOnly cookies)
  • Check for sensitive data in client-side code or bundle
  • Verify environment variables use NEXT_PUBLIC_ prefix only for non-sensitive values
  • Check for open redirects in URL parameters
  • Verify API routes have proper authentication middleware
  • Check that Server Actions validate input and check authorization
  • Look for sensitive data in getServerSideProps that leaks to pageProps
  • Verify next.config.js has proper security headers configured
  • Check for exposed source maps in production

Vue / Nuxt

  • Check for v-html with unsanitized user input
  • Verify no tokens stored in localStorage
  • Check nuxt.config for exposed runtime config secrets
  • Verify server middleware has authentication checks
  • Check for sensitive data leaking from server to client via useAsyncData or useFetch

Ruby on Rails

  • Verify config.force_ssl = true in production
  • Check for html_safe or raw on user-supplied content
  • Verify protect_from_forgery is enabled
  • Check for mass assignment vulnerabilities (missing strong_parameters)
  • Verify has_secure_password uses bcrypt
  • Check for unsafe send() or constantize() with user input
  • Verify config.filter_parameters includes sensitive fields

Go

  • Check for SQL injection in fmt.Sprintf used in queries (use parameterized queries)
  • Verify TLS configuration uses minimum TLS 1.2
  • Check for path traversal in http.ServeFile or os.Open
  • Verify proper error handling (no sensitive data in error responses)
  • Check for race conditions on shared state (missing mutex)
  • Verify crypto/rand is used instead of math/rand for security-sensitive values
  • Check for unchecked type assertions that could cause panics

Java / Spring Boot

  • Verify Spring Security is configured and not using permitAll() on sensitive endpoints
  • Check for SQL injection in @Query annotations with string concatenation
  • Verify CSRF protection is enabled (default in Spring Security)
  • Check for deserialization vulnerabilities (Jackson, Java serialization)
  • Verify @Valid annotation is present on request body parameters
  • Check for hardcoded credentials in application.properties or application.yml
  • Verify actuator endpoints are secured and not exposed publicly
  • Check for Log4j/Log4Shell vulnerability in dependencies

PHP / Laravel

  • Verify APP_DEBUG=false in production .env
  • Check for raw SQL queries without parameter binding
  • Verify CSRF middleware is applied to all POST/PUT/DELETE routes
  • Check for eval(), exec(), system() with user input
  • Verify file uploads use validation rules (mimes, max size)
  • Check that Auth::check() or middleware guards protect sensitive routes
  • Verify mass assignment protection via $fillable or $guarded
  • Check for unsafe blade rendering with {!!!!} on user input

Mobile (React Native / Flutter)

  • Check for sensitive data stored in AsyncStorage/SharedPreferences (use encrypted storage)
  • Verify API keys are not embedded in the app bundle
  • Check for certificate pinning on sensitive API calls
  • Verify deep link handlers validate input before navigation
  • Check for sensitive data in app logs (visible via adb logcat / Console.app)
  • Verify biometric authentication properly validates server-side
  • Check for insecure WebView configurations (JavaScript enabled with untrusted content)

Payment Security

  • Verify PCI DSS compliance requirements are met
  • Check that full credit card numbers are never stored or logged
  • Verify payment processing uses tokenization
  • Check that webhook endpoints validate signatures
  • Verify refund endpoints have proper authorization and rate limiting
  • Check that payment amounts are validated server-side (not trusted from client)
  • Verify payment confirmation pages don't expose transaction details in URLs
  • Check for race conditions in payment processing (double-charge risk)

AWS / Cloud Infrastructure

  • Check for overly permissive IAM policies ("Action": "*", "Resource": "*")
  • Verify S3 buckets are not publicly accessible
  • Check for unencrypted RDS instances or EBS volumes
  • Verify security groups don't allow 0.0.0.0/0 on sensitive ports
  • Check for hardcoded AWS credentials (use IAM roles instead)
  • Verify CloudTrail logging is enabled
  • Check for publicly accessible EC2 instances with sensitive services
  • Verify secrets are stored in AWS Secrets Manager or Parameter Store

Docker / Containers

  • Check for containers running as root
  • Verify base images are from trusted sources and pinned to specific versions
  • Check for secrets baked into Docker images (use build secrets or runtime env)
  • Verify .dockerignore excludes .env, .git, node_modules
  • Check for unnecessary packages installed in production images
  • Verify health checks are configured
  • Check for exposed ports that shouldn't be public

Output Format

For each vulnerability found:

[SEVERITY] Category — File:Line

  • Vulnerability: What the issue is
  • Risk: What an attacker could do with this
  • Proof: How to exploit it (for internal team understanding)
  • Fix: Exact code change to resolve it
  • Reference: CWE or OWASP link if applicable
// vulnerable code
...

// fixed code
...

Severity levels:

  • 🔴 CRITICAL — Actively exploitable. Data breach, RCE, or full system compromise. Fix immediately.
  • 🟠 HIGH — Exploitable with some effort. Significant data exposure or privilege escalation. Fix before next deploy.
  • 🟡 MEDIUM — Requires specific conditions to exploit. Fix within current sprint.
  • 🟢 LOW — Minor issue or defense-in-depth improvement. Fix when convenient.

Summary

End every audit with:

  1. Risk rating — Overall security posture (Critical / High / Medium / Low risk)
  2. Critical findings count — Number of issues that need immediate attention
  3. Top 3 most dangerous issues — Ranked by exploitability and impact
  4. Quick wins — Fixes that take <30 minutes and significantly reduce risk
  5. Recommendations — Longer-term improvements (WAF, security headers, dependency scanning in CI, etc.)
  6. What's done well — Security practices already in place that should be maintained

平台分布

Codex

39.52%
按下载量换算373

Claude

28.42%
按下载量换算268

Cursor

19%
按下载量换算179

Gemini CLI

10.37%
按下载量换算98

安全审计

Gen Agent Trust Hub

通过

Socket

未通过

Snyk

未通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills