Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计通过

web-security-hardening网络安全强化

Agent Skill

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

总安装

720

周安装

25

GitHub Stars

4

下载量

351
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/dtsong/my-claude-setup --skill web-security-hardening

简介

用于辅助安全审计、权限检查和常见漏洞排查。

  • 适合梳理敏感配置、分析鉴权逻辑或生成安全加固方案。
  • 不能将工具输出直接当作最终结论,需人工复核关键风险点。
  • 涉及生产系统或凭据管理时,应先确认脱敏方式和操作权限。
  • web-security-hardening 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Web Security Hardening

Security audit checklist for web applications. Run through each item when reviewing or building web apps.

Audit Workflow

  1. Identify the framework (Node.js/Express, Python/Django/Flask, etc.)
  2. Review each checklist item below
  3. For implementation details, see framework-specific references:

- Node.js/Express: See references/nodejs.md - Python/Django/Flask: See references/python.md

  1. For production deployments, see references/production-gcp.md for extended checklist covering:

- GCP infrastructure (IAM, networking, secrets) - CI/CD pipeline security - Monitoring & incident response

  1. Report findings with severity and remediation steps

Security Checklist

1. Rate Limiting

Risk: DoS attacks, brute force attempts, API abuse

Check for:

  • Per-endpoint rate limits (stricter on auth endpoints)
  • Rate limit headers in responses (X-RateLimit-*)
  • Appropriate limits for different user tiers

2. Security & Authorization Headers

Risk: XSS, clickjacking, MIME sniffing, info leakage

Required headers:

  • Strict-Transport-Security (HSTS)
  • X-Content-Type-Options: nosniff
  • X-Frame-Options: DENY or SAMEORIGIN
  • Content-Security-Policy
  • Authorization header validation on protected routes

3. IP Block List (Public APIs)

Risk: Abuse from known bad actors, bot traffic

Check for:

  • IP-based blocking mechanism
  • Integration with threat intelligence feeds (optional)
  • Logging of blocked requests

4. CORS Configuration

Risk: Unauthorized cross-origin requests, data theft

Check for:

  • Explicit origin whitelist (not * in production)
  • Appropriate methods and headers allowed
  • Credentials handling if needed

5. Security Middleware

Risk: Common web vulnerabilities

Check for framework-appropriate middleware:

  • Node.js: helmet
  • Python: django-secure, flask-talisman
  • Sets multiple security headers automatically

6. Input Validation

Risk: Injection attacks, data corruption, XSS

Check for:

  • Frontend validation (UX, not security)
  • Backend validation (required for security)
  • Schema validation libraries (Zod, Joi, Pydantic, etc.)
  • Sanitization of user input before storage/display

7. File Upload Limits

Risk: Storage exhaustion, malicious file uploads

Check for:

  • Max file size limits
  • Allowed file type restrictions (MIME + extension)
  • File content validation (magic bytes)
  • Secure storage location (outside webroot)

8. ORM for Database Access

Risk: SQL injection

Check for:

  • Parameterized queries (never string concatenation)
  • ORM usage (Prisma, Sequelize, SQLAlchemy, Django ORM)
  • If raw SQL needed: prepared statements only

9. Password Hashing

Risk: Credential theft, rainbow table attacks

Check for:

  • Strong algorithm: bcrypt, Argon2, or scrypt
  • Appropriate cost factor (bcrypt rounds ≥10)
  • No MD5, SHA1, or plain SHA256 for passwords
  • No plaintext password storage or logging

Gotchas

  • CORS credentials: true + origin: '*' fails silently in browsers — must specify explicit origin when using credentials
  • helmet() defaults changed between v4 and v5 — CSP is no longer set by default in v5, must configure explicitly
  • CSP unsafe-inline negates most XSS protection — if you need inline scripts, use nonces or hashes instead
  • express.json() without limit accepts arbitrarily large payloads — always set limit: '1mb' or similar
  • httpOnly cookies prevent XSS token theft but NOT CSRF — still need CSRF tokens or SameSite=Strict
  • Rate limiting per IP fails behind reverse proxies — must set trust proxy and use X-Forwarded-For
  • bcrypt silently truncates passwords at 72 bytes — use Argon2 for long passphrases or pre-hash with SHA-256
// WRONG: credentials with wildcard origin (silently fails)
app.use(cors({ origin: '*', credentials: true }));
// RIGHT: explicit origin
app.use(cors({ origin: 'https://app.example.com', credentials: true }));

// WRONG: helmet v5 without CSP (no longer set by default)
app.use(helmet());
// RIGHT: explicit CSP
app.use(helmet({ contentSecurityPolicy: { directives: { defaultSrc: ["'self'"] } } }));

Audit Report Format

## Security Audit: [App Name]

### Summary
- **Items Passing**: X/9
- **Critical Issues**: X
- **Recommendations**: X

### Findings

#### [Item Name] - [PASS/FAIL/PARTIAL]
**Severity**: Critical/High/Medium/Low
**Finding**: [Description]
**Location**: [File/endpoint]
**Remediation**: [Steps to fix]

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.06%
按下载量换算120

Claude

28.67%
按下载量换算101

Cursor

18.57%
按下载量换算65

Gemini CLI

10.77%
按下载量换算38

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills