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

reviewing-security-architecture审查安全架构

Agent Skill

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

总安装

642

周安装

27

GitHub Stars

84

下载量

225
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/bitwarden/ai-plugins --skill reviewing-security-architecture

简介

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

  • 适合梳理敏感配置、检查依赖风险或分析鉴权逻辑。
  • 不能把工具输出直接当最终结论,需人工复核关键判断。
  • 涉及密钥、令牌或生产系统时,应先确认最小权限和操作边界。
  • 建议使用脱敏方式处理敏感信息,避免泄露。reviewing-security-architecture 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Authentication Architecture

Token Handling

Review these aspects of token-based authentication:

AspectSecure PatternAnti-Pattern
IssuanceShort-lived tokens with refresh mechanismLong-lived tokens that never expire
ValidationValidate signature, issuer, audience, and expiry on every requestValidate only the signature, or skip validation for "internal" calls
Storage (server)Stateless JWT or server-side session storeToken stored in querystring or URL
Storage (client)HttpOnly Secure cookies or secure platform storagelocalStorage, sessionStorage, or cookies without HttpOnly/Secure flags
RefreshRefresh token rotation (old refresh token invalidated on use)Reusable refresh tokens with no rotation
RevocationToken blocklist or short expiry + refresh rotationNo revocation mechanism for compromised tokens

Session Management

  • Server-side sessions should have absolute timeouts (maximum session duration) and idle timeouts
  • Session identifiers must be cryptographically random and sufficiently long (128+ bits of entropy)
  • Regenerate session ID after authentication state changes (login, privilege escalation)
  • Bind sessions to client properties where possible (IP range, user agent) for anomaly detection

Credential Storage

  • Passwords must be hashed with a modern KDF: Argon2id (preferred), bcrypt, or PBKDF2 with high work factor and a unique salt
  • Never use raw cryptographic hash functions alone for password hashing (too fast, no salt by default)
  • Salts should be unique per credential to prevent rainbow-tables from accelerating brute-force attacks

Authorization Patterns

Role-Based Access Control (RBAC)

// CORRECT — explicit role check at the API layer
[Authorize(Roles = "Admin")]
public async Task<IActionResult> DeleteUser(Guid userId)

// WRONG — checking role in business logic with string comparison
if (currentUser.Role == "admin") // Fragile, case-sensitive, easy to bypass

Object-Level Authorization

// WRONG — trusts the userId from the route, no ownership check
public async Task<Cipher> GetCipher(Guid cipherId) {
    return await _cipherRepository.GetByIdAsync(cipherId);
}

// CORRECT — verify the requesting user owns the resource
public async Task<Cipher> GetCipher(Guid cipherId) {
    var cipher = await _cipherRepository.GetByIdAsync(cipherId);
    if (cipher.UserId != _currentContext.UserId)
        throw new NotFoundException();
    return cipher;
}

Authorization Principles

  • Check at every layer. API controller, service layer, and data access should all enforce authorization. Don't rely on a single checkpoint.
  • Least privilege. Grant the minimum permissions needed. Default to deny.
  • Fail closed. If an authorization check fails or throws an exception, deny access. Never fail open.
  • Don't trust client-side authorization. UI visibility controls are UX, not security. Always enforce server-side.

Data Protection

Encryption at Rest

  • All sensitive data must be encrypted at rest using AES-256 or equivalent
  • Cryptographic keys MUST NEVER be stored directly accessible in a database, without being wrapped by another key
  • Use envelope encryption: data encrypted with a data encryption key (DEK), DEK encrypted with a key encryption key (KEK) in a key management system
  • Bitwarden's end-to-end encryption ensures vault data is encrypted before leaving the client

Encryption in Transit

  • TLS 1.2 minimum, TLS 1.3 preferred
  • Disable older protocols (SSL 3.0, TLS 1.0, TLS 1.1)
  • Use strong cipher suites (ECDHE for key exchange, AES-GCM for encryption)
  • Certificate pinning for mobile apps where appropriate
  • Internal service-to-service communication should also use TLS

Data Classification

When reviewing architecture, identify data by classification:

ClassificationExamplesRequired Protection
CriticalEncryption keys, master passwords, vault dataEnd-to-end encryption, HSM key storage
ConfidentialPII, email addresses, billing infoEncryption at rest + in transit, access logging
InternalOrganizational settings, feature flagsEncryption in transit, role-based access
PublicMarketing content, public API docsIntegrity protection

Trust Boundaries

A trust boundary exists wherever data crosses between components with different levels of trust. Every crossing must be validated.

Common Trust Boundaries

Client ←→ API Gateway         (user-controlled → server-controlled)
API Gateway ←→ Backend Service (internet-facing → internal)
Backend Service ←→ Database    (application → data store)
Service ←→ External API        (internal → third-party)
Browser ←→ Browser Extension   (page context → extension context)
Main Thread ←→ Web Worker      (different execution contexts)

Validation at Trust Boundaries

At each boundary crossing:

  1. Validate all input — type, format, range, length. Don't trust upstream validation.
  2. Authenticate the caller — verify identity before processing requests.
  3. Authorize the action — verify the caller has permission for this specific operation.
  4. Sanitize output — encode/escape data appropriate to the destination context.
  5. Log the crossing — security-relevant boundary crossings should be auditable.

Zero-Trust Principles

  • Don't trust internal network location as a proxy for authentication
  • Every service-to-service call should be authenticated and authorized
  • Assume the network is compromised — encrypt all internal communication
  • Validate data from internal services just as rigorously as external input

Reference Material

For detailed lookup tables and code examples, consult:

  • references/crypto-algorithms.md — Algorithm selection table (recommended vs. deprecated) and common crypto anti-pattern code examples
  • references/architectural-anti-patterns.md — Common security architecture anti-patterns (implicit trust, single points of failure, insecure defaults, monolithic auth) with fixes

Connection to Threat Modeling

Architecture security review directly feeds into the threat modeling process:

  • Trust boundary identification informs where to draw boundaries in data flow diagrams
  • Architectural weaknesses become threats in the threat catalog
  • Security properties (auth, encryption, access control) map to security goals in security definitions
  • Anti-patterns found become candidates for Bitwarden's engagement model Phase 1 initial security assessment

When conducting architecture review, consider whether the findings warrant engaging the AppSec team (#team-eng-appsec) for a full threat modeling session.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

38.11%
按下载量换算86

Claude

31.68%
按下载量换算71

Cursor

17.55%
按下载量换算39

Gemini CLI

9.38%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

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

安装前确认

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

来源信息

继续浏览同类 Skills