openai/skills

security-best-practices

依据真实框架与代码证据检查安全问题

  • SKILL.md 已保存
  • 中文用法已整理
  • 安装与运行未实测
先判断是否解决你的问题

security-best-practices 是什么?

针对 Python、JavaScript/TypeScript 和 Go 项目,读取相应语言与框架的安全参考,编写安全默认实现或按要求形成带代码位置的安全评审。它会区分前端、后端和部署条件,不把所有通用建议都当作实际漏洞。

中文说明由本站依据来源整理;英文原文保留在页面下方。

适合用在

  • 用户明确要求安全最佳实践指导、安全审查报告或安全默认实现,并且项目主体属于 Python、JavaScript/TypeScript 或 Go。

这些情况不适合

  • 一般代码审查、普通调试请求,或来源未覆盖的编程语言;原文明确把这些情况排除在触发范围外。
按客户端选择安装入口

怎么接入你的 Agent?

  1. 定位完整 Skill 目录

    打开本项目来源,核对 SKILL.md 及其引用的脚本和资料。

  2. 交给你正在用的 Agent

    在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。

  3. 确认识别,再做具体任务

    让 Agent 回报安装目录和识别到的名称 security-best-practices,然后按本页使用示例提供材料。

展开并复制给 Codex 的安装指令
发送给 Codex

安装并检查 security-best-practices

请在 Codex 的当前工作环境中安装并检查 security-best-practices 这个 Skill。

项目身份:openai/skills / security-best-practices
来源:https://github.com/openai/skills/blob/49f948faa9258a0c61caceaf225e179651397431/skills/.curated/security-best-practices/SKILL.md
已定位的源文件:skills/.curated/security-best-practices/SKILL.md

1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。
准备输入,再按步骤执行

装好以后,具体怎么用?

准备哪些材料

  • 明确要求安全审查或安全实现,提供目标目录、语言、框架及部署环境。

会得到什么

  • 按严重性排序、含代码位置和实际影响的报告,或约定范围的实现与验证记录。

实际使用顺序

  1. 识别范围内前后端的核心语言和框架,读取全部适用的安全参考;缺对应参考时明确依据不足。
  2. 按真实代码记录发现、文件行号、影响和优先级,区分已证实问题与条件性建议;项目特殊约束需一并解释。
  3. 写成安全报告后,修复依照已确认范围逐项处理,并检查行为回归。
使用示例

从一个具体任务开始

本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。

安装并识别 Skill 后发送

复制一个具体任务

教学示例:使用 security-best-practices,只读审查我提供的Express登录接口和会话配置。先识别Node框架和部署是否经HTTPS代理,再读取适用参考。给出可定位的发现与触发条件,不改代码,不将本地HTTP自动判为生产TLS缺失。
预期结果

预期得到与实际框架、环境和代码对应的报告;本站未审查此示例项目。

使用前先看这些限制

使用条件与边界

  • 本版本明确支持Python、JS/TS和Go;其他语言不能宣称拥有同等专用参考。
  • 来源对TLS、secure cookie和HSTS强调部署上下文;不能将某条建议机械用于所有环境。
针对这个 Skill 的疑问

常见问题

普通代码评审会默认触发吗?

来源限定明确的安全请求,普通调试和一般评审不应自动扩成安全报告。

报告里的建议都是已利用漏洞吗?

不是。要区分代码可证问题、部署假设和加固建议,并写清触发条件与证据。

需要核对时再展开原文

来源原文与资料状态

源文件
已保存 SKILL.md,抓取于 2026-11-16T12:36:35.145Z
中文使用说明
已针对下方源文件版本整理用途、用法和常见问题
安装与任务测试
本站未执行安装或任务测试
来源复核
本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料

skills/.curated/security-best-practices/SKILL.md · 抓取时间 2026-11-16T12:36:35.145Z

以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。

抓取成功不代表已完成安装或任务测试。

来源 description(原文)

Perform language and framework specific security best-practice reviews and suggest improvements. Trigger only when the user explicitly requests security best practices guidance, a security review/report, or secure-by-default coding help. Trigger only for supported languages (python, javascript/typescript, go). Do not trigger for general code review, debugging, or non-security tasks.

查看源文件章节 / Source sections
  • 原文:Security Best Practices
  • 原文:Overview
  • 工作流程 / Workflow
  • 原文:Workflow Decision Tree
  • 原文:Overrides
  • 原文:Report Format
  • 原文:Fixes
  • 原文:General Security Advice
  • 原文:Avoid Using Incrementing IDs for Public IDs of Resources
  • 原文:A note on TLS
原文:Overview

This skill provides a description of how to identify the language and frameworks used by the current context, and then to load information from this skill's references directory about the security best practices for this language and or frameworks. This information, if present, can be used to write new secure by default code, or to passively detect major issues within existing code, or (if requested by the user) provide a vulnerability report and suggest fixes.

工作流程 / Workflow

The initial step for this skill is to identify ALL languages and ALL frameworks which you are being asked to use or already exist in the scope of the project you are working in. Focus on the primary core frameworks. Often you will want to identify both frontend and backend languages and frameworks. Then check this skill's references directory to see if there are any relevant documentation for the language and or frameworks. Make sure you read ALL reference files which relate to the specific framework or language. The format of the filenames is `<language>-<framework>-<stack>-security.md`. You should also check if there is a `<language>-general-<stack>-security.md` which is agnostic to the framework you may be using. If working on a web application which includes a frontend and a backend, make sure you have checked for reference documents for BOTH the frontend and backend! If you are asked to make a web app which will include both a frontend and backend, but the frontend framework is not specified, also check out `javascript-general-web-frontend-security.md`. It is important that you understand how to secure both the frontend and backend. If no relevant information is available in the skill's references directory, think a little bit about what you know about the language, the framework, and all well known security best practices for it. If you are unsure you can try to search online for documentation on security best practices. From there it can operate in a few ways. 1. The primary mode is to just use the information to write secure by default code from this point forward. This is useful for starting a new project or when writing new code. 2. The secondary mode is to passively detect vulnerabilities while working in the project and writing code for the user. Critical or very important vulnerabilities or major issues going against security guidance can be flagged and the user can be told about them. This passive mode should focus on the largest impact vulnerabilities and secure defaults.

本段为节选,完整内容见源文件。

原文:Workflow Decision Tree

- If the language/framework is unclear, inspect the repo to determine it and list your evidence. - If matching guidance exists in `references/`, load only the relevant files and follow their instructions. - If no matching guidance exists, consider if you know any well known security best practices for the chosen language and or frameworks, but if asked to generate a report, let the user know that concrete guidance is not available (you can still generate the report or detect for sure critical vulnerabilities)

原文:Overrides

While these references contain the security best practices for languages and frameworks, customers may have cases where they need to bypass or override these practices. Pay attention to specific rules and instructions in the project's documentation and prompt files which may require you to override certain best practices. When overriding a best practice, you MAY report it to the user, but do not fight with them. If a security best practice needs to be bypassed / ignored for some project specific reason, you can also suggest to add documentation about this to the project so it is clear why the best practice is not being followed and to follow that bypass in the future.

原文:Report Format

When producing a report, you should write the report as a markdown file in `security_best_practices_report.md` or some other location if provided by the user. You can ask the user where they would like the report to be written to. The report should have a short executive summary at the top. The report should be clearly delineated into multiple sections based on severity of the vulnerability. The report should focus on the most critical findings as these have the highest impact for the user. All findings should be noted with an numeric ID to make them easier to reference. For critical findings include a one sentence impact statement. Once the report is written, also report it to the user directly, although you may be less verbose. You can offer to explain any of the findings or the reasons behind the security best practices guidance if the user wants more info on any findings. Important: When referencing code in the report, make sure to find and include line numbers for the code you are referencing. After you write the report file, summarize the findings to the user. Also tell the user where the final report was written to

原文:Fixes

If you produced a report, let the user read the report and ask to begin performing fixes. If you passively found a critical finding, notify the user and ask if they would like you to fix this finding. When producing fixes, focus on fixing a single finding at a time. The fixes should have concise clear comments explaining that the new code is based on the specific security best practice, and perhaps a very short reason why it would be dangerous to not do it in this way. Always consider if the changes you want to make will impact the functionality of the user's code. Consider if the changes may cause regressions with how the project works currently. It is often the case that insecure code is relied on for other reasons (and this is why insecure code lives on for so long). Avoid breaking the user's project as this may make them not want to apply security fixes in the future. It is better to write a well thought out, well informed by the rest of the project, fix, then a quick slapdash change. Always follow any normal change or commit flow the user has configured. If making git commits, provide clear commit messages explaining this is to align with security best practices. Try to avoid bunching a number of unrelated findings into a single commit. Always follow any normal testing flows the user has configured (if any) to confirm that your changes are not introducing regressions. Consider the second order impacts the changes may have and inform the user before making them if there are any.

文件 SHA256:7b3dae1ffc5434d890f3c65c8f552af52d0307fab3b35dec13013c9ca3844c4f

仓库许可证记录:未提供;not-established,查看来源。

SKILL.md原文description · 2026-11-16T12:36:35.145Z

Perform language and framework specific security best-practice reviews and suggest improvements. Trigger only when the user explicitly requests security best practices guidance, a security review/report, or secure-by-default coding help. Trigger only for supported languages (python, javascript/typescript, go). Do not trigger for general code review, debugging, or non-security tasks.

查看历史简介来源

历史收录数据

来源仓库openai/skills
Skill源路径skills/.curated/security-best-practices/SKILL.md

安装前请让使用的Agent先读取这个SKILL.md及其所在目录,确认依赖和所需权限。此页不生成未经来源验证的安装命令。

返回 Skills 目录,按任务继续筛选 · MCP与Skills教程与资源