К основному содержанию
скилл Claude Code CX Codex Cursor GitHub Copilot

security-best-practices — скилл для Claude Code: аудит безопасности

Скилл проводит ревью кода на соответствие практикам безопасности для Python, JavaScript/TypeScript и Go и предлагает правки.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add tech-leads-club/agent-skills --skill security-best-practices -a claude-code
Открыть на GitHub

Что делает security-best-practices

Скилл сначала определяет, какие языки и фреймворки используются в проекте — и на фронтенде, и на бэкенде. Потом подгружает из своей папки references/ файлы вида <language>-<framework>-<stack>-security.md и работает по ним. Если для стека готовых файлов нет, опирается на общие знания о безопасных практиках.

Режимов три. Основной — писать новый код сразу безопасно. Второй — по ходу работы замечать крупные уязвимости и сообщать о них. Третий — по запросу собрать отчёт: markdown-файл security_best_practices_report.md с кратким резюме, разбивкой находок по критичности и номерами ID, со ссылками на строки кода. После отчёта скилл предлагает починить находки по одной.

Правила проекта могут требовать отойти от рекомендаций скилла. В таких случаях он не спорит, а советует задокументировать причину обхода, чтобы в следующий раз было понятно, почему практика не соблюдается. Для ревью общего характера, отладки и моделирования угроз этот скилл не подходит — для угроз есть отдельный security-threat-model.

Какие задачи решает

  • проверить новый код на типовые уязвимости до коммита
  • получить отчёт о безопасности с разбивкой по критичности
  • писать бэкенд на Python сразу с безопасными настройками
  • заметить опасные места в чужом проекте, пока правишь другой баг
  • починить найденную уязвимость без поломки текущего поведения

Примеры запросов агенту

  • Проведи ревью безопасности этого проекта и составь отчёт
  • Помоги написать безопасный по умолчанию обработчик загрузки файлов
  • Найди критичные уязвимости в этом коде и предложи исправления

Как установить security-best-practices

1Через Skills CLI (Vercel)

npx skills add tech-leads-club/agent-skills --skill security-best-practices -a claude-code

2Вручную: положить файлы

~/.claude/skills/security-best-practices/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/security-best-practices/

Похожие

owasp-top-10-testing usestrix Запускает агентов Strix для поиска реальных эксплойтов по стандарту OWASP Top 10:2025. Пригодится перед релизом или аудитом безопасности веб-приложения. Claude Code CX Codex Cursor +1 12 600установок application-security-testing usestrix Скилл подбирает проверки для кода, веб-приложения, API и CI, затем собирает подтверждённые проблемы в план исправлений. Пригодится для AppSec-аудита. Claude Code CX Codex Cursor +1 12 300установок 1password openclaw Настраивает 1Password CLI, подключает авторизацию и помогает безопасно внедрять секреты в команды без утечки паролей в чат. Claude Code CX Codex Cursor +1 6 300установок healthcheck openclaw Проверяет безопасность хоста OpenClaw, открытые порты, фаервол и SSH. Помогает найти риски и поэтапно усилить защиту без опасности потерять доступ. Claude Code CX Codex Cursor +1 5 500установок docker-expert sickn33 Скилл для ИИ-агента, который разбирает Dockerfile, multi-stage сборки и безопасность контейнеров. Пригодится, когда нужно навести порядок в образах и Compose. Claude Code CX Codex Cursor +1 27 200установок java-springboot официальный github Задаёт практики разработки Spring Boot-приложений: от структуры проекта до тестов и безопасности. Пригодится, когда Copilot пишет или проверяет Java-код. GitHub Copilot 21 272установок git-guardrails-claude-code Matt Pocock Скилл ставит хук Claude Code, который останавливает опасные Git-команды до их запуска. Нужен, если агент не должен делать push или удалять изменения. Claude Code 499 069установок ponytail-review DietrichGebert Скилл проверяет изменения глубже обычного diff: читает связанный код, ищет ошибки, риски, проблемы нагрузки и недостающие тесты. Пригодится для ревью PR и коммитов. Claude Code CX Codex Cursor +1 56 300установок

Вопросы о security-best-practices

Как установить security-best-practices в Claude?

Выполните npx skills add tech-leads-club/agent-skills --skill security-best-practices -a claude-code. Скилл окажется в ~/.claude/skills/security-best-practices/SKILL.md.

Что делает security-best-practices?

Определяет языки и фреймворки проекта, подгружает справку по безопасности для них и либо пишет безопасный код, либо собирает отчёт об уязвимостях с приоритетами и предлагает исправления.

Какие языки поддерживает скилл?

Python, JavaScript/TypeScript и Go. Для веб-приложений с фронтендом и бэкендом проверяются обе части.

Исходный текст

SKILL.md · Apache-2.0
---
name: security-best-practices
description: Perform language and framework specific security best-practice reviews and suggest improvements. Use when the user explicitly requests security best practices guidance, a security review or report, or secure-by-default coding help. Supports Python, JavaScript/TypeScript, and Go. Do NOT use for general code review, debugging, threat modeling (use security-threat-model), or non-security tasks.
metadata:
  author: github.com/openai/skills
  version: '1.0.0'
---

# Security Best Practices

## 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.

3. The user can ask for a security report or to improve the security of the codebase. In this case a full report should be produced describe anyways the project fails to follow security best practices guidance. The report should be prioritized and have clear sections of severity and urgency. Then offer to start working on fixes for these issues. See #fixes below.

## 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.

# General Security Advice

Below is a few bits of secure coding advice that applies to almost any language or framework.

### Avoid Using Incrementing IDs for Public IDs of Resources

When assigning an ID for some resource, which will then be used by exposed to the internet, avoid using small auto-incrementing IDs. Use longer, random UUID4 or random hex string instead. This will prevent users from learning the quantity of a resource and being able to guess resource IDs.

### A note on TLS

While TLS is important for production deployments, most development work will be with TLS disabled or provided by some out-of-scope TLS proxy. Due to this, be very careful about not reporting lack of TLS as a security issue. Also be very careful around use of "secure" cookies. They should only be set if the application will actually be over TLS. If they are set on non-TLS applications (such as when deployed for local dev or testing), it will break the application. You can provide a env or other flag to override setting secure as a way to keep it off until on a TLS production deployment. Additionally avoid recommending HSTS. It is dangerous to use without full understanding of the lasting impacts (can cause major outages and user lockout) and it is not generally recommended for most projects in review.

© github.com/openai/skills · Apache-2.0 · tech-leads-club/agent-skills

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой