Skip to content
Back to skills

2554 Root Causes 720b1819

ASecurity

- **Assumption**: External input is validated before use - **Reality**: Input validation is missing, incomplete, or bypassable - **Example**: SQL injection when assuming user input is safe

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
securityrustgosqlawsapisecurity

Works with

  • cli
  • api

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 2554-root_causes_720b1819 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2554 Root Causes 720b1819?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 2554 Root Causes 720b1819
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-2554-root-causes-720b1819/badge)](https://www.skillsdirectory.com/skills/tools-only-2554-root-causes-720b1819)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Common Root Causes of Vulnerabilities

## 1. Violated Assumptions

### Trust Boundary Violations
- **Assumption**: External input is validated before use
- **Reality**: Input validation is missing, incomplete, or bypassable
- **Example**: SQL injection when assuming user input is safe

### Implicit Contracts
- **Assumption**: Caller provides valid data within expected ranges
- **Reality**: No enforcement of preconditions
- **Example**: Buffer overflow when assuming string length < buffer size

### Environmental Assumptions
- **Assumption**: System resources are always available
- **Reality**: Resource exhaustion or race conditions occur
- **Example**: TOCTOU bugs when assuming file state persists

## 2. Missing Checks

### Boundary Checks
- Missing array bounds validation
- No string length verification
- Unchecked pointer arithmetic
- Integer overflow/underflow without detection

### Null/Validity Checks
- Dereferencing pointers without null checks
- Using uninitialized variables
- Accessing freed memory
- Missing error code validation

### Authorization Checks
- Missing access control verification
- Inadequate privilege separation
- Confused deputy problems

## 3. Incorrect Invariants

### Loop Invariants
- **Broken**: Buffer index stays within bounds
- **Reality**: Off-by-one errors or incorrect termination
- **Example**: `for(i=0; i<=n; i++)` when array has n elements

### Data Structure Invariants
- **Broken**: Linked list is acyclic
- **Reality**: Circular references created
- **Example**: Use-after-free in doubly-linked list removal

### State Machine Invariants
- **Broken**: Authentication required before privileged operations
- **Reality**: State transitions allow bypassing authentication
- **Example**: Session fixation vulnerabilities

## 4. Unsafe Interactions

### Component Composition
- Mismatched assumptions between components
- Incorrect API usage patterns
- Semantic gaps in interfaces

### Concurrency Issues
- Race conditions on shared state
- Missing synchronization primitives
- Atomicity violations

### Type Confusion
- Implicit type conversions causing data loss
- Mixing signed/unsigned integers
- Pointer type mismatches

## 5. Design Flaws

### Insufficient Isolation
- Lack of privilege separation
- Shared mutable state across trust boundaries
- Missing sandboxing or compartmentalization

### Cryptographic Misuse
- Weak or broken algorithms
- Improper key management
- Incorrect protocol implementation

### Logic Errors
- Flawed authentication/authorization logic
- Incorrect business rule implementation
- Time-of-check to time-of-use gaps

## 6. Implementation Defects

### Memory Management
- Manual memory management errors
- Dangling pointers
- Double-free vulnerabilities
- Memory leaks enabling DoS

### Error Handling
- Ignoring error returns
- Incorrect exception handling
- Information leakage in error messages

### Input Processing
- Insufficient input sanitization
- Incorrect parsing logic
- Format string vulnerabilities

## Root Cause Analysis Framework

### Questions to Ask

1. **What assumption was violated?**
   - What did the developer assume about inputs, state, or environment?
   - Where is this assumption documented or implicit?

2. **What check is missing?**
   - What validation should have occurred but didn't?
   - Where should the check be placed?

3. **What invariant was broken?**
   - What property should always hold?
   - When and how does it get violated?

4. **What interaction is unsafe?**
   - How do components interact incorrectly?
   - What semantic mismatch exists?

5. **What is the exploitation chain?**
   - How does the attacker trigger the root cause?
   - What capabilities does this provide?
   - What is the security impact?

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.