Логотип Backend Security

Backend Security

Сообщество
MiladJoodi
backend-security

Secure-by-default guidance for writing, reviewing, and fixing backend application code - HTTP/REST/GraphQL APIs, authentication, authorization (BOLA/IDOR), sessions and JWT, OAuth/OIDC, password hashing, injection (SQL, NoSQL, command, template), SSRF, mass assignment, rate limiting, file uploads, secrets and crypto, webhooks, race conditions, business-logic abuse, logging, background jobs, and dependency hygiene. Use whenever the user mentions SQL injection, SSRF, IDOR, BOLA, JWT, sessions, OAuth, password hashing, rate limiting, mass assignment, file upload, secrets, webhooks, race conditions, API security, security review, or audit. Also use when implementing login, signup, password reset, roles and permissions, multi-tenant data access, database queries, outbound HTTP fetches, webhooks, queue workers, or payment endpoints, even if the user never says "security".

Обзор

ИздательMiladJoodi
Репозиторийskills
Название навыкаbackend-security
Звёзды
24
Форки
1
Встроенные файлы
11
ЛицензияMIT
Ссылки
  • Инструкции в формате Markdown

    Файл SKILL.md, который модель загружает по необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 11

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Опубликовано на GitHub: MiladJoodi. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Backend Security в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/MiladJoodi/skills/tree/main/skills/backend-security
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Новый навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/MiladJoodi/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/backend-security .claude/skills/backend-security
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Backend Security в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Backend Security, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Backend Security не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими API-ключами.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

Backend Security (Application Layer)

Rules for writing, reviewing, and fixing backend code so it is secure by default. Prefer small, targeted changes that preserve existing behavior. Concrete fixes over theory.

Standards baseline: OWASP Top 10:2025 (SSRF now sits under A01 Broken Access Control), OWASP API Security Top 10:2023, OWASP ASVS 5.0.0. These are baselines, not a substitute for threat modeling or version-specific documentation.

Scope: application-level backend security. Out of scope: infrastructure and OS hardening, network security, penetration testing. Browser-side topics (XSS, CSP, browser cookie handling, token storage in the browser) belong to the frontend-security skill; this skill covers only the server-side half.

Examples are TypeScript (Node.js). The rules are language-neutral; each reference notes where Python, PHP, Go, or Java differ.

Last reviewed: October 2026.

How to work

  1. Inspect first. Identify language and framework versions, the auth model (session, JWT, OAuth), the data layer (ORM, raw SQL, NoSQL), multi-tenancy, where authorization is enforced (middleware, service, query), and existing security controls. Do not duplicate or conflict with them.
  2. Trace untrusted data from every source (body, query, path, headers, cookies, files, webhooks, queue messages, third-party responses, database values you do not control) to every sink (query, command, template, file path, outbound URL, log line, response).
  3. Pick the mode: implement, fix, or audit. For audits, report each finding with severity, location, evidence, fix, and how it was verified.
  4. Make the smallest secure change. Do not rewrite an auth or deployment architecture when a targeted check or a parameterized query fixes the problem.
  5. Test the attack path. Add or run a test for the exploit, the expected denial, and boundary cases (other user, other tenant, replay, concurrent request).
  6. Verify, then report. Say what you checked and what you could not. Never claim "fixed" because a config line exists.

Ask the user only what changes the answer: auth model, tenancy key, database engine, whether GraphQL, webhooks, or background jobs exist. Never ask for real secrets or production data.

Non-negotiable rules

  1. Authenticate, then authorize every action on every object. Never trust a client-supplied user ID, role, tenant, price, or ownership flag.
  2. Authorization lives in the query. Scope reads, updates, and deletes by owner or tenant, and treat zero affected rows as denial.
  3. Parameterize everything. Never build SQL, NoSQL filters, shell commands, LDAP filters, or templates from untrusted strings.
  4. Validate input with a schema at every trust boundary: types, ranges, enums, sizes, depth. Reject unknown fields on writes.
  5. Allowlist writable and returnable fields. No raw request bodies into models; no raw models into responses.
  6. Block SSRF. Allowlist destinations, deny private and metadata addresses at connection time, limit redirects, time, and bytes.
  7. Hash passwords with Argon2id (or scrypt/bcrypt where it is unavailable). Never use fast hashes or reversible encryption.
  8. Treat tokens as bearer credentials. Pin JWT algorithms, validate iss/aud/exp, keep lifetimes short, rotate refresh tokens, make revocation possible.
  9. Make money, quota, and redeem operations atomic and idempotent. Conditional updates, unique constraints, idempotency keys.
  10. Recompute prices, totals, permissions, and eligibility on the server. Client values are hints.
  11. Verify inbound webhooks over the raw body with a constant-time compare and a freshness check, and deduplicate event IDs.
  12. Treat uploads, queue messages, and third-party responses as hostile. Server-generated keys, content validation, private storage, re-authorization in workers.
  13. Secrets never appear in source, logs, errors, or responses. Use a secret manager, separate environments, and rotate.
  14. Fail closed. Generic client errors, detailed server logs with a request ID; authorization or crypto failures never degrade to "allow".
  15. Rate-limit authentication and expensive or abusable flows, and bound pagination, body size, and query cost.

Where to read next

Read only what the task needs. For a full audit, read the checklist first, then the references for each area found in the code.

Task touchesRead
Passwords, login, sessions, JWT, refresh tokens, MFA, OAuth/OIDC, reset linksreferences/authentication.md
BOLA/IDOR, roles, tenants, mass assignment, admin routes, step-up authreferences/authorization.md
SQL/NoSQL/command/template injection, validation, deserialization, paths, XXE, ReDoSreferences/injection-and-input.md
Outbound fetch, URL previews, webhook senders, SSRFreferences/ssrf-and-outbound.md
Rate limits, GraphQL, business-flow abuse, CORS/CSRF (server side), API errors and inventoryreferences/api-security.md
Secrets, encryption, randomness, keys, PII, database privileges, backupsreferences/secrets-crypto-data.md
Races, transactions, idempotency, state machines, price tamperingreferences/concurrency-and-business-logic.md
Uploads, object storage, inbound webhooks, queues and workersreferences/files-webhooks-jobs.md
Logging, audit trails, error handling, dependencies, supply chainreferences/logging-errors-deps.md
Finishing a change or running an auditreferences/review-checklist.md

Verify before asserting

  • Never invent library APIs, option names, defaults, or config keys. Check the installed version and the official docs.
  • Examples marked "illustrative" or using helper names that are not real library functions must be adapted to the project's actual libraries.
  • Never ship placeholder secrets, keys, or hashes as working values. Use clearly marked placeholders.
  • Password-hashing parameters, JWT library behavior, framework raw-body handling, and database isolation semantics are version-specific: confirm them.
  • If something could not be verified in this session, say so explicitly in the final message.

Встроенные файлы

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

Часто задаваемые вопросы

Что делает навык ИИ Backend Security?

Secure-by-default guidance for writing, reviewing, and fixing backend application code - HTTP/REST/GraphQL APIs, authentication, authorization (BOLA/IDOR), sessions and JWT, OAuth/OIDC, password hashing, injection (SQL, NoSQL, command, template), SSRF, mass assignment, rate limiting, file uploads, secrets and crypto, webhooks, race conditions, business-logic abuse, logging, background jobs, and dependency hygiene. Use whenever the user mentions SQL injection, SSRF, IDOR, BOLA, JWT, sessions, OAuth, password hashing, rate limiting, mass assignment, file upload, secrets, webhooks, race condit...

Зачем использовать Backend Security в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Backend Security — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Backend Security в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/MiladJoodi/skills/tree/main/skills/backend-security. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Backend Security?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Backend Security?

С любым количеством. Если модель поддерживает навыки, вы можете использовать с ней Backend Security: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama и другие — всё в TypingMind с вашими собственными ключами API.

Бесплатен ли навык ИИ Backend Security?

Да. Навык опубликован на GitHub автором MiladJoodi по лицензии MIT. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это многоразовый набор инструкций, который объясняет модели ИИ, как выполнять конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты для вызова — код, который где-то выполняется и возвращает результат. Навык ИИ вместо этого даёт модели знания и порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте свою рабочую ИИ-среду сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇