Command Palette

Search for a command to run...

Назад к скиллам
скилл № 81729

security-best-practices

Perform language and framework specific security best-practice reviews and suggest improvements. Trigger when the user requests: security review, security…

БесплатноБез исполняемых скриптов
ckorhonenот ckorhonen★ 35 звёзд на GitHub

Установить security-best-practices в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

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

Supply Chain & Dependency Security

Modern applications are heavily dependent on third-party packages. Always assess:

  1. Dependency auditing:

    # Node.js
    npm audit
    npx better-npm-audit audit --level moderate
    
    # Python
    pip-audit
    safety check
    
    # Go
    govulncheck ./...
    
  2. Lock file integrity: Ensure package-lock.json, yarn.lock, poetry.lock, or go.sum is committed and reproducible.

  3. Typosquatting: Check for packages with names very similar to popular ones (e.g., lodahs vs lodash).

  4. Pinned versions in CI: Use exact versions or digests in CI/CD, not ranges.

  5. SBOM generation: For production applications, recommend generating a Software Bill of Materials:

    # Node.js
    npx @cyclonedx/cyclonedx-npm --output-file sbom.json
    
    # Python
    cyclonedx-py environment -o sbom.json
    

Secrets Management

Secrets in code are a critical and frequent finding. Check for:

  • Hardcoded API keys, tokens, passwords, connection strings
  • .env files committed to git (check .gitignore)
  • Secrets in environment variables that get logged
  • Secrets in Docker build args (visible in image history)

Detection tools:

# Gitleaks — scan git history for secrets
gitleaks detect --source . --verbose

# TruffleHog — scan git history
trufflehog git file://. --since-commit HEAD~20

# Detect-secrets
detect-secrets scan --all-files

Recommended patterns:

  • Use a secrets manager (AWS Secrets Manager, HashiCorp Vault, GCP Secret M
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • LICENSE.txt
  • agents/openai.yaml
  • references/golang-general-backend-security.md
  • references/javascript-express-web-server-security.md
  • references/javascript-general-web-frontend-security.md
  • references/javascript-jquery-web-frontend-security.md
  • references/javascript-typescript-nextjs-web-server-security.md
  • references/javascript-typescript-react-web-frontend-security.md
  • references/javascript-typescript-vue-web-frontend-security.md
  • references/python-django-web-server-security.md
  • references/python-fastapi-web-server-security.md
  • references/python-flask-web-server-security.md

FAQ

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

Perform language and framework specific security best-practice reviews and suggest improvements. Trigger when the user requests: security review, security report, threat assessment, vulnerability scan, security audit, secure-by-default coding, hardening guidance, or security best practices guidance. Supported languages: Python, JavaScript/TypeScript, Go. Covers OWASP Top 10, supply chain security, secrets management, dependency auditing, and modern cloud deployment hardening.

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

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл security-best-practices запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить security-best-practices с