Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计通过

security安全

Agent Skill

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

总安装

312

周安装

13

GitHub Stars

182

下载量

104
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/garagon/nanostack --skill security

简介

security 用于辅助安全审计、权限检查、凭据风险排查和常见漏洞分析。

  • 适合梳理敏感配置、检查依赖风险或生成安全复核清单。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用。
  • 使用时不能将工具输出直接作为最终结论,涉及密钥或生产系统时应确认最小权限。
  • 建议结合项目实际环境核验操作边界和脱敏方式。

SKILL.md

/security — Security Audit

You think like an attacker but report like a defender. The real attack surface is rarely the code you wrote. It is the secrets in git history, the dependency you forgot to update, the CI pipeline that leaks tokens, and the AI endpoint without rate limiting. Start there, not at the application logic.

Intensity Mode

ModeFlagScopeConfidence gate
Quick--quickOWASP A01-A03 (top 3) + secrets scan + dependency check9/10 — only verified findings
Standard(default)Full OWASP A01-A10 + STRIDE per component + dependencies7/10 — report anything with evidence
Thorough--thoroughFull OWASP + STRIDE + variant analysis + conflict detection + LLM security check3/10 — flag tentative findings marked as TENTATIVE

Auto-suggest:

  • Pre-commit on small changes → suggest --quick
  • Pre-ship standard feature → --standard (default)
  • Pre-ship auth/payment/infra, or first audit of a codebase → suggest --thorough

Thorough-only features:

  • Variant analysis: When a finding is VERIFIED, search the entire codebase for the same pattern. One confirmed SQL injection means there may be more.
  • Conflict detection: Cross-reference with /review artifacts in .nanostack/review/ for contradictions.
  • TENTATIVE findings: Below confidence gate but worth noting. Mark as TENTATIVE: <description>.

Setup (first run per project)

Read the plan artifact if one exists:

~/.claude/skills/nanostack/bin/find-artifact.sh plan 2

If found:

  • planned_files[] → focus your audit on these files and their dependencies. Deeper analysis on fewer files is better than shallow analysis on everything.
  • risks[] → treat each planned risk as a security hypothesis to verify. If the plan says "AWS SDK version compatibility" is a risk, check for insecure SDK usage patterns.

Then read project config: bin/init-config.sh. Use detected to scope which checks to run (skip Python checks in a Go project). Use preferences.conflict_precedence for cross-skill conflicts.

Then check if security/config.json exists. If not, ask the user to classify the project:

What type of project is this?
1. Public-facing (users/customers on the internet)
2. Internal (employees/team only, no public access)
3. Compliance-driven (fintech, health, regulated)
4. Library/SDK (consumed by other developers)

Store the answer:

// security/config.json
{
  "project_type": "public_facing",
  "conflict_precedence": "security > review > qa",
  "configured_at": "2026-03-25"
}

This determines:

  • Conflict precedence: public_facing → security wins. internal → review wins. compliance → security wins hard.
  • Default intensity: public_facing/compliance → suggest --thorough on first audit. internal/library → --standard.
  • OWASP priority: public_facing → A01, A03, A07 first. internal → A02, A05, A09 first.

If config already exists, read it and skip setup.

Process

1. Detect Stack

Auto-detect everything. Do NOT ask the user.

  • package.json → Node.js (check for next, express, fastify, hono)
  • requirements.txt / pyproject.toml → Python (flask, django, fastapi)
  • go.mod → Go (gin, echo, chi)
  • Database deps: prisma, drizzle, mongoose, sqlalchemy, gorm
  • BaaS: supabase, firebase, convex
  • Auth: next-auth, clerk, passport, lucia, jwt
  • AI/LLM: openai, anthropic, langchain, vercel ai sdk
  • Payments: stripe, paddle
  • Infra: Dockerfile, docker-compose.yml, .github/workflows/

Report one-line: Detected: Next.js 14 + Prisma + Stripe, Docker, GitHub Actions

2. Scan

CORE (always run): secrets, injection, auth, config, dependencies, data-exposure.

CONDITIONAL (only if detected): AI/LLM endpoints, payment webhook verification, Docker misconfig, CI/CD pipeline security, file upload handling.

For extended check patterns, reference the OWASP checklist at security/references/owasp-checklist.md.

Read security/references/owasp-checklist.md for the OWASP A01-A10 framework.

Secrets Scan (CRITICAL — always first)

Search for hardcoded credentials using regex patterns:

PatternWhat
AKIA[0-9A-Z]{16}AWS access key
sk_live_[a-zA-Z0-9]{24,}Stripe live key
sk-proj-[a-zA-Z0-9\-_]{20,}OpenAI project key
sk-ant-[a-zA-Z0-9\-_]{80,}Anthropic key
ghp_[a-zA-Z0-9]{36}GitHub PAT
`-----BEGIN (RSA\EC\OPENSSH) PRIVATE KEY`Private key in code
`(postgres\mysql\mongodb\+srv):\/\/[^:\s]+:[^@\s]+@`DB connection string with password

Context rules: In *.test.*, *.example, README*, or values containing xxx, TODO, placeholder → downgrade to INFO.

Git history check (mandatory):

git log --all --oneline -- '.env' '.env.local' '*.pem' '*.key' 2>/dev/null | head -10

If results: secrets may be in history even if currently gitignored. CRITICAL — credentials must be rotated.

IMPORTANT: Credential redaction. When reporting secrets, NEVER show the full value. First 4 chars + **** (e.g., sk-pr****).

CI/CD Pipeline Security (if .github/workflows/ exists)

CheckWhat to look for
Unpinned actionsuses: action@main instead of uses: action@sha256
pull_request_targetRuns with write access on fork PRs — code injection vector
Secrets in logsecho ${{secrets.*}} or debug mode exposing secrets
Overpermissioned GITHUB_TOKENpermissions: write-all when only contents: read needed

AI/LLM Security (if AI deps detected)

CheckWhat to look for
API keys in client bundleNEXT_PUBLIC_OPENAI, NEXT_PUBLIC_ANTHROPIC
Prompt injectionUser input interpolated into system prompts (prompt + req.body)
Missing rate limitingAI endpoints without rate limiter — attacker runs up your bill
Unsanitized LLM outputLLM response rendered as HTML without escaping

3. False Positive/Negative Traps

Skip these (false positives):

  • .env.example / .env.sample — placeholders, not leaks
  • sk_test_ / pk_test_ — Stripe TEST keys, INFO at most
  • UUIDs as identifiers — unguessable, don't flag
  • React/Angular output — XSS-safe by default, only flag escape hatches
  • eval() in build configs (webpack, vite) — normal tooling
  • 0.0.0.0 binding inside Docker — expected container behavior
  • SQL in migration files — expected patterns

Don't miss these (false negatives):

  • Auth on route but not on data query — IDOR through direct DB access
  • Secrets removed from code but still in git log
  • Rate limiting on login but not on password reset
  • SSRF via URL params hitting cloud metadata (169.254.169.254)
  • dangerouslySetInnerHTML without DOMPurify sanitization

3. STRIDE Threat Model

For each component in the system, evaluate:

ThreatQuestion
SpoofingCan an attacker impersonate a user or service?
TamperingCan data be modified in transit or at rest without detection?
RepudiationCan actions be performed without an audit trail?
Information DisclosureCan sensitive data leak through errors, logs, or side channels?
Denial of ServiceCan the system be overwhelmed or made unavailable?
Elevation of PrivilegeCan a user gain permissions they shouldn't have?

4. Produce Report

Report findings progressively. Don't wait until the end. As each phase completes, output its findings immediately so the user sees work happening.

Open with a summary line:

Security: CRITICAL (0) HIGH (1) MEDIUM (2) LOW (1) = 4 findings. Score: B

Scoring: A = 0 critical, 0 high, ≤3 medium. B = 0 critical, 1-2 high. C = 3+ high. D = 1-2 critical. F = 3+ critical.

Use security/templates/security-report.md for the full structure. Every finding must include:

  • What the vulnerability is (specific, not vague)
  • Where it exists (file path and line number)
  • How to exploit it (proof of concept or clear scenario)
  • Fix with actual code, before and after (not "consider sanitizing input")
  • Severity using the classification below

Always close with What's solid: 2-3 specific things the codebase does well on security. Not filler. If the auth is well implemented, say so and say why.

Severity Classification

SeverityCriteriaExamples
CriticalExploitable remotely, no authentication required, leads to full compromiseRCE, SQL injection with admin access, hardcoded admin credentials
HighExploitable with some conditions, significant impactStored XSS, IDOR exposing sensitive data, privilege escalation
MediumRequires specific conditions or has limited impactCSRF, information disclosure via error messages, missing rate limiting
LowInformational or requires unlikely conditionsMissing security headers, verbose error messages, outdated non-vulnerable dependency

Conflict Detection

Always check for conflicts with prior /review findings if a review artifact exists:

~/.claude/skills/nanostack/bin/find-artifact.sh review 30

Read reference/conflict-precedents.md for known conflict patterns. When detected, mark inline:

### SEC-005: Excessive error detail
**Conflicts with:** REV-003 → RESOLUTION: structured errors (code + generic msg to user, details to logs)

In --quick mode, apply default precedence (security > review) without documenting. In --standard mode, document conflicts inline. In --thorough mode, document conflicts AND flag as BLOCKING until user confirms.

After completing the audit and conflict detection, save the artifact. Run this command now — do not skip it:

~/.claude/skills/nanostack/bin/save-artifact.sh security '<json with phase, mode, summary, findings, conflicts, context_checkpoint including summary, key_files, decisions_made, open_questions>'

Mode Summary

AspectQuickStandardThorough
OWASP scopeA01-A03 onlyFull A01-A10Full + variant analysis
STRIDESkipPer componentPer component + attack trees
Dependenciesnpm audit onlyFull scanFull + license check
Conflict detectionAuto-resolveDocument inlineBLOCKING until resolved
Tentative findingsSkipSkipReport as TENTATIVE
Confidence gate9/107/103/10

Next Step

After the security audit is complete and the artifact is saved:

If AUTOPILOT is active and no critical/high findings: Proceed to next pending skill (/qa or /ship). Show: Autopilot: security grade X (0 critical, 0 high). Running /qa...

If AUTOPILOT is active but critical or high findings found: Stop and ask the user to review. Show the findings and wait. After resolution, continue autopilot.

Otherwise: Tell the user:

Security audit complete. Remaining steps: - /review to run code review (if not done yet) - /qa to test that everything works (if not done yet) - /ship to create the PR (after review, security and qa pass)

Gotchas

  • If you find zero vulnerabilities, say so. A clean audit is a valid result. Don't manufacture findings to justify the scan.
  • Don't inflate severity. Missing security headers on an internal tool is Low, not Medium. Calibrate to actual exploitability.
  • Don't report theoretical vulnerabilities without evidence. "This could be vulnerable to XSS" is not a finding. Show the input path, the sink, and the missing sanitization.
  • Don't skip dependency scanning. Run npm audit, pip audit, go vuln check, or equivalent. Known CVEs in dependencies are the lowest-hanging fruit.
  • Don't ignore configuration. .env.example, docker-compose.yml, CI/CD configs, and cloud IAM policies are part of the attack surface.
  • Don't confuse defense-in-depth with redundancy. Multiple layers of validation at different trust boundaries is correct. Validating the same thing three times in the same function is not.
  • Authentication ≠ Authorization. Checking that a user is logged in does not mean checking that they have permission to access the resource.
  • Secrets in git history are still exposed. Even if a secret was removed in a later commit, it exists in the history. Check with git log -p --all -S 'password\|secret\|key\|token'.
  • Variant analysis is not optional in --thorough. One confirmed finding means the pattern may exist elsewhere. Search for it.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

38.22%
按下载量换算40

Claude

28.7%
按下载量换算30

Cursor

18.46%
按下载量换算19

Gemini CLI

9.59%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

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

安装前确认

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

来源信息

继续浏览同类 Skills