security-guidance

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Security Guidance

安全指南

Core Principle

核心原则

Security is a first-class requirement. Before completing any plan or producing any code that touches security-sensitive operations, consult the ASVS reference index below and apply all relevant guidance.
All generated code and plans must demonstrably adhere to the selected guidance, with safe defaults and explicit inline citations.
安全是首要要求。在完成任何涉及安全敏感操作的计划或编写相关代码之前,请查阅下方的ASVS参考索引并应用所有相关指导内容。
所有生成的代码和计划必须明确遵循所选指导内容,采用安全默认配置并在代码内明确引用相关要求。

Workflow

工作流程

  1. Identify relevant sections — Match the current task against the
    When to use:
    triggers in the index below. A task may match multiple sections; apply all of them.
  2. Read the reference file — For each matched section, read the full reference file listed at the end of its index entry to get the complete verification requirements.
  3. Apply the guidance — Implement the requirements. Default to the most secure option when the requirements allow choice. Apply all Level 1 requirements as a minimum baseline; note any Level 2 or Level 3 requirements that are relevant but not yet implemented.
  4. Cite applied requirements inline — In code comments or plan notes, reference each requirement you satisfy:
    // ASVS 6.2.4: password checked against top-3000 list
    .
  1. 识别相关章节 — 将当前任务与下方索引中的
    适用场景:
    触发条件进行匹配。一个任务可能匹配多个章节,请全部应用。
  2. 阅读参考文件 — 对于每个匹配的章节,阅读其索引条目末尾列出的完整参考文件,以获取完整的验证要求。
  3. 应用指导内容 — 落实各项要求。当要求允许选择时,默认采用最安全的选项。将所有Level 1要求作为最低基线应用;记录所有相关但尚未落实的Level 2或Level 3要求。
  4. 在代码内引用已应用的要求 — 在代码注释或计划说明中,引用每个已满足的要求:
    // ASVS 6.2.4: password checked against top-3000 list
    。

Escalation

问题上报

If no section in the index matches a task that involves security-sensitive operations, or if guidance is conflicting or unclear, stop and flag the gap before proceeding. Do not guess or paraphrase guidance — escalate instead.
If the index below is empty, report that the reference index failed to load and list which ASVS chapters are likely relevant based on the task description.
如果索引中没有章节匹配涉及安全敏感操作的任务,或者指导内容存在冲突或不明确的情况,请暂停并标记该空白点后再继续。请勿猜测或改写指导内容,而是上报问题。
如果下方索引为空,请报告参考索引加载失败,并根据任务描述列出可能相关的ASVS章节。

Reference Index

参考索引

V1.1 Encoding and Sanitization Architecture

V1.1 编码与清理架构

Architectural requirements for the order and placement of encoding, escaping, and decoding operations.
When to use:
  • designing a data processing pipeline that handles untrusted input
  • deciding where in the request/response lifecycle to encode or escape data
  • storing data that will later be rendered in different output contexts
See
data/asvs/V1.1.md
for detailed guidance.
关于编码、转义和解码操作的顺序与部署位置的架构要求。
适用场景:
  • 设计处理不可信输入的数据处理流程
  • 确定在请求/响应生命周期中的哪个环节对数据进行编码或转义
  • 存储将在不同输出环境中渲染的数据
详见
data/asvs/V1.1.md
获取详细指导内容。

V1.2 Injection Prevention

V1.2 注入防护

Output encoding and escaping requirements to prevent injection into interpreters (SQL, HTML, JS, OS, LDAP, etc.).
When to use:
  • building database queries (SQL, NoSQL, HQL, Cypher, XPath, LDAP)
  • constructing OS commands or shell scripts with dynamic data
  • building URLs or redirects with user-supplied values
  • rendering user input inside HTML, CSS, or JavaScript
  • processing LaTeX input
  • evaluating regular expressions containing user-supplied patterns
  • generating CSV, XLS, or spreadsheet exports with user data
See
data/asvs/V1.2.md
for detailed guidance.
防止向解释器(SQL、HTML、JS、操作系统、LDAP等)注入的输出编码与转义要求。
适用场景:
  • 构建数据库查询语句(SQL、NoSQL、HQL、Cypher、XPath、LDAP)
  • 使用动态数据构建操作系统命令或Shell脚本
  • 使用用户提供的值构建URL或重定向地址
  • 在HTML、CSS或JavaScript中渲染用户输入内容
  • 处理LaTeX输入
  • 评估包含用户提供模式的正则表达式
  • 使用用户数据生成CSV、XLS或电子表格导出文件
详见
data/asvs/V1.2.md
获取详细指导内容。

V1.3 Sanitization

V1.3 内容清理

Requirements for sanitizing untrusted HTML and dynamic content when encoding is not applicable.
When to use:
  • accepting rich text or HTML input from users (e.g., WYSIWYG editors)
  • using eval() or dynamic code execution with user-supplied content
  • rendering user-submitted markup where encoding alone is insufficient
See
data/asvs/V1.3.md
for detailed guidance.
当编码不适用时,清理不可信HTML和动态内容的要求。
适用场景:
  • 接受用户输入的富文本或HTML内容(如WYSIWYG编辑器)
  • 使用eval()或动态代码执行处理用户提供的内容
  • 渲染仅靠编码不足以保障安全的用户提交标记内容
详见
data/asvs/V1.3.md
获取详细指导内容。

V1.4 Memory, String, and Unmanaged Code

V1.4 内存、字符串与非托管代码

Requirements for safe memory handling and string operations in unmanaged or low-level code.
When to use:
  • writing or integrating unmanaged code (C, C++, assembly)
  • using unsafe memory operations, pointer arithmetic, or raw buffers
  • calling native libraries or FFI from a managed language
  • handling string operations in low-level or performance-critical code
See
data/asvs/V1.4.md
for detailed guidance.
在非托管或低级代码中安全处理内存与字符串操作的要求。
适用场景:
  • 编写或集成非托管代码(C、C++、汇编语言)
  • 使用不安全的内存操作、指针运算或原始缓冲区
  • 从托管语言调用原生库或FFI(外部函数接口)
  • 在低级或性能关键代码中处理字符串操作
详见
data/asvs/V1.4.md
获取详细指导内容。

V1.5 Safe Deserialization

V1.5 安全反序列化

Requirements for safely deserializing data from untrusted or external sources.
When to use:
  • deserializing objects or data structures from untrusted sources
  • accepting serialized data via network, file upload, or API payloads
  • using Java serialization, Python pickle, PHP unserialize, or similar mechanisms
  • processing binary or text-based serialization formats (XML, JSON, YAML, MessagePack)
See
data/asvs/V1.5.md
for detailed guidance.
安全反序列化来自不可信或外部来源数据的要求。
适用场景:
  • 反序列化来自不可信来源的对象或数据结构
  • 通过网络、文件上传或API负载接收序列化数据
  • 使用Java序列化、Python pickle、PHP unserialize或类似机制
  • 处理二进制或基于文本的序列化格式(XML、JSON、YAML、MessagePack)
详见
data/asvs/V1.5.md
获取详细指导内容。

V2.1 Validation and Business Logic Documentation

V2.1 验证与业务逻辑文档

Requirements for documenting expected inputs and business logic rules.
When to use:
  • documenting what inputs an application accepts and their expected formats
  • defining business rules and workflow constraints for a feature
See
data/asvs/V2.1.md
for detailed guidance.
记录预期输入和业务逻辑规则的要求。
适用场景:
  • 记录应用程序接受的输入内容及其预期格式
  • 定义功能的业务规则和工作流约束
详见
data/asvs/V2.1.md
获取详细指导内容。

V2.2 Input Validation

V2.2 输入验证

Requirements for validating input data at application boundaries.
When to use:
  • processing any user-supplied input at an application boundary
  • validating that inputs match expected types, formats, lengths, or value ranges
  • checking data received from external systems or APIs
See
data/asvs/V2.2.md
for detailed guidance.
在应用程序边界验证输入数据的要求。
适用场景:
  • 在应用程序边界处理任何用户提供的输入
  • 验证输入是否匹配预期的类型、格式、长度或值范围
  • 检查从外部系统或API接收的数据
详见
data/asvs/V2.2.md
获取详细指导内容。

V2.3 Business Logic Security

V2.3 业务逻辑安全

Requirements for securing business workflows against manipulation, skipping steps, or race conditions.
When to use:
  • implementing multi-step workflows or transaction sequences
  • enforcing ordering or timing constraints between operations
  • handling financial transactions, inventory updates, or state machines
  • implementing features where users should not be able to skip or replay steps
See
data/asvs/V2.3.md
for detailed guidance.
保护业务工作流免受篡改、步骤跳过或竞争条件影响的要求。
适用场景:
  • 实现多步骤工作流或事务序列
  • 强制执行操作之间的顺序或时间约束
  • 处理金融交易、库存更新或状态机
  • 实现用户不应跳过或重放步骤的功能
详见
data/asvs/V2.3.md
获取详细指导内容。

V2.4 Anti-automation

V2.4 反自动化

Requirements for protecting against automated abuse, scraping, and excessive requests.
When to use:
  • adding rate limiting to endpoints or operations
  • protecting forms or APIs from automated abuse or credential stuffing
  • implementing CAPTCHA or bot detection on public-facing endpoints
  • limiting how many times an operation can be performed per user or IP
See
data/asvs/V2.4.md
for detailed guidance.
防止自动化滥用、爬虫和过度请求的要求。
适用场景:
  • 为端点或操作添加速率限制
  • 保护表单或API免受自动化滥用或凭证填充攻击
  • 在面向公众的端点实现CAPTCHA或机器人检测
  • 限制每个用户或IP执行操作的次数
详见
data/asvs/V2.4.md
获取详细指导内容。

V3.1 Web Frontend Security Documentation

V3.1 Web前端安全文档

Requirements for documenting frontend security decisions and browser security configurations.
When to use:
  • documenting security decisions for a web frontend application
  • defining which content security policies and browser protections will be used
See
data/asvs/V3.1.md
for detailed guidance.
记录前端安全决策和浏览器安全配置的要求。
适用场景:
  • 记录Web前端应用的安全决策
  • 定义将使用的内容安全策略和浏览器保护机制
详见
data/asvs/V3.1.md
获取详细指导内容。

V3.2 Unintended Content Interpretation

V3.2 意外内容解析

Requirements to prevent browsers from misinterpreting response content types.
When to use:
  • serving user-uploaded files or content from the application
  • setting Content-Type headers for HTTP responses
  • rendering HTML pages that include user-controlled content
  • preventing browsers from MIME-sniffing response types
See
data/asvs/V3.2.md
for detailed guidance.
防止浏览器错误解析响应内容类型的要求。
适用场景:
  • 提供用户上传的文件或应用程序内容
  • 为HTTP响应设置Content-Type头
  • 渲染包含用户控制内容的HTML页面
  • 防止浏览器对响应类型进行MIME嗅探
详见
data/asvs/V3.2.md
获取详细指导内容。

V3.3 Cookie Setup

V3.3 Cookie配置

Requirements for securely configuring cookie attributes.
When to use:
  • setting cookies in HTTP responses (session, preference, or tracking cookies)
  • configuring cookie attributes (HttpOnly, Secure, SameSite, domain, path)
See
data/asvs/V3.3.md
for detailed guidance.
安全配置Cookie属性的要求。
适用场景:
  • 在HTTP响应中设置Cookie(会话、偏好或跟踪Cookie)
  • 配置Cookie属性(HttpOnly、Secure、SameSite、域名、路径)
详见
data/asvs/V3.3.md
获取详细指导内容。

V3.4 Browser Security Mechanism Headers

V3.4 浏览器安全机制头

Requirements for HTTP security headers that instruct browsers to enforce security policies.
When to use:
  • setting HTTP security headers on web application responses
  • configuring Content Security Policy (CSP)
  • setting HSTS, X-Frame-Options, Referrer-Policy, or Permissions-Policy headers
See
data/asvs/V3.4.md
for detailed guidance.
指导浏览器执行安全策略的HTTP安全头要求。
适用场景:
  • 在Web应用响应中设置HTTP安全头
  • 配置内容安全策略(CSP)
  • 设置HSTS、X-Frame-Options、Referrer-Policy或Permissions-Policy头
详见
data/asvs/V3.4.md
获取详细指导内容。

V3.5 Browser Origin Separation

V3.5 浏览器源分离

Requirements for enforcing origin boundaries and preventing cross-origin attacks in browsers.
When to use:
  • configuring Cross-Origin Resource Sharing (CORS) policies
  • building applications that interact across multiple origins or subdomains
  • preventing cross-site request forgery (CSRF)
  • using postMessage or cross-frame communication
See
data/asvs/V3.5.md
for detailed guidance.
在浏览器中强制执行源边界并防止跨源攻击的要求。
适用场景:
  • 配置跨源资源共享(CORS)策略
  • 构建跨多个源或子域交互的应用程序
  • 防止跨站请求伪造(CSRF)
  • 使用postMessage或跨框架通信
详见
data/asvs/V3.5.md
获取详细指导内容。

V3.6 External Resource Integrity

V3.6 外部资源完整性

Requirements for verifying the integrity of externally loaded resources.
When to use:
  • loading third-party scripts, stylesheets, or fonts from external CDNs
  • using subresource integrity (SRI) for external assets
  • embedding external resources in HTML pages
See
data/asvs/V3.6.md
for detailed guidance.
验证外部加载资源完整性的要求。
适用场景:
  • 从外部CDN加载第三方脚本、样式表或字体
  • 为外部资源使用子资源完整性(SRI)
  • 在HTML页面中嵌入外部资源
详见
data/asvs/V3.6.md
获取详细指导内容。

V3.7 Other Browser Security Considerations

V3.7 其他浏览器安全考虑

Miscellaneous browser security requirements not covered by other V3 sections.
When to use:
  • building browser-based applications with complex client-side logic
  • handling sensitive data in browser storage (localStorage, sessionStorage, IndexedDB)
  • using service workers or browser caching mechanisms
See
data/asvs/V3.7.md
for detailed guidance.
V3其他章节未涵盖的杂项浏览器安全要求。
适用场景:
  • 构建具有复杂客户端逻辑的基于浏览器的应用程序
  • 在浏览器存储(localStorage、sessionStorage、IndexedDB)中处理敏感数据
  • 使用服务工作线程或浏览器缓存机制
详见
data/asvs/V3.7.md
获取详细指导内容。

V4.1 Generic Web Service Security

V4.1 通用Web服务安全

General security requirements applicable to all HTTP-based web services.
When to use:
  • building or consuming HTTP-based APIs or web services
  • implementing REST endpoints
  • designing the request/response lifecycle of a web service
See
data/asvs/V4.1.md
for detailed guidance.
适用于所有基于HTTP的Web服务的通用安全要求。
适用场景:
  • 构建或使用基于HTTP的API或Web服务
  • 实现REST端点
  • 设计Web服务的请求/响应生命周期
详见
data/asvs/V4.1.md
获取详细指导内容。

V4.2 HTTP Message Structure Validation

V4.2 HTTP消息结构验证

Requirements for validating the structure and fields of HTTP messages.
When to use:
  • parsing HTTP request headers, query parameters, or body content in an API
  • validating Content-Type, Accept, or other HTTP header fields
  • handling HTTP request routing or middleware in a web service
See
data/asvs/V4.2.md
for detailed guidance.
验证HTTP消息结构和字段的要求。
适用场景:
  • 在API中解析HTTP请求头、查询参数或正文内容
  • 验证Content-Type、Accept或其他HTTP头字段
  • 在Web服务中处理HTTP请求路由或中间件
详见
data/asvs/V4.2.md
获取详细指导内容。

V4.3 GraphQL

V4.3 GraphQL

Security requirements specific to GraphQL APIs.
When to use:
  • implementing a GraphQL API or schema
  • handling GraphQL queries, mutations, or subscriptions
  • configuring a GraphQL server or gateway
See
data/asvs/V4.3.md
for detailed guidance.
针对GraphQL API的安全要求。
适用场景:
  • 实现GraphQL API或模式
  • 处理GraphQL查询、变更或订阅
  • 配置GraphQL服务器或网关
详见
data/asvs/V4.3.md
获取详细指导内容。

V4.4 WebSocket

V4.4 WebSocket

Security requirements for WebSocket connections and message handling.
When to use:
  • implementing WebSocket connections for real-time communication
  • building a WebSocket server or client
  • handling WebSocket upgrade requests and message routing
See
data/asvs/V4.4.md
for detailed guidance.
针对WebSocket连接和消息处理的安全要求。
适用场景:
  • 实现用于实时通信的WebSocket连接
  • 构建WebSocket服务器或客户端
  • 处理WebSocket升级请求和消息路由
详见
data/asvs/V4.4.md
获取详细指导内容。

V5.1 File Handling Documentation

V5.1 文件处理文档

Requirements for documenting file handling expectations and security decisions.
When to use:
  • documenting file upload or download features
  • defining accepted file types, sizes, and handling behavior for a feature
See
data/asvs/V5.1.md
for detailed guidance.
记录文件处理预期和安全决策的要求。
适用场景:
  • 记录文件上传或下载功能
  • 定义功能接受的文件类型、大小和处理行为
详见
data/asvs/V5.1.md
获取详细指导内容。

V5.2 File Upload and Content

V5.2 文件上传与内容

Requirements for securely accepting and validating user-uploaded files.
When to use:
  • implementing file upload functionality
  • accepting files from users via HTTP, form submission, or API
  • validating file type, size, or content before processing
  • handling zip or archive uploads that will be extracted
See
data/asvs/V5.2.md
for detailed guidance.
安全接受和验证用户上传文件的要求。
适用场景:
  • 实现文件上传功能
  • 通过HTTP、表单提交或API接受用户上传的文件
  • 在处理前验证文件类型、大小或内容
  • 处理将被解压的zip或归档文件上传
详见
data/asvs/V5.2.md
获取详细指导内容。

V5.3 File Storage

V5.3 文件存储

Requirements for securely storing files and preventing path traversal or server-side execution.
When to use:
  • storing uploaded or generated files on disk or object storage
  • constructing file paths for stored files
  • serving stored files via HTTP
  • handling file paths provided by users
See
data/asvs/V5.3.md
for detailed guidance.
安全存储文件并防止路径遍历或服务器端执行的要求。
适用场景:
  • 在磁盘或对象存储中存储上传或生成的文件
  • 为存储的文件构建文件路径
  • 通过HTTP提供存储的文件
  • 处理用户提供的文件路径
详见
data/asvs/V5.3.md
获取详细指导内容。

V5.4 File Download

V5.4 文件下载

Requirements for securely serving files to users for download.
When to use:
  • serving files for download via HTTP responses
  • allowing users to download stored files
  • setting Content-Disposition or Content-Type for file downloads
See
data/asvs/V5.4.md
for detailed guidance.
安全向用户提供文件下载的要求。
适用场景:
  • 通过HTTP响应提供文件下载
  • 允许用户下载存储的文件
  • 为文件下载设置Content-Disposition或Content-Type
详见
data/asvs/V5.4.md
获取详细指导内容。

V6.1 Authentication Documentation

V6.1 身份验证文档

Requirements for documenting authentication decisions and mechanisms.
When to use:
  • documenting authentication mechanisms for an application
  • defining which authentication methods are supported
See
data/asvs/V6.1.md
for detailed guidance.
记录身份验证决策和机制的要求。
适用场景:
  • 记录应用程序的身份验证机制
  • 定义支持的身份验证方法
详见
data/asvs/V6.1.md
获取详细指导内容。

V6.2 Password Security

V6.2 密码安全

Requirements for securely handling user passwords, including storage, policies, and breach detection.
When to use:
  • implementing password-based login
  • storing or verifying user passwords
  • implementing password creation, reset, or change flows
  • enforcing password policies or checking against breached password lists
See
data/asvs/V6.2.md
for detailed guidance.
安全处理用户密码(包括存储、策略和泄露检测)的要求。
适用场景:
  • 实现基于密码的登录
  • 存储或验证用户密码
  • 实现密码创建、重置或修改流程
  • 强制执行密码策略或检查泄露密码列表
详见
data/asvs/V6.2.md
获取详细指导内容。

V6.3 General Authentication Security

V6.3 通用身份验证安全

General security requirements for all authentication mechanisms.
When to use:
  • implementing any authentication mechanism (login, API key, certificate)
  • building login flows, authentication endpoints, or credential verification
  • protecting authentication against brute force, enumeration, or timing attacks
See
data/asvs/V6.3.md
for detailed guidance.
适用于所有身份验证机制的通用安全要求。
适用场景:
  • 实现任何身份验证机制(登录、API密钥、证书)
  • 构建登录流程、身份验证端点或凭证验证逻辑
  • 保护身份验证免受暴力破解、枚举或时序攻击
详见
data/asvs/V6.3.md
获取详细指导内容。

V6.4 Authentication Factor Lifecycle and Recovery

V6.4 身份验证因子生命周期与恢复

Requirements for managing authentication factor enrollment, recovery, and revocation.
When to use:
  • implementing account recovery or password reset flows
  • managing enrollment or removal of authentication factors
  • handling forgotten passwords or locked accounts
See
data/asvs/V6.4.md
for detailed guidance.
管理身份验证因子注册、恢复和撤销的要求。
适用场景:
  • 实现账户恢复或密码重置流程
  • 管理身份验证因子的注册或移除
  • 处理忘记密码或锁定账户的情况
详见
data/asvs/V6.4.md
获取详细指导内容。

V6.5 General Multi-factor Authentication Requirements

V6.5 通用多因素身份验证要求

General requirements for implementing multi-factor authentication.
When to use:
  • adding multi-factor authentication (MFA) to a login flow
  • implementing TOTP, hardware keys, or other second factors
  • enforcing MFA for privileged or sensitive operations
See
data/asvs/V6.5.md
for detailed guidance.
实现多因素身份验证的通用要求。
适用场景:
  • 为登录流程添加多因素身份验证(MFA)
  • 实现TOTP、硬件密钥或其他第二验证因子
  • 对特权或敏感操作强制执行MFA
详见
data/asvs/V6.5.md
获取详细指导内容。

V6.6 Out-of-Band Authentication Mechanisms

V6.6 带外身份验证机制

Requirements for authentication mechanisms that use a separate out-of-band channel.
When to use:
  • implementing SMS, email, or push notification-based authentication
  • using out-of-band channels (phone call, email link) for login or verification
See
data/asvs/V6.6.md
for detailed guidance.
使用独立带外通道的身份验证机制要求。
适用场景:
  • 实现基于SMS、电子邮件或推送通知的身份验证
  • 使用带外通道(电话、电子邮件链接)进行登录或验证
详见
data/asvs/V6.6.md
获取详细指导内容。

V6.7 Cryptographic Authentication Mechanism

V6.7 加密身份验证机制

Requirements for cryptographic authentication mechanisms such as WebAuthn, passkeys, and client certificates.
When to use:
  • implementing certificate-based authentication
  • supporting hardware security keys (FIDO2, WebAuthn, passkeys)
  • using cryptographic proof-of-possession for authentication
See
data/asvs/V6.7.md
for detailed guidance.
针对WebAuthn、Passkey和客户端证书等加密身份验证机制的要求。
适用场景:
  • 实现基于证书的身份验证
  • 支持硬件安全密钥(FIDO2、WebAuthn、Passkey)
  • 使用加密持有证明进行身份验证
详见
data/asvs/V6.7.md
获取详细指导内容。

V6.8 Authentication with an Identity Provider

V6.8 身份提供商身份验证

Requirements for authenticating users via an external identity provider using federated protocols.
When to use:
  • integrating with an external identity provider (IdP) for authentication
  • implementing "Sign in with Google/Apple/GitHub" or similar social login
  • federating authentication via SAML, OIDC, or similar protocols
See
data/asvs/V6.8.md
for detailed guidance.
使用联邦协议通过外部身份提供商验证用户的要求。
适用场景:
  • 与外部身份提供商(IdP)集成以实现身份验证
  • 实现“使用Google/Apple/GitHub登录”或类似的社交登录
  • 通过SAML、OIDC或类似协议实现联邦身份验证
详见
data/asvs/V6.8.md
获取详细指导内容。

V7.1 Session Management Documentation

V7.1 会话管理文档

Requirements for documenting session management decisions.
When to use:
  • documenting session management design for an application
  • defining session token types and storage mechanisms
See
data/asvs/V7.1.md
for detailed guidance.
记录会话管理决策的要求。
适用场景:
  • 记录应用程序的会话管理设计
  • 定义会话令牌类型和存储机制
详见
data/asvs/V7.1.md
获取详细指导内容。

V7.2 Fundamental Session Management Security

V7.2 基础会话管理安全

Foundational requirements for creating and issuing secure session tokens.
When to use:
  • issuing session tokens or cookies after successful authentication
  • generating session identifiers
  • binding sessions to users after login
See
data/asvs/V7.2.md
for detailed guidance.
创建和颁发安全会话令牌的基础要求。
适用场景:
  • 在成功身份验证后颁发会话令牌或Cookie
  • 生成会话标识符
  • 在登录后将会话与用户绑定
详见
data/asvs/V7.2.md
获取详细指导内容。

V7.3 Session Timeout

V7.3 会话超时

Requirements for limiting session duration and implementing idle or absolute timeouts.
When to use:
  • implementing session expiry or idle timeout
  • configuring absolute or sliding session lifetimes
  • managing session validity periods
See
data/asvs/V7.3.md
for detailed guidance.
限制会话时长并实现空闲或绝对超时的要求。
适用场景:
  • 实现会话过期或空闲超时
  • 配置绝对或滑动会话生命周期
  • 管理会话有效期
详见
data/asvs/V7.3.md
获取详细指导内容。

V7.4 Session Termination

V7.4 会话终止

Requirements for securely terminating sessions on logout or credential change.
When to use:
  • implementing logout functionality
  • invalidating sessions server-side on logout
  • terminating all sessions when a user changes credentials
See
data/asvs/V7.4.md
for detailed guidance.
在注销或凭证变更时安全终止会话的要求。
适用场景:
  • 实现注销功能
  • 在注销时在服务器端使会话失效
  • 当用户变更凭证时终止所有会话
详见
data/asvs/V7.4.md
获取详细指导内容。

V7.5 Defenses Against Session Abuse

V7.5 会话滥用防护

Requirements for detecting and preventing session theft, fixation, and hijacking.
When to use:
  • protecting sessions against fixation, hijacking, or replay attacks
  • implementing session binding to device or IP
  • detecting concurrent sessions from multiple locations
See
data/asvs/V7.5.md
for detailed guidance.
检测和防止会话窃取、固定和劫持的要求。
适用场景:
  • 保护会话免受固定、劫持或重放攻击
  • 实现与会话与设备或IP绑定
  • 检测来自多个位置的并发会话
详见
data/asvs/V7.5.md
获取详细指导内容。

V7.6 Federated Re-authentication

V7.6 联邦重新身份验证

Requirements for session management in federated identity and SSO scenarios.
When to use:
  • managing sessions in a federated SSO environment
  • handling re-authentication requests from an identity provider
  • implementing single logout (SLO) across federated services
See
data/asvs/V7.6.md
for detailed guidance.
联邦身份和SSO场景中的会话管理要求。
适用场景:
  • 在联邦SSO环境中管理会话
  • 处理来自身份提供商的重新身份验证请求
  • 在联邦服务中实现单点注销(SLO)
详见
data/asvs/V7.6.md
获取详细指导内容。

V8.1 Authorization Documentation

V8.1 授权文档

Requirements for documenting authorization rules and decision factors.
When to use:
  • documenting access control rules and permission models
  • defining which roles or attributes govern access to resources
See
data/asvs/V8.1.md
for detailed guidance.
记录授权规则和决策因素的要求。
适用场景:
  • 记录访问控制规则和权限模型
  • 定义哪些角色或属性控制对资源的访问
详见
data/asvs/V8.1.md
获取详细指导内容。

V8.2 General Authorization Design

V8.2 通用授权设计

Requirements for function-level, data-level, and field-level access control enforcement.
When to use:
  • important when making changes to authentication implementations
  • controlling which users can call which functions or endpoints
  • restricting access to specific data records by user identity
  • implementing object-level or field-level access control
  • preventing insecure direct object reference (IDOR)
See
data/asvs/V8.2.md
for detailed guidance.
针对功能级、数据级和字段级访问控制实施的要求。
适用场景:
  • 对身份验证实现进行变更时至关重要
  • 控制哪些用户可以调用哪些功能或端点
  • 根据用户身份限制对特定数据记录的访问
  • 实现对象级或字段级访问控制
  • 防止不安全的直接对象引用(IDOR)
详见
data/asvs/V8.2.md
获取详细指导内容。

V8.3 Operation Level Authorization

V8.3 操作级授权

Requirements for enforcing authorization at the correct service tier and handling permission changes promptly.
When to use:
  • enforcing authorization in server-side logic (not just client-side)
  • applying permission changes immediately when roles are updated
  • designing authorization in multi-service or microservice architectures
See
data/asvs/V8.3.md
for detailed guidance.
在正确的服务层实施授权并及时处理权限变更的要求。
适用场景:
  • 在服务器端逻辑中实施授权(而非仅客户端)
  • 当角色更新时立即应用权限变更
  • 在多服务或微服务架构中设计授权
详见
data/asvs/V8.3.md
获取详细指导内容。

V8.4 Other Authorization Considerations

V8.4 其他授权考虑

Additional authorization requirements for multi-tenant systems and administrative interfaces.
When to use:
  • building multi-tenant applications with tenant isolation
  • implementing administrative or privileged interfaces
  • applying contextual access controls (time, location, device) to authorization
See
data/asvs/V8.4.md
for detailed guidance.
针对多租户系统和管理界面的额外授权要求。
适用场景:
  • 构建具有租户隔离的多租户应用程序
  • 实现管理或特权界面
  • 为授权应用上下文访问控制(时间、位置、设备)
详见
data/asvs/V8.4.md
获取详细指导内容。

V9.1 Token Source and Integrity

V9.1 令牌来源与完整性

Requirements for verifying the source, signature, and integrity of self-contained tokens.
When to use:
  • validating JWTs or other self-contained tokens received from clients or services
  • verifying the signature or integrity of tokens before trusting their claims
  • configuring which signing algorithms are accepted for tokens
See
data/asvs/V9.1.md
for detailed guidance.
验证自包含令牌的来源、签名和完整性的要求。
适用场景:
  • 验证从客户端或服务接收的JWT或其他自包含令牌
  • 在信任令牌声明之前验证令牌的签名或完整性
  • 配置令牌接受的签名算法
详见
data/asvs/V9.1.md
获取详细指导内容。

V9.2 Token Content

V9.2 令牌内容

Requirements for the content, claims, and lifetime of self-contained tokens.
When to use:
  • defining the claims or payload stored inside a JWT or similar token
  • setting expiry, audience, issuer, or other standard claims on tokens
  • preventing sensitive data from being stored in token payloads
See
data/asvs/V9.2.md
for detailed guidance.
自包含令牌的内容、声明和生命周期要求。
适用场景:
  • 定义JWT或类似令牌中存储的声明或负载
  • 在令牌上设置过期时间、受众、发行者或其他标准声明
  • 防止敏感数据存储在令牌负载中
详见
data/asvs/V9.2.md
获取详细指导内容。

V10.1 Generic OAuth and OIDC Security

V10.1 通用OAuth与OIDC安全

General security requirements applicable to all OAuth and OIDC implementations.
When to use:
  • implementing any OAuth 2.0 or OpenID Connect flow
  • designing an application that uses OAuth or OIDC regardless of role
See
data/asvs/V10.1.md
for detailed guidance.
适用于所有OAuth和OIDC实现的通用安全要求。
适用场景:
  • 实现任何OAuth 2.0或OpenID Connect流程
  • 设计使用OAuth或OIDC的应用程序(无论角色如何)
详见
data/asvs/V10.1.md
获取详细指导内容。

V10.2 OAuth Client

V10.2 OAuth客户端

Security requirements for applications acting as an OAuth client.
When to use:
  • building an application that requests access tokens from an authorization server
  • implementing the authorization code flow or other OAuth grant types as a client
  • using PKCE in an OAuth client
See
data/asvs/V10.2.md
for detailed guidance.
作为OAuth客户端的应用程序的安全要求。
适用场景:
  • 构建从授权服务器请求访问令牌的应用程序
  • 作为客户端实现授权码流或其他OAuth授权类型
  • 在OAuth客户端中使用PKCE
详见
data/asvs/V10.2.md
获取详细指导内容。

V10.3 OAuth Resource Server

V10.3 OAuth资源服务器

Security requirements for APIs acting as an OAuth resource server.
When to use:
  • building an API that accepts and validates OAuth access tokens
  • implementing token introspection or JWT validation on an API
  • protecting API endpoints using OAuth bearer tokens
See
data/asvs/V10.3.md
for detailed guidance.
作为OAuth资源服务器的API的安全要求。
适用场景:
  • 构建接受并验证OAuth访问令牌的API
  • 在API上实现令牌 introspection 或JWT验证
  • 使用OAuth承载令牌保护API端点
详见
data/asvs/V10.3.md
获取详细指导内容。

V10.4 OAuth Authorization Server

V10.4 OAuth授权服务器

Security requirements for OAuth authorization servers that issue tokens.
When to use:
  • implementing or configuring an OAuth authorization server
  • issuing access tokens, refresh tokens, or authorization codes
  • building a custom authorization server rather than using a third-party one
See
data/asvs/V10.4.md
for detailed guidance.
颁发令牌的OAuth授权服务器的安全要求。
适用场景:
  • 实现或配置OAuth授权服务器
  • 颁发访问令牌、刷新令牌或授权码
  • 构建自定义授权服务器而非使用第三方服务
详见
data/asvs/V10.4.md
获取详细指导内容。

V10.5 OIDC Client

V10.5 OIDC客户端

Security requirements for applications acting as an OIDC relying party (client).
When to use:
  • implementing OpenID Connect login in a relying party application
  • validating OIDC ID tokens
  • requesting user identity information (claims) via OIDC
See
data/asvs/V10.5.md
for detailed guidance.
作为OIDC依赖方(客户端)的应用程序的安全要求。
适用场景:
  • 在依赖方应用程序中实现OpenID Connect登录
  • 验证OIDC ID令牌
  • 通过OIDC请求用户身份信息(声明)
详见
data/asvs/V10.5.md
获取详细指导内容。

V10.6 OpenID Provider

V10.6 OpenID提供商

Security requirements for OpenID Providers that authenticate users and issue ID tokens.
When to use:
  • implementing or configuring an OpenID Provider
  • issuing OIDC ID tokens and serving user identity claims
  • building a custom identity provider that supports OIDC
See
data/asvs/V10.6.md
for detailed guidance.
验证用户身份并颁发ID令牌的OpenID提供商的安全要求。
适用场景:
  • 实现或配置OpenID提供商
  • 颁发OIDC ID令牌并提供用户身份声明
  • 构建支持OIDC的自定义身份提供商
详见
data/asvs/V10.6.md
获取详细指导内容。

V10.7 Consent Management

V10.7 同意管理

Requirements for managing and recording user consent in OAuth and OIDC flows.
When to use:
  • implementing OAuth consent screens or authorization dialogs
  • managing user consent for delegated access to resources
  • storing, revoking, or auditing user consent decisions
See
data/asvs/V10.7.md
for detailed guidance.
在OAuth和OIDC流程中管理和记录用户同意的要求。
适用场景:
  • 实现OAuth同意屏幕或授权对话框
  • 管理用户对资源委托访问的同意
  • 存储、撤销或审计用户同意决策
详见
data/asvs/V10.7.md
获取详细指导内容。

V11.1 Cryptographic Inventory and Documentation

V11.1 加密清单与文档

Requirements for documenting and inventorying cryptographic implementations.
When to use:
  • documenting cryptographic choices in an application
  • maintaining an inventory of cryptographic algorithms and keys in use
  • planning migration to new or post-quantum cryptographic algorithms
See
data/asvs/V11.1.md
for detailed guidance.
记录和盘点加密实现的要求。
适用场景:
  • 记录应用程序中的加密选择
  • 维护正在使用的加密算法和密钥清单
  • 规划迁移到新的或后量子加密算法
详见
data/asvs/V11.1.md
获取详细指导内容。

V11.2 Secure Cryptography Implementation

V11.2 安全加密实现

Requirements for correctly implementing cryptographic operations using vetted libraries.
When to use:
  • implementing cryptographic operations in application code
  • choosing and using cryptographic libraries or APIs
  • ensuring correct usage of cryptographic primitives
See
data/asvs/V11.2.md
for detailed guidance.
使用经过审核的库正确实施加密操作的要求。
适用场景:
  • 在应用程序代码中实现加密操作
  • 选择和使用加密库或API
  • 确保正确使用加密原语
详见
data/asvs/V11.2.md
获取详细指导内容。

V11.3 Encryption Algorithms

V11.3 加密算法

Requirements for selecting and configuring approved encryption algorithms.
When to use:
  • encrypting or decrypting data in an application
  • choosing symmetric or asymmetric encryption algorithms and modes
  • configuring encryption parameters (key size, IV, mode of operation)
See
data/asvs/V11.3.md
for detailed guidance.
选择和配置经批准加密算法的要求。
适用场景:
  • 在应用程序中加密或解密数据
  • 选择对称或非对称加密算法和模式
  • 配置加密参数(密钥大小、IV、操作模式)
详见
data/asvs/V11.3.md
获取详细指导内容。

V11.4 Hashing and Hash-based Functions

V11.4 哈希与基于哈希的函数

Requirements for selecting approved hash functions and HMAC constructions.
When to use:
  • hashing data for integrity verification or checksums
  • using HMACs for message authentication
  • choosing hash algorithms for non-password data
See
data/asvs/V11.4.md
for detailed guidance.
选择经批准的哈希函数和HMAC构造的要求。
适用场景:
  • 对数据进行哈希以进行完整性验证或生成校验和
  • 使用HMAC进行消息认证
  • 为非密码数据选择哈希算法
详见
data/asvs/V11.4.md
获取详细指导内容。

V11.5 Random Values

V11.5 随机值

Requirements for generating cryptographically secure random values.
When to use:
  • generating random tokens, nonces, salts, or keys
  • seeding random number generators in security-sensitive contexts
  • generating session identifiers, CSRF tokens, or API keys
See
data/asvs/V11.5.md
for detailed guidance.
生成加密安全随机值的要求。
适用场景:
  • 生成随机令牌、随机数、盐值或密钥
  • 在安全敏感上下文中为随机数生成器提供种子
  • 生成会话标识符、CSRF令牌或API密钥
详见
data/asvs/V11.5.md
获取详细指导内容。

V11.6 Public Key Cryptography

V11.6 公钥加密

Requirements for using public key cryptography for signing and asymmetric encryption.
When to use:
  • signing or verifying data with asymmetric (public/private) keys
  • encrypting data with RSA or elliptic curve keys
  • managing public/private key pairs
  • implementing digital signatures or certificate-based operations
See
data/asvs/V11.6.md
for detailed guidance.
使用公钥加密进行签名和非对称加密的要求。
适用场景:
  • 使用非对称(公/私)密钥签名或验证数据
  • 使用RSA或椭圆曲线密钥加密数据
  • 管理公/私密钥对
  • 实现数字签名或基于证书的操作
详见
data/asvs/V11.6.md
获取详细指导内容。

V11.7 In-Use Data Cryptography

V11.7 使用中数据加密

Requirements for cryptographic protections applied to data while it is actively being used.
When to use:
  • protecting data while it is being processed in memory
  • implementing confidential computing or secure enclaves
  • minimizing the exposure window of sensitive data during processing
See
data/asvs/V11.7.md
for detailed guidance.
对正在使用的数据应用加密保护的要求。
适用场景:
  • 在内存中处理数据时对其进行保护
  • 实现机密计算或安全飞地
  • 最小化敏感数据在处理过程中的暴露窗口
详见
data/asvs/V11.7.md
获取详细指导内容。

V12.1 General TLS Security Guidance

V12.1 通用TLS安全指南

General requirements for TLS configuration including protocol versions, cipher suites, and certificate management.
When to use:
  • configuring TLS on any server or endpoint
  • selecting TLS versions and cipher suites
  • managing TLS certificates and revocation
See
data/asvs/V12.1.md
for detailed guidance.
关于TLS配置(包括协议版本、密码套件和证书管理)的通用要求。
适用场景:
  • 在任何服务器或端点上配置TLS
  • 选择TLS版本和密码套件
  • 管理TLS证书和吊销
详见
data/asvs/V12.1.md
获取详细指导内容。

V12.2 HTTPS Communication with External Facing Services

V12.2 面向外部服务的HTTPS通信

Requirements for HTTPS on externally accessible services, including publicly trusted certificates.
When to use:
  • exposing HTTP endpoints to end users or external clients
  • configuring HTTPS on a public-facing web application or API
  • obtaining and deploying TLS certificates for external services
See
data/asvs/V12.2.md
for detailed guidance.
针对外部可访问服务的HTTPS要求,包括公开可信证书。
适用场景:
  • 向终端用户或外部客户端暴露HTTP端点
  • 在面向公众的Web应用或API上配置HTTPS
  • 为外部服务获取并部署TLS证书
详见
data/asvs/V12.2.md
获取详细指导内容。

V12.3 General Service to Service Communication Security

V12.3 通用服务间通信安全

Requirements for encrypted and authenticated communication between internal services and backends.
When to use:
  • configuring encrypted communication between internal services or microservices
  • connecting to databases, message queues, caches, or external APIs over a network
  • setting up mutual TLS (mTLS) between services
  • validating TLS certificates in outbound connections
See
data/asvs/V12.3.md
for detailed guidance.
针对内部服务与后端之间加密和认证通信的要求。
适用场景:
  • 配置内部服务或微服务之间的加密通信
  • 通过网络连接到数据库、消息队列、缓存或外部API
  • 在服务之间设置双向TLS(mTLS)
  • 在出站连接中验证TLS证书
详见
data/asvs/V12.3.md
获取详细指导内容。

V13.1 Configuration Documentation

V13.1 配置文档

Requirements for documenting security-relevant configuration decisions.
When to use:
  • documenting security configuration decisions for an application
  • defining what configuration is required in different deployment environments
See
data/asvs/V13.1.md
for detailed guidance.
记录安全相关配置决策的要求。
适用场景:
  • 记录应用程序的安全配置决策
  • 定义不同部署环境中所需的配置
详见
data/asvs/V13.1.md
获取详细指导内容。

V13.2 Backend Communication Configuration

V13.2 后端通信配置

Requirements for securely configuring the application's outbound backend connections.
When to use:
  • configuring outbound connections from the application to backends (databases, APIs, services)
  • setting timeouts, retries, or connection pool settings for backend communications
See
data/asvs/V13.2.md
for detailed guidance.
安全配置应用程序出站后端连接的要求。
适用场景:
  • 配置从应用程序到后端(数据库、API、服务)的出站连接
  • 为后端通信设置超时、重试或连接池设置
详见
data/asvs/V13.2.md
获取详细指导内容。

V13.3 Secret Management

V13.3 密钥管理

Requirements for securely storing, accessing, and rotating application secrets and credentials.
When to use:
  • storing or accessing application secrets, API keys, database credentials, or certificates
  • configuring environment variables or secret stores (Vault, AWS Secrets Manager, etc.)
  • rotating or auditing secrets used by the application
See
data/asvs/V13.3.md
for detailed guidance.
安全存储、访问和轮换应用程序密钥与凭证的要求。
适用场景:
  • 存储或访问应用程序密钥、API密钥、数据库凭证或证书
  • 配置环境变量或密钥存储(Vault、AWS Secrets Manager等)
  • 轮换或审计应用程序使用的密钥
详见
data/asvs/V13.3.md
获取详细指导内容。

V13.4 Unintended Information Leakage

V13.4 意外信息泄露

Requirements for preventing the application from leaking sensitive information through errors, headers, or responses.
When to use:
  • configuring error pages and HTTP responses sent to clients
  • disabling stack traces, debug output, or verbose error messages in production
  • controlling what information the application reveals in headers or responses
See
data/asvs/V13.4.md
for detailed guidance.
防止应用程序通过错误、头信息或响应泄露敏感信息的要求。
适用场景:
  • 配置发送给客户端的错误页面和HTTP响应
  • 在生产环境中禁用堆栈跟踪、调试输出或详细错误消息
  • 控制应用程序在头信息或响应中泄露的信息
详见
data/asvs/V13.4.md
获取详细指导内容。

V14.1 Data Protection Documentation

V14.1 数据保护文档

Requirements for identifying, classifying, and documenting protection requirements for sensitive data.
When to use:
  • classifying data sensitivity levels in an application
  • documenting data protection requirements for different data categories
  • designing data handling policies for PII or regulated data
See
data/asvs/V14.1.md
for detailed guidance.
识别、分类和记录敏感数据保护要求的要求。
适用场景:
  • 对应用程序中的数据进行敏感度分类
  • 记录不同数据类别的数据保护要求
  • 设计PII或受监管数据的处理策略
详见
data/asvs/V14.1.md
获取详细指导内容。

V14.2 General Data Protection

V14.2 通用数据保护

Requirements for protecting sensitive data from unauthorized access, leakage, and excessive exposure.
When to use:
  • transmitting or storing sensitive data (PII, payment info, credentials)
  • controlling what sensitive data is returned in API responses
  • preventing sensitive data from leaking into URLs, logs, or caches
  • implementing data retention or deletion policies
See
data/asvs/V14.2.md
for detailed guidance.
保护敏感数据免受未授权访问、泄露和过度暴露的要求。
适用场景:
  • 传输或存储敏感数据(PII、支付信息、凭证)
  • 控制API响应中返回的敏感数据
  • 防止敏感数据泄露到URL、日志或缓存中
  • 实现数据保留或删除策略
详见
data/asvs/V14.2.md
获取详细指导内容。

V14.3 Client-side Data Protection

V14.3 客户端数据保护

Requirements for protecting sensitive data stored or processed on client devices and browsers.
When to use:
  • storing data in browser storage (localStorage, sessionStorage, cookies, IndexedDB)
  • controlling what data is cached by browsers or client devices
  • handling sensitive data in mobile or desktop client applications
See
data/asvs/V14.3.md
for detailed guidance.
保护在客户端设备和浏览器中存储或处理的敏感数据的要求。
适用场景:
  • 在浏览器存储(localStorage、sessionStorage、Cookie、IndexedDB)中存储数据
  • 控制浏览器或客户端设备缓存的数据
  • 在移动或桌面客户端应用中处理敏感数据
详见
data/asvs/V14.3.md
获取详细指导内容。

V15.1 Secure Coding and Architecture Documentation

V15.1 安全编码与架构文档

Requirements for documenting dependency risk, dangerous functionality, and remediation policies.
When to use:
  • managing third-party or open-source dependencies
  • documenting risky or security-sensitive components in an application
  • defining remediation timelines for vulnerable dependencies
See
data/asvs/V15.1.md
for detailed guidance.
记录依赖风险、危险功能和修复策略的要求。
适用场景:
  • 管理第三方或开源依赖
  • 记录应用程序中的高风险或安全敏感组件
  • 定义易受攻击依赖的修复时间表
详见
data/asvs/V15.1.md
获取详细指导内容。

V15.2 Security Architecture and Dependencies

V15.2 安全架构与依赖

Requirements for dependency management, supply chain security, and architectural isolation of risky components.
When to use:
  • managing third-party library versions and updates
  • sandboxing or isolating high-risk components in the architecture
  • protecting against dependency confusion or supply chain attacks
  • designing for availability of resource-intensive operations
See
data/asvs/V15.2.md
for detailed guidance.
依赖管理、供应链安全和高风险组件架构隔离的要求。
适用场景:
  • 管理第三方库版本和更新
  • 在架构中对高风险组件进行沙箱隔离
  • 防止依赖混淆或供应链攻击
  • 为资源密集型操作设计可用性保障
详见
data/asvs/V15.2.md
获取详细指导内容。

V15.3 Defensive Coding

V15.3 防御性编码

Requirements for defensive coding practices in security-sensitive code paths.
When to use:
  • writing code that uses dynamic execution, reflection, or deserialization
  • handling untrusted data in low-level or security-critical code paths
  • implementing input handling in security-sensitive functions
  • reviewing code for memory safety or injection risks
See
data/asvs/V15.3.md
for detailed guidance.
在安全敏感代码路径中采用防御性编码实践的要求。
适用场景:
  • 编写使用动态执行、反射或反序列化的代码
  • 在低级或安全关键代码路径中处理不可信数据
  • 在安全敏感函数中实现输入处理
  • 检查代码的内存安全性或注入风险
详见
data/asvs/V15.3.md
获取详细指导内容。

V15.4 Safe Concurrency

V15.4 安全并发

Requirements for safe concurrency to prevent race conditions and data corruption in multi-threaded code.
When to use:
  • writing multi-threaded or concurrent application code
  • implementing shared state or shared resources across threads or processes
  • using locks, semaphores, or other synchronization primitives
  • designing async or parallel processing workflows
See
data/asvs/V15.4.md
for detailed guidance.
在多线程代码中防止竞争条件和数据损坏的安全并发要求。
适用场景:
  • 编写多线程或并发应用程序代码
  • 在线程或进程之间实现共享状态或共享资源
  • 使用锁、信号量或其他同步原语
  • 设计异步或并行处理工作流
详见
data/asvs/V15.4.md
获取详细指导内容。

V16.1 Security Logging Documentation

V16.1 安全日志文档

Requirements for documenting logging decisions and defining which events must be recorded.
When to use:
  • designing a logging strategy for an application
  • documenting what security events should be logged
See
data/asvs/V16.1.md
for detailed guidance.
记录日志决策并定义必须记录的事件的要求。
适用场景:
  • 设计应用程序的日志策略
  • 记录应记录的安全事件
详见
data/asvs/V16.1.md
获取详细指导内容。

V16.2 General Logging

V16.2 通用日志

General requirements for what application logs should record and how.
When to use:
  • implementing application logging
  • deciding what information to include in log messages
  • configuring log formats and output destinations
See
data/asvs/V16.2.md
for detailed guidance.
关于应用程序日志应记录内容和方式的通用要求。
适用场景:
  • 实现应用程序日志
  • 决定日志消息中应包含的信息
  • 配置日志格式和输出目标
详见
data/asvs/V16.2.md
获取详细指导内容。

V16.3 Security Events

V16.3 安全事件

Requirements for logging security-relevant events such as authentication, authorization failures, and sensitive actions.
When to use:
  • logging authentication successes and failures
  • recording authorization failures or access control decisions
  • logging security-relevant user actions (password changes, account modifications)
  • building an audit trail for sensitive operations
See
data/asvs/V16.3.md
for detailed guidance.
记录安全相关事件(如身份验证、授权失败和敏感操作)的要求。
适用场景:
  • 记录身份验证成功和失败
  • 记录授权失败或访问控制决策
  • 记录安全相关用户操作(密码更改、账户修改)
  • 为敏感操作构建审计跟踪
详见
data/asvs/V16.3.md
获取详细指导内容。

V16.4 Log Protection

V16.4 日志保护

Requirements for protecting log data from tampering, injection, and unauthorized access.
When to use:
  • protecting log files or log pipelines from tampering or unauthorized access
  • forwarding logs to a centralized or immutable log store
  • ensuring log integrity for forensic or audit purposes
See
data/asvs/V16.4.md
for detailed guidance.
保护日志数据免受篡改、注入和未授权访问的要求。
适用场景:
  • 保护日志文件或日志管道免受篡改或未授权访问
  • 将日志转发到集中式或不可变日志存储
  • 确保日志完整性以用于取证或审计目的
详见
data/asvs/V16.4.md
获取详细指导内容。

V16.5 Error Handling

V16.5 错误处理

Requirements for handling errors safely without leaking sensitive information to users.
When to use:
  • implementing error handling and exception management in application code
  • returning error responses to API consumers or users
  • configuring error pages or error messages in a web application
See
data/asvs/V16.5.md
for detailed guidance.
安全处理错误而不向用户泄露敏感信息的要求。
适用场景:
  • 在应用程序代码中实现错误处理和异常管理
  • 向API消费者或用户返回错误响应
  • 在Web应用中配置错误页面或错误消息
详见
data/asvs/V16.5.md
获取详细指导内容。

V17.1 TURN Server

V17.1 TURN服务器

Security requirements for TURN server deployments used in WebRTC applications.
When to use:
  • operating or configuring a TURN server for WebRTC NAT traversal
  • deploying coturn or similar TURN server infrastructure
See
data/asvs/V17.1.md
for detailed guidance.
WebRTC应用中使用的TURN服务器部署的安全要求。
适用场景:
  • 运行或配置用于WebRTC NAT穿越的TURN服务器
  • 部署coturn或类似的TURN服务器基础设施
详见
data/asvs/V17.1.md
获取详细指导内容。

V17.2 Media

V17.2 媒体

Security requirements for WebRTC media servers handling real-time audio and video streams.
When to use:
  • hosting a WebRTC media server (SFU, MCU, recording server, or gateway)
  • processing or routing SRTP/DTLS media streams on the server side
  • building real-time audio/video conferencing infrastructure
See
data/asvs/V17.2.md
for detailed guidance.
处理实时音频和视频流的WebRTC媒体服务器的安全要求。
适用场景:
  • 托管WebRTC媒体服务器(SFU、MCU、录制服务器或网关)
  • 在服务器端处理或路由SRTP/DTLS媒体流
  • 构建实时音频/视频会议基础设施
详见
data/asvs/V17.2.md
获取详细指导内容。

V17.3 Signaling

V17.3 信令

Security requirements for WebRTC signaling servers that coordinate peer connections.
When to use:
  • implementing a WebRTC signaling server
  • handling SDP offer/answer exchange between WebRTC peers
  • securing the signaling channel for WebRTC session establishment
See
data/asvs/V17.3.md
for detailed guidance.
协调对等连接的WebRTC信令服务器的安全要求。
适用场景:
  • 实现WebRTC信令服务器
  • 处理WebRTC对等方之间的SDP提议/应答交换
  • 保护WebRTC会话建立的信令通道
详见
data/asvs/V17.3.md
获取详细指导内容。