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

shared-security-auth-security共享安全 身份验证安全

Agent Skill

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

总安装

282

周安装

12

GitHub Stars

5

下载量

99
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/agents-inc/skills --skill shared-security-auth-security

简介

用于辅助安全审计、权限检查和认证流程分析。

  • 适合让 Agent 梳理敏感配置、检查依赖风险或生成安全复核清单。
  • 使用时不能把工具输出直接当最终结论。shared-security-auth-security 属于开发类 Skill,可作为该场景下的辅助能力补充。
  • 涉及密钥、令牌或生产系统时,应先确认最小权限和脱敏方式。
  • 当前无额外底部简介内容,可参考来源仓库进一步了解功能细节。

SKILL.md

Security Patterns

Quick Guide: Managing secrets? Use.env.local (gitignored), CI secrets, rotate on compromise or team changes. Dependency security? Enable automated scanning (Dependabot), patch critical vulns within 24hrs. XSS prevention? Modern frameworks auto-escape output by default - never bypass with raw HTML injection unless sanitized with DOMPurify. Set CSP headers. CODEOWNERS? Require security team review for auth/,.env.example, workflows.

Detailed Resources:

Additional Examples:


<critical_requirements>

CRITICAL: Before Using This Skill

All code must follow project conventions in CLAUDE.md (kebab-case, named exports, import ordering, import type, named constants)

(You MUST NEVER commit secrets to the repository - use.env.local and CI secrets only)

(You MUST sanitize ALL user input before rendering raw HTML - use DOMPurify before any HTML injection)

(You MUST patch critical/high vulnerabilities within 24 hours - use Dependabot for automated scanning)

(You MUST use HttpOnly cookies for authentication tokens - NEVER localStorage or sessionStorage)

(You MUST configure CODEOWNERS for security-sensitive files - require security team approval)

</critical_requirements>


Auto-detection: security, secrets management, XSS prevention, CSRF protection, Dependabot, vulnerability scanning, authentication, DOMPurify, CSP headers, CODEOWNERS, HttpOnly cookies

When to use:

  • Managing secrets securely (never commit, use.env.local and CI secrets)
  • Setting up Dependabot for automated vulnerability scanning
  • Preventing XSS attacks (framework auto-escaping, DOMPurify, CSP headers)
  • Configuring CODEOWNERS for security-sensitive code
  • Implementing secure authentication and token storage

When NOT to use:

  • For general code quality reviews (not a security concern)
  • For performance optimization (different domain)
  • For CI/CD pipeline setup (security patterns here are for code, not infrastructure)
  • When security review would delay critical hotfixes (document for follow-up)

Key patterns covered:

  • Never commit secrets (.gitignore, CI secrets, rotation policies quarterly)
  • Automated dependency scanning with Dependabot (critical within 24h)
  • XSS prevention (framework auto-escaping, DOMPurify for HTML, CSP headers)
  • CSRF protection with tokens and SameSite cookies
  • CODEOWNERS for security-sensitive areas (.env.example, auth code, workflows)
  • Secure token storage (HttpOnly cookies, in-memory access tokens)

Philosophy

Security is not a feature - it's a foundation. Every line of code must be written with security in mind. Defense in depth means multiple layers of protection, so if one fails, others catch the attack.

When to use security patterns:

  • Always - security is not optional
  • When handling user input (sanitize and validate)
  • When managing secrets (environment variables, rotation)
  • When storing authentication tokens (HttpOnly cookies)
  • When setting up CI/CD (vulnerability scanning, CODEOWNERS)

When NOT to compromise:

  • Never skip HTTPS in production
  • Never trust client-side validation alone
  • Never commit secrets to repository
  • Never use localStorage for sensitive tokens
  • Never bypass security reviews for critical code

Core principles:

  • Least privilege: Grant minimum necessary access
  • Defense in depth: Multiple layers of security
  • Fail securely: Default to deny, not allow
  • Don't trust user input: Always validate and sanitize
  • Assume breach: Plan for when (not if) attacks happen

Core Patterns

Pattern 1: Secret Management

Never commit secrets to the repository. Use environment variables in.env.local (gitignored) for development, and CI/CD secret managers for production. Rotate secrets quarterly or on team member departure.

What Are Secrets

Secrets include: API keys, tokens, passwords, database credentials, private keys, certificates, OAuth client secrets, encryption keys, JWT secrets.

Where to Store Secrets

Development:

  • .env.local (gitignored)
  • Per-developer local overrides
  • Never committed to repository

CI/CD:

  • GitHub Secrets
  • Vercel Environment Variables
  • GitLab CI/CD Variables
  • Other platform secret managers

Production:

  • Environment variables (injected by platform)
  • Secret management services (AWS Secrets Manager, HashiCorp Vault)
  • Never hardcoded in code

Rotation Policies

Note: NIST SP 800-63-4 (2025) recommends against mandatory periodic password rotation for users. Instead, use event-based rotation (on compromise, team member departure, or security incident). Periodic rotation is still recommended for service accounts and privileged access.

Secret TypeRotation Frequency
Service account credentials90 days (quarterly)
API keys365 days (annually) or on compromise
User passwordsOn compromise only (NIST 2025 guidance)
Privileged account passwords90 days (quarterly)
Certificates30 days warning before expiry
All secretsImmediately on team member departure

See examples/core.md for code examples.


Pattern 2: Dependency Security

Enable automated vulnerability scanning with Dependabot to catch security issues in dependencies. Patch critical vulnerabilities within 24 hours, high within 1 week, medium within 1 month.

Update Policies

Security updates:

  • Critical vulnerabilities - Immediate (within 24 hours)
  • High vulnerabilities - Within 1 week
  • Medium vulnerabilities - Within 1 month
  • Low vulnerabilities - Next regular update cycle

Regular updates:

  • Patch updates (1.2.3 -> 1.2.4) - Auto-merge if tests pass
  • Minor updates (1.2.0 -> 1.3.0) - Review changes, test, merge
  • Major updates (1.0.0 -> 2.0.0) - Plan migration, test thoroughly

See examples/dependency-security.md for Dependabot configuration and CI security check scripts.


Pattern 3: XSS Prevention

Modern UI frameworks auto-escape user input by default. Never bypass this protection with raw HTML injection unless sanitized with DOMPurify. Configure Content Security Policy (CSP) headers to block unauthorized scripts.

Framework Auto-escaping

Most frameworks escape text content automatically. Only explicit HTML injection APIs (e.g., dangerouslySetInnerHTML, v-html, {@html}) bypass this protection.

DOMPurify Sanitization

When HTML rendering is required, use DOMPurify with a whitelist of allowed tags and attributes.

Content Security Policy

Configure CSP headers to prevent unauthorized script execution even if XSS occurs.

See examples/xss-prevention.md for DOMPurify and CSP code examples.


OWASP Top 10:2025 Coverage

This skill addresses the following OWASP Top 10:2025 categories:

OWASP CategoryCoverage
A01: Broken Access ControlCODEOWNERS, branch protection, rate limiting
A02: Security MisconfigurationCSP headers, security headers, Dependabot
A03: Software Supply Chain FailuresDependabot, CI security audits, dependency review
A04: Cryptographic FailuresHttpOnly/Secure cookies, HTTPS enforcement
A05: InjectionDOMPurify, framework auto-escaping, CSP
A07: Authentication FailuresHttpOnly cookies, session management
A10: Mishandling of Exceptional ConditionsFail securely principle, error handling

Defense in depth layers:

  • Secrets:.env.local (dev) -> CI secrets -> Environment variables (production)
  • XSS: Framework auto-escaping -> DOMPurify sanitization -> CSP headers
  • CSRF: Tokens -> SameSite cookies -> Server-side validation
  • Dependencies: Automated scanning -> CI security audit -> Manual review

<red_flags>

RED FLAGS

High Priority Issues:

  • Committing secrets to repository (.env files, API keys in code)
  • Injecting raw HTML with unsanitized user input (enables XSS attacks)
  • Storing authentication tokens in localStorage/sessionStorage (accessible to XSS)
  • No CSRF protection on state-changing operations (allows forged requests)
  • Critical/high vulnerabilities unpatched (exploit window open)

Medium Priority Issues:

  • No Dependabot configuration (manual vulnerability detection only)
  • Missing CODEOWNERS for security-sensitive files (no automatic review)
  • No CSP headers configured (no script execution controls)
  • Individual CODEOWNERS instead of teams (single point of failure)
  • Trusting client-side validation only (easily bypassed)
  • Exposing internal error details to users (information leakage)

Gotchas & Edge Cases:

  • .env.local is gitignored by default in some frameworks but not all - verify your .gitignore
  • DOMPurify's default config allows <style> and <form> tags - use explicit whitelist
  • SameSite=Strict blocks legitimate cross-site requests - use Lax for general session cookies
  • CSP nonces must be unique per request - generate fresh nonces server-side
  • X-XSS-Protection header is deprecated - set to "0" or omit, use CSP instead

See reference.md for common mistakes, anti-patterns with code examples, and decision frameworks.

</red_flags>


<critical_reminders>

CRITICAL REMINDERS

All code must follow project conventions in CLAUDE.md

(You MUST NEVER commit secrets to the repository - use.env.local and CI secrets only)

(You MUST sanitize ALL user input before rendering raw HTML - use DOMPurify before any HTML injection)

(You MUST patch critical/high vulnerabilities within 24 hours - use Dependabot for automated scanning)

(You MUST use HttpOnly cookies for authentication tokens - NEVER localStorage or sessionStorage)

(You MUST configure CODEOWNERS for security-sensitive files - require security team approval)

Failure to follow these rules will create security vulnerabilities enabling XSS attacks, token theft, CSRF attacks, and data breaches.

</critical_reminders>

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

37.63%
按下载量换算37

Claude

28.42%
按下载量换算28

Cursor

17.62%
按下载量换算17

Gemini CLI

9.44%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

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

安装前确认

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

来源信息

继续浏览同类 Skills