Logo: Secure Coding

Secure Coding

Communautéit
MartinOlivero
secure-coding

Dëse Skill soll beim SCHREIWE vun all Backend-, API-, Authentifikatiouns- oder Datebehandlungscode fir eng Web-App oder SaaS benotzt ginn – fir Sécherheetslücken ze verhënneren, éier de Code erausgeet, an net eréischt fir se dono ze iwwerpréiwen. Ausléiser-Ausdréck sinn ënner anerem „eng Endpunkt bäisetzen“, „Benotzerinput behandelen“, „Benotzerdonnéeë späicheren“, „ass dat sécher?“, „d'API bauen“, „an der Datebank späicheren“, „de Formulaire behandelen“, „Benotzer lueden Dateien erop“, „Bezuelung verschaffen“, „Geheimnisser behandelen“, „CORS astellen“ an „Ufroe limitéieren“. De Skill setzt d'Präventioun vun den OWASP Top 10, d'Input-Validatioun, de sécheren Ëmgang mat Geheimnisser an d'Grondlage vum GDPR scho beim Entwéckelen ëm.

Add to TypingMind

Iwwersiicht

EditeurMartinOlivero
Repositorysaas-builder
Skill-Nummsecure-coding
Stären
4
Forks
2
Matgeliwwert Dateien
1
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.

  • 1 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

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

Installatioun

Installéiert de KI-Skill Secure Coding an TypingMind, fir e mat all LLM ze benotzen, oder setzt 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 „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/MartinOlivero/saas-builder/tree/main/skills/secure-coding
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng 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 d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/MartinOlivero/saas-builder.git /tmp/saas-builder
mkdir -p .claude/skills
cp -r /tmp/saas-builder/skills/secure-coding .claude/skills/secure-coding
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Secure Coding 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 Secure Coding automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Secure Coding 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-Schlësselen.

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

Secure Coding

This skill keeps you from introducing vulnerabilities while you build. It is prevention, not audit — it runs at the moment you write an endpoint, a form handler, or a database write, and bakes in the safe default before the bug exists.

Analogy: it is the seatbelt you put on before driving, not the crash investigator who shows up afterward. Audit tools (Trail of Bits, Semgrep, CodeQL) inspect the wreck. This skill stops the crash.

Scope

This skill is for the solo dev or small team who has no security tooling installed and just wants to ship without leaving holes. If a dedicated audit plugin is present, this skill still runs first — preventing a vuln is always cheaper than finding it later.

Trigger

Activate whenever code touches: a request handler/endpoint, user input, a database write, authentication, file uploads, secrets/env vars, CORS, or any third-party webhook. Default-deny mindset: code with no explicit security decision is the bug.

Discovery (max 3 questions, only if unknown)

  1. Is this endpoint/data public, authenticated, or admin-only?
  2. Does it touch personal data (email, name, payment, location, anything identifying a person)?
  3. What is the backend — serverless functions (Vercel), a Node server, or a BaaS (Supabase/InsForge)?

The OWASP Top 10, as prevention rules

Apply the matching rule the instant you write the code. Each maps an OWASP 2021 category to a concrete default.

RiskPrevent it by
A01 Broken Access ControlCheck authorization on the server, on every endpoint. Verify the resource belongs to req.user (stop IDOR). Default-deny: no explicit check = bug. Never trust client-sent role/price/owner fields.
A02 Cryptographic FailuresHTTPS everywhere (free on Vercel). Hash passwords with bcrypt or argon2, never plaintext/reversible. Encrypt PII at rest. Never roll your own crypto.
A03 InjectionNever string-concat SQL. Parameterized queries / ORM only (pg params, Drizzle, Prisma, Kysely). Validate every input at the boundary with zod before it reaches logic or the DB.
A04 Insecure DesignThreat-model the feature first: who can call this, what is the worst input. Enforce limits by design — quotas, server-side amount/price checks.
A05 Security MisconfigurationAdd Helmet for secure headers. CORS = explicit origin allowlist (never * with credentials: true). Disable verbose error stacks in prod.
A06 Vulnerable ComponentsPin deps, run npm audit + Dependabot, remove unused packages, update before shipping.
A07 Auth FailuresUse a vetted auth provider (see the auth skill). Rate-limit login routes harder. httpOnly + Secure + SameSite cookies for sessions. MFA where possible.
A08 Data IntegrityVerify webhook signatures (e.g. Stripe signing secret). Don't deserialize untrusted data. Commit the lockfile.
A09 Logging FailuresLog auth + authz denials — but never log PII, tokens, passwords, or full request bodies. Redact first.
A10 SSRFDon't fetch user-supplied URLs server-side without an allowlist; block internal/metadata IP ranges.

API security defaults

  • Validate at the boundary with zod, and use .strict() schemas that whitelist exactly the allowed fields. This kills mass assignment — never spread req.body into a DB write; explicitly drop role, isAdmin, id, ownerId.
  • Rate-limit every public and auth endpoint (express-rate-limit, or the platform's edge limiter). Auth routes get a stricter limit.
  • CORS: allowlist origins explicitly. With credentials, * is forbidden by spec and a real hole.
  • Return correct status codes — 401 vs 403, 422 on validation, 429 + Retry-After on limit.

User data & GDPR basics (for developers)

  • Collect the minimum PII. Drop optional fields. Less data = less liability (GDPR Art. 5 minimization).
  • Encrypt in transit (TLS) and at rest. GDPR Art. 32 cites encryption as the recommended safeguard.
  • Set retention + deletion. Provide a way to delete a user's data on request.
  • Never log PII. Redact emails, tokens, bodies before they hit logs or Sentry.

Secrets hygiene

  • .gitignore .env, .env*.local, *.pem, *.key. Commit a .env.example with names only.
  • Secrets live in the platform's encrypted store (Vercel env vars marked Sensitive), never in the repo.
  • On Vite, only VITE_-prefixed vars reach the browser — a secret behind that prefix is a public leak.
  • Rotate by add-new → redeploy → revoke-old. Optionally run gitleaks as a pre-commit net.

Server decides, client asks

The rule behind most real holes: anything the client sends is a request, not a fact.

  • Prices, totals, roles, owners, statuses — computed or checked on the server.
  • File uploads — the server builds the path (scoped to the user), chooses the bucket, restricts the type, caps the size.
  • Identity — from a token the server validates, never from a cookie or field the browser can edit.
  • Never switch to the admin/service client to make a permission error go away. That removes the permission. Find out why the user's own credentials were refused.

Public endpoints (no login)

A form or endpoint anyone can call needs, at minimum: a captcha or equivalent, a honeypot field (named so autofill won't fill it), a rate cap that does not depend on the caller's IP, and sanitizing of every value that ends up in a message sent to someone else.

Field notes

references/field-notes.md holds the security failures behind these rules — plus a working Content-Security-Policy recipe (per-request nonce, strict-dynamic, Report-Only rollout) and where secrets actually leak from. The three that cost the most:

  1. A storage path taken from the form, uploaded with the admin client.
  2. An order line saved at a client-chosen price.
  3. An API key published inside a Markdown notes file by git add -A.

For database permissions on a BaaS, run rls-audit. For third-party webhooks, see integrations. For LLM calls, see ai-features.

Output

For each piece of code, deliver: the secure implementation, a one-line note on which risk it defends against, and any validation schema (zod) inline. When you spot a violation in existing code the user shows you, flag it with the fix — but the job is to write it safe the first time.

Reference

OWASP Cheat Sheet Series (~29k⭐), OWASP Top 10:2021, GDPR.eu / gdpr-info Art. 32. Tools: zod, helmet, express-rate-limit, bcrypt/argon2, gitleaks.

Matgeliwwert Dateien

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 Secure Coding?

Dëse Skill soll beim SCHREIWE vun all Backend-, API-, Authentifikatiouns- oder Datebehandlungscode fir eng Web-App oder SaaS benotzt ginn – fir Sécherheetslücken ze verhënneren, éier de Code erausgeet, an net eréischt fir se dono ze iwwerpréiwen. Ausléiser-Ausdréck sinn ënner anerem „eng Endpunkt bäisetzen“, „Benotzerinput behandelen“, „Benotzerdonnéeë späicheren“, „ass dat sécher?“, „d'API bauen“, „an der Datebank späicheren“, „de Formulaire behandelen“, „Benotzer lueden Dateien erop“, „Bezuelung verschaffen“, „Geheimnisser behandelen“, „CORS astellen“ an „Ufroe limitéieren“. De Skill setz...

Firwat Secure Coding op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Secure Coding 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 en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Secure Coding an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/MartinOlivero/saas-builder/tree/main/skills/secure-coding 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 Secure Coding 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 Secure Coding benotzen?

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

Ass de KI-Skill Secure Coding gratis?

Jo. MartinOlivero huet de Skill ë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 weiderverwendbare Pak vun Instruktiounen, deen 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 e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

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