跳到正文
cccskills
免费在 GitHub 公开

skill-security-auditor

Review source code, dependencies, and infrastructure settings for security issues. Find exposed credentials, unsafe input handling, and access control gaps, then organize findings into a report with severity levels, affected locations, and recommended fixes.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Security auditing for code, configs, and infrastructure. Use when the user wants to audit or improve security: scan for vulnerabilities (SQL injection, XSS, command injection, path traversal), detect hardcoded secrets and credentials, review auth and authorization, check dependencies for known CVEs, audit config files for insecure defaults, or generate security reports. Trigger on "security audit", "vulnerability scan", "code review for security", "find secrets", "check for vulnerabilities", "OWASP", "CVE", or questions about code security.

查看安装方法

适用场景

  • Review code security before deployment
  • Find API keys and passwords embedded in files
  • Check dependencies for known vulnerabilities
  • Prepare a security report with recommended fixes

包含的文件(6)

  • SKILL.md7.0 KB
  • LICENSE.txt11.1 KB
  • references/secrets-patterns.md4.6 KB
  • references/vulnerability-patterns.md6.8 KB
  • scripts/scan_project.py11.3 KB
  • scripts/scan_secrets.py8.1 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Security Auditor Guide

Overview

This guide covers security auditing workflows for source code, dependencies, and configurations. For detailed vulnerability patterns and detection rules, see references/vulnerability-patterns.md. For secrets detection patterns, see references/secrets-patterns.md.

Quick Start

Run the bundled scan script against a project directory:

python scripts/scan_project.py /path/to/project

This performs a lightweight scan for common issues: hardcoded secrets, dangerous function calls, and insecure patterns. For deeper analysis, follow the workflows below.

Testing the scripts

python scripts/scan_project.py /path/to/some/project --format text
python scripts/scan_secrets.py /path/to/some/project --format text

Audit Workflow

1. Reconnaissance

Before auditing, understand the project:

# Identify languages, frameworks, and entry points
find . -type f -name "*.py" -o -name "*.js" -o -name "*.ts" -o -name "*.go" -o -name "*.java" | head -20
cat package.json pyproject.toml requirements.txt go.mod pom.xml 2>/dev/null

Key questions:

  • What frameworks are used? (Express, Django, Flask, Spring, etc.)
  • Where are the entry points? (routes, controllers, API handlers)
  • How is authentication handled?
  • What external services are called?
  • Is user input accepted? Where?

2. Secrets Detection

Scan for hardcoded credentials, API keys, and tokens. See references/secrets-patterns.md for the full pattern list.

python scripts/scan_secrets.py /path/to/project

Common patterns to check:

  • API keys and tokens in source files
  • Database connection strings with embedded passwords
  • Private keys or certificates committed to the repo
  • .env files or config files with plaintext secrets
  • Secrets in CI/CD configuration files

3. Vulnerability Scanning

OWASP Top 10 Checklist

#CategoryWhat to Look For
A01Broken Access ControlMissing auth checks, IDOR, privilege escalation
A02Cryptographic FailuresWeak algorithms, plaintext storage, missing TLS
A03InjectionSQL, NoSQL, OS command, LDAP, XSS
A04Insecure DesignMissing rate limits, business logic flaws
A05Security MisconfigurationDebug mode, default credentials, verbose errors
A06Vulnerable ComponentsOutdated dependencies with known CVEs
A07Auth FailuresWeak passwords, missing MFA, session issues
A08Data Integrity FailuresInsecure deserialization, unsigned updates
A09Logging FailuresMissing audit logs, sensitive data in logs
A10SSRFUnvalidated URLs in server-side requests

Language-Specific Checks

Python

# Dangerous: SQL injection
cursor.execute(f"SELECT * FROM users WHERE id = {user_id}")
# Safe: Parameterized query
cursor.execute("SELECT * FROM users WHERE id = %s", (user_id,))

# Dangerous: Command injection
os.system(f"ping {hostname}")
# Safe: Use subprocess with list args
subprocess.run(["ping", hostname], capture_output=True)

# Dangerous: Path traversal
open(f"/data/{user_input}")
# Safe: Validate and resolve path
path = pathlib.Path("/data") / user_input
path.resolve().relative_to(pathlib.Path("/data").resolve())

JavaScript/TypeScript

// Dangerous: XSS via innerHTML
element.innerHTML = userInput;
// Safe: Use textContent or sanitize
element.textContent = userInput;

// Dangerous: Prototype pollution
Object.assign(target, JSON.parse(userInput));
// Safe: Validate input structure
const parsed = JSON.parse(userInput);
if (typeof parsed !== 'object' || Array.isArray(parsed)) throw new Error();
const sanitized = Object.fromEntries(
  Object.entries(parsed).filter(([k]) => !k.startsWith('__'))
);

// Dangerous: eval or Function constructor
eval(userInput);
// Safe: Never use eval with user input

Go

// Dangerous: SQL injection
db.Query("SELECT * FROM users WHERE id = " + id)
// Safe: Parameterized query
db.Query("SELECT * FROM users WHERE id = $1", id)

// Dangerous: Path traversal
http.ServeFile(w, r, filepath.Join(baseDir, r.URL.Path))
// Safe: Clean and validate path
cleaned := filepath.Clean(r.URL.Path)
full := filepath.Join(baseDir, cleaned)
if !strings.HasPrefix(full, baseDir) { http.Error(...) }

4. Dependency Audit

Check for known vulnerabilities in project dependencies:

# Python
pip audit
safety check -r requirements.txt

# Node.js
npm audit
npx auditjs ossi

# Go
govulncheck ./...

# General (if Trivy is available)
trivy fs --scanners vuln /path/to/project

Review the output and categorize by severity (critical, high, medium, low). Critical and high severity findings should be addressed before deployment.

5. Configuration Review

Check for insecure defaults in configuration files:

# Common misconfigurations to flag:
DEBUG: true                    # Debug mode in production
ALLOWED_HOSTS: ["*"]          # Unrestricted host access
CORS_ALLOW_ALL_ORIGINS: true  # Open CORS policy
SECRET_KEY: "default"         # Default or weak secret key
SSL_VERIFY: false             # Disabled TLS verification

Check infrastructure configs:

  • Dockerfiles: Running as root, exposing unnecessary ports
  • CI/CD: Secrets in plaintext, overly permissive permissions
  • Cloud configs: Public S3 buckets, open security groups

6. Authentication and Authorization Review

Key areas to verify:

  • Password hashing uses strong algorithms (bcrypt, argon2, scrypt)
  • Sessions have appropriate timeouts and rotation
  • JWT tokens are validated properly (algorithm, expiry, signature)
  • API endpoints enforce authorization checks
  • Role-based access control is consistently applied
  • Rate limiting is in place for login and sensitive endpoints

Report Format

When generating a security audit report, use this structure:

# Security Audit Report

## Summary
- **Project**: [name]
- **Date**: [date]
- **Scope**: [what was audited]
- **Risk Level**: [Critical/High/Medium/Low]

## Findings

### [SEVERITY] Finding Title
- **Category**: [OWASP category]
- **Location**: [file:line]
- **Description**: [what the issue is]
- **Impact**: [what could happen if exploited]
- **Recommendation**: [how to fix]

## Statistics
- Total findings: [count]
- Critical: [count] | High: [count] | Medium: [count] | Low: [count]

Next Steps

  • For detailed vulnerability patterns and code examples, see references/vulnerability-patterns.md
  • For secrets detection regex patterns, see references/secrets-patterns.md

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

docx

免费

Create, read, and edit Word documents with headings, tables, page numbers, and images. Use it to turn content into formatted reports or letters, reorganize existing documents, replace text, and work with tracked changes and comments.

中文简介正在准备中。当前显示英语简介。

  • Create a Word report with a table of contents and page numbers
  • Extract and reorganize content from an existing document
  • Replace images or text in a Word file
eigent-ai/eigent1.6万2026年10月18日 更新

pdf

免费

Read, create, and organize PDF files, including merging documents, splitting pages, extracting tables, and filling forms. It also covers password protection and OCR, which recognizes text in scanned pages for extraction or search.

中文简介正在准备中。当前显示英语简介。

  • Merge PDFs or split out selected pages
  • Extract PDF text and tables for reuse
  • Recognize text in scanned documents
eigent-ai/eigent1.6万2026年10月18日 更新

pptx

免费

Create, edit, and reorganize PowerPoint presentations, or extract text from existing decks. Use templates or build slides from scratch, apply consistent visual styling, and inspect rendered slide images to find content and layout problems.

中文简介正在准备中。当前显示英语简介。

  • Create a presentation or pitch deck
  • Update slides using an existing template
  • Extract slide text for a summary
eigent-ai/eigent1.6万2026年10月18日 更新

Turn recurring tasks and specialized knowledge into reusable agent skills. Plan instructions and supporting files, generate a starting structure, refine existing skills, and validate and package the result as a distributable .skill file.

中文简介正在准备中。当前显示英语简介。

  • Turn a recurring workflow into an agent skill
  • Organize reference documents and reusable templates
  • Refine instructions in an existing skill
eigent-ai/eigent1.6万2026年10月18日 更新

xlsx

免费

Create and edit spreadsheet files, clean messy tables, and convert tabular formats. Add formulas, formatting, and charts while following existing template styles, then recalculate formulas and check for errors before delivering the spreadsheet.

中文简介正在准备中。当前显示英语简介。

  • Clean messy CSV data into a spreadsheet
  • Add formulas and charts to an Excel workbook
  • Update a workbook using its existing formatting
eigent-ai/eigent1.6万2026年10月18日 更新

查看 eigent-ai 的全部技能

报告此技能的问题