Logo vun Backend Security

Backend Security

Communautéit
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".

Iwwersiicht

EditeurMiladJoodi
Repositoryskills
Skill-Nummbackend-security
Stären
24
Forks
1
Matgeliwwert Fichieren
11
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 11 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum MiladJoodi op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Backend Security an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/MiladJoodi/skills/tree/main/skills/backend-security
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

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
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Backend Security an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Backend Security automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Backend Security net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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.

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill 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...

Firwat Backend Security op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Backend Security besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Backend Security an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/MiladJoodi/skills/tree/main/skills/backend-security an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Backend Security benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Backend Security benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Backend Security domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Backend Security gratis?

Jo. De Skill gëtt vum MiladJoodi ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇