andreibesleaga/gabbe/security

Claude Code and agent skill by andreibesleaga/gabbe

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

STRIDE threat modeling before implementing security-sensitive features

Install

npx vskill@latest install andreibesleaga/gabbe/security

SKILL.md

The same SKILL.md was published earlier as andreibesleaga/gabbe/security.

Threat Model Skill

Goal

Create a STRIDE threat model BEFORE implementing any security-sensitive feature. Prevents security issues at design time (cheapest point to fix) rather than after implementation (expensive) or in production (catastrophic).

Where it fits

Phase and gate: S02 (system threat model, human gate) and before any security-sensitive feature. Evidence: docs/security/THREAT_MODEL.md and per-feature files in docs/security/threat-models/. Part of security-baseline.skill.md; the S07 reviewer checks that each mitigation exists.

When to Invoke

  • Before implementing: authentication, authorization, user registration, file upload
  • Before implementing: payment processing, data storage, API endpoints, admin features
  • Before any feature that handles: PII, financial data, health data, secrets, files

Steps

  1. Identify system components and trust boundaries
  • Reference the C4 Component diagram if it exists (docs/architecture/)
  • Draw the data flow: user → entry point → processing → storage → response
  • Mark trust boundaries (where permissions or privilege changes)
  • Identify actors: authenticated user, anonymous user, admin, external service, attacker
  1. Apply STRIDE to each component

For each component (API endpoint, service, data store), systematically ask:

S — Spoofing (impersonation)

  • Can an attacker pretend to be another user or service?
  • Example threats: stolen JWT tokens, forged API keys, session hijacking

T — Tampering (data modification)

  • Can an attacker modify data in transit or at rest?
  • Example threats: MITM attacks, SQL injection, parameter tampering, mass assignment

R — Repudiation (deny actions)

  • Can an attacker deny performing an action?
  • Example threats: no audit log, no digital signature for financial transactions

I — Information Disclosure (data leaks)

  • Can an attacker access data they shouldn't see?
  • Example threats: IDOR, verbose error messages, log injection, SSRF

D — Denial of Service

  • Can an attacker degrade or block service availability?
  • Example threats: no rate limiting, resource exhaustion, large file uploads

E — Elevation of Privilege

  • Can an attacker gain more permissions than they should have?
  • Example threats: JWT algorithm confusion, IDOR to admin endpoints, business logic bypass
  1. Score each threat
FactorLowMediumHigh
LikelihoodAttacker needs special access/skillsKnown exploit pattern existsTrivial to exploit
ImpactMinor data exposureUser data compromisedAll data, system compromise

Priority = Likelihood × Impact (High×High = Critical)

  1. Propose mitigations for High and Critical threats

```markdown

ThreatSTRIDELIPriorityMitigation
Stolen JWT allows impersonationSHHCriticalShort expiry (15min), refresh token rotation, token revocation list
IDOR on /users/{id} endpointIMHHighVerify ownership: user.id === session.userId before returning
No rate limit on /auth/loginDHMHighMax 5 attempts/min per IP, 3 per account, exponential backoff

```

  1. Fill THREAT_MODEL_TEMPLATE.md
  • Save to: docs/security/THREAT_MODEL.md for the system (S02) and docs/security/threat-models/[feature-name]-threat-model.md for a feature
  • For software with an AI model or agent, add the surfaces from prompt-injection-defense.skill.md and agent-tool-review.skill.md
  1. Record new security invariants as EARS requirements in the spec or in the security section of AGENTS.md (only the human amends CONSTITUTION.md)
  • Example: "WHEN a user accesses /api/users/{id}, THE SYSTEM SHALL verify the requesting user owns that resource"
  1. Create tasks for mitigations
  • Add each High/Critical mitigation to project/TASKS.md
  • These are blocking tasks — must be implemented before the feature is complete
  1. Human review required
  • Present threat model to human before implementing the feature
  • Confirm all Critical and High mitigations will be implemented

STRIDE Quick Reference

LetterCategoryQuestion to ask
SSpoofingWho is claiming to be who, and how do we verify it?
TTamperingWhat data can be modified by unauthorized parties?
RRepudiationCan actions be denied? Are they logged immutably?
IInformation DisclosureWhat can be leaked, and to whom?
DDenial of ServiceWhat can be exhausted, flooded, or blocked?
EElevation of PrivilegeHow can someone gain more access than intended?

Constraints

  • Threat modeling is MANDATORY before implementing: auth, payment, file storage, admin features
  • All Critical threats must have implemented mitigations before feature ships
  • High threats must have mitigations or documented risk acceptance by human
  • Never implement a security control without documenting why it addresses a specific threat

Output Format

Completed threat model file at docs/security/threat-models/[name]-threat-model.md + tasks added for mitigations.

Limits and safety

  • Each High or Critical mitigation gets a linked row in project/TASKS.md. If the row cannot be written, stop and tell the human.
  • Fill all six STRIDE letters for every component. Write "none found, because ..." instead of skipping one.
  • After approval, a change that removes a threat row or a mitigation goes back to the human.
  • When infrastructure code or a deployment exists, compare it with the model and report any drift.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
18
Repository forks
7
7-day trend score
15

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/andreibesleaga/gabbe/security/badge)](https://verified-skill.com/skills/andreibesleaga/gabbe/security)

Something wrong with this skill or its page? Tell us.