Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use this skill when the work involves authentication, authorization, trust boundaries, sensitive data, input validation, or vulnerability assessment. Activated when designing or modifying AuthN/AuthZ flows; handling or storing PII, financial, or health data; processing user input or file uploads; integrating with third-party APIs; designing system boundaries; reviewing pull requests (implicitly always active); or when the user mentions security concerns, vulnerabilities, or asks for a security a
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | 45% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 163% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 111% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 124% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 136% | 0% |
*) IAM or database permissions to bypass blockersThe staff-level security mental model operates on one core assumption: Assume Breach.
Do not trust the network, the user, the internal microservices, the database, or the third-party API. Perimeter defense (firewalls) is insufficient because threats often originate from inside the perimeter or bypass it via application logic flaws.
Security is never an afterthought, a final audit, or a compliance checklist. It is integrated directly into the architectural design phase ("Shift Left") to prevent flaws before implementation begins.
View the system through the eyes of a malicious actor: "How can I break this? How can I bypass this? How can I use this feature in a way the developer never intended?" Do not rely on obscurity. Rely on mathematically proven cryptographic standards and robust, centralized authorization mechanisms.
| Threat | What the Attacker Does | Primary Mitigation | Security Property | | --- | --- | --- | --- | | Spoofing | Pretending to be someone else | Strong AuthN, MFA, robust session management | Authentication | | Tampering | Modifying data in transit or at rest | Input validation, parameterized queries, TLS | Integrity | | Repudiation | Claiming they didn't perform an action | Non-repudiable audit logging, digital signatures | Non-repudiation | | Information Disclosure | Accessing data they shouldn't see | TLS, encryption at rest, strict AuthZ rules | Confidentiality | | Denial of Service | Crashing or exhausting the system | Rate limiting, WAFs, load shedding, pagination | Availability | | Elevation of Privilege | Gaining admin rights without authorization | RBAC, Least Privilege | Authorization |
Apply all ten before and during security work:
1. Trust Boundaries — Where does untrusted input enter? Where do identities change context? Which systems, users, or services should not automatically trust each other?
2. Authentication — How is identity established? Is the method appropriate? Are session/token lifecycles, expiration, refresh, and invalidation handled safely?
3. Authorization — Who is allowed to do what? Is access control enforced server-side? Are permissions scoped narrowly and explicitly? Is object-level access checked, not just route-level access?
4. Input and Output Safety — Are inputs validated at the correct boundaries? Are outputs encoded safely for their context? Could user-controlled data trigger injection, script execution, or unsafe rendering?
5. Sensitive Data Handling — What data is sensitive? Is it encrypted in transit and at rest? Is retention minimized? Is exposure limited to the minimum required surface?
6. Secret and Credential Handling — Where are secrets stored? Are they hardcoded, logged, copied into configs, or otherwise handled unsafely? Are privileged credentials rotated and scoped appropriately?
7. Abuse and Misuse Cases — How could a malicious actor misuse this feature? What is the worst credible abuse path? What controls limit spam, enumeration, privilege escalation, or automated abuse?
8. Blast Radius — If this component is compromised, what else is reachable? What can the attacker do next? Are privileges and trust relationships too broad?
9. Auditability and Detection — Would we know if this were abused? Are there logs or signals for auth events, denied access, unusual access patterns, or suspicious failures? Are those logs safe and non-leaky?
10. Safe Defaults — Does the design fail closed or fail open? Are protections on by default? Would a rushed implementation accidentally deploy an unsafe configuration?
Prefer:
Draw a box around the components you control. Everything outside is untrusted. Identify every point where data crosses a boundary (APIs, UI forms, file uploads, database queries). Data loses its "trusted" status the moment it crosses a boundary.
What data, if leaked, would cause catastrophic business or user harm? Where does this data live? How does it move? Who needs access to it?
Look at the trust boundaries and assets. Apply STRIDE categories. Ask: "How could someone spoof an identity here? How could they tamper with this payload?"
Define a strict Allowlist for all incoming data (type, length, format, range). Never use blocklists — they always fail. Sanitize and escape data right before it is used (parameterized queries for SQL, HTML escaping for UI).
Do not rely on UI hiding. The API must verify authorization on every single request. Check both vertical privilege (is this user an admin?) and horizontal privilege (is this User A's document, or User B's document?).
Ensure no API keys, passwords, or salts are in the code. Ensure logging mechanisms strip PII, passwords, and tokens before writing to disk.
If the authentication service goes down, does the application default to letting everyone in, or locking everyone out? It must lock everyone out. Ensure error messages do not leak internal system details ("Invalid password" not "User found, but password incorrect").
| Anti-Pattern | What It Looks Like | Why It's Harmful | Fix | | --- | --- | --- | --- | | Client-Side Security | JavaScript validation or hidden UI buttons as the only access control | An attacker can bypass the browser entirely via cURL or Postman | Client-side checks are for UX. Backend must validate everything independently. | | Blocklist / Denylist | Regexes filtering out <script> or OR 1=1 | Attackers use encoded payloads, mixed casing, or alternative syntax your blocklist didn't anticipate | Use Allowlists. Define exactly what is allowed and reject everything else. | | Security by Obscurity | Assuming an endpoint is safe because it's not documented | Attackers decompile apps, monitor network traffic, and reverse-engineer logic. Once the secret is found, the system falls. | A system must remain secure even if the attacker has the entire source code (Kerckhoffs's principle). | | Wildcard Permissions | AmazonS3FullAccess or GRANT ALL PRIVILEGES to get things working quickly | If that service is breached, the attacker gains god-mode access to infrastructure | Apply Least Privilege. Grant only the specific permissions the service actually needs. |
markdown## Security Scope What components/flows are being evaluated. ## Trust Boundaries Where data crosses from untrusted to trusted zones. ## Threat Assessment (STRIDE) | Threat | Component | Vulnerability | Severity | | --- | --- | --- | --- | | Spoofing | Auth API | Missing rate limiting | High | | Tampering | DB Layer | String concat in SQL | Critical | ## Identified Vulnerabilities (Prioritized) ### 🔴 Critical / High - **Vulnerability:** [Description] - **Exploit Path:** [How an attacker uses it] - **Blast Radius:** [What happens when exploited] - **Remediation:** [Exact code/arch change needed] ### 🟡 Medium / Low - [Lower priority hardening steps] ## Hardening Recommendations General architectural or process changes to improve defense in depth.
Final Rule: Security is about controlling trust, capability, and blast radius under imperfect conditions. A strong security result makes clear: what is being protected, where the trust boundary is, what could go wrong, how the system reduces that risk, and what still needs verification before trust is justified.
Other measured skills in the registry, with their headline benchmark lift.