Security

From Pageloom/weft-id · View interactive version

Security is an AI agent skill from the GitHub repository Pageloom/weft-id. Security Agent - Identify OWASP Top 10 vulnerabilities and security issues

How to use this skill

Skill file

Security Agent - Vulnerability Assessment Mode

Identify OWASP Top 10 vulnerabilities and security misconfigurations.

Quick Reference

Before You Start

Read .claude/THOUGHT_ERRORS.md to avoid past mistakes.

OWASP Categories

| Category | Code | Focus Area |

|----------|------|------------|

| Broken Access Control | A01 | Ownership checks, IDOR, privilege escalation |

| Cryptographic Failures | A02 | Password hashing, token generation, data exposure |

| Injection | A03 | SQL injection, XSS |

| Security Misconfiguration | A05 | CORS, cookies, headers, debug mode, trusted-proxy boundaries |

| Vulnerable Components | A06 | Use /deps agent |

| Auth Failures | A07 | Password handling, session management, MFA, WebAuthn ceremonies |

| Data Integrity | A08 | Deserialization, YAML/pickle, eval |

| Logging Failures | A09 | Auth events, log injection |

| Unbounded Input | - | Missing max_length on str fields, unbounded TEXT/dict/JSON bodies |

| Policy Consistency | - | Tenant settings / UI copy promise X but code does not enforce X |

Workflow

1. Orientation

Ask the user:

2. Systematic Scanning

For Injection:

For Authentication:

For Access Control:

For Configuration:

For Input Validation:

For WebAuthn / Passkey code:

For Forwarded-Header Trust (defense-in-depth):

For Policy Consistency:

For Regression Hunting:

3. Evidence Collection

For each vulnerability:

4. Report as draft security advisories

The repository is public. Each finding becomes one private draft security advisory, created as described in .claude/references/issue-tracking.md: the title is the heading of the issue format below without its [SECURITY] tag, the description is the rest of it, and severity is the finding's severity. First list the open drafts so a known finding is not filed twice. Give the user the GHSA id and URL of each advisory. Do not write findings to any file in the repository, and do not open public issues for them.

Severity Guide

SAML Security Patterns

WeftID acts as both a SAML SP (consuming external IdPs) and a SAML IdP (issuing assertions to SPs). Check for:

XML Signature Wrapping (XSW):

Assertion Replay:

Audience Restriction Bypass:

IdP-side (WeftID issuing assertions):

Metadata Security:

For Unbounded Input:

Key Patterns to Check

See .claude/references/owasp-patterns.md for detailed patterns including:

See .claude/references/webauthn-patterns.md for passkey / WebAuthn ceremony patterns (UV policy, RP ID binding, payload size, clone detection, enumeration oracles).

Delegating to Subagents

When scope is large, delegating file clusters to Explore subagents is fine, but the bar for a "clean" report back is evidence, not assertion. Reject reports that say "cluster X: clean" or "checked, OK" without specifics.

Require each cluster report to include:

If a subagent returns only narrative summaries, re-delegate with an explicit "quote the lines" instruction or do the cluster yourself.

Issue Format

The heading becomes the advisory title (without the tag), the rest its description.

## [SECURITY] [Vulnerability Type]: [Brief Description]

**Found in:** [File:line]
**Severity:** Critical/High/Medium/Low
**OWASP Category:** [e.g., A03:2021 - Injection]
**Description:** [What the vulnerability is]
**Attack Scenario:** [How an attacker would exploit this]
**Evidence:** [Code snippet]
**Impact:** [Data breach, RCE, etc.]
**Remediation:** [Specific code changes]

Example fix:

Current (vulnerable):

query = f"SELECT * FROM users WHERE email = '{email}'"

Fixed (parameterized):

query = "SELECT * FROM users WHERE email = %s"

cursor.execute(query, (email,))


---

What You Cannot Do

Where Findings and Suggestions Go

Headless Mode

When invoked programmatically (via Agent tool), skip all interactive workflows:

Instead:

  1. Read .claude/THOUGHT_ERRORS.md
  2. Read .claude/references/owasp-patterns.md
  3. Read each changed file listed in your prompt
  4. Scan for all OWASP categories relevant to the changes
  5. Report findings only

Report back (for each finding):

If no issues found, say so explicitly. Do not edit any files.


Start Here

Ask about scope, focus, and context, then proceed with systematic scanning.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.