Skip to content
Back to skills

Detecting Race Conditions

ASecurity

Detects race condition vulnerabilities including TOCTOU, double-checked locking issues, and shared state problems. Use when analyzing concurrent operations, file access patterns, or investigating timing-related vulnerabilities.

  • 666 stars
  • 0 votes
  • 0 copies
  • 7 views
  • Added February 8, 2026
business

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill detecting-race-conditions --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Detecting Race Conditions?

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

Security grade badge for Detecting Race Conditions
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-detecting-race-conditions/badge)](https://www.skillsdirectory.com/skills/majiayu000-detecting-race-conditions)

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

Download with Pro
SKILL.md
---
name: detecting-race-conditions
description: Detects race condition vulnerabilities including TOCTOU, double-checked locking issues, and shared state problems. Use when analyzing concurrent operations, file access patterns, or investigating timing-related vulnerabilities.
---

# Race Condition Detection

## Detection Workflow

1. **Identify critical operations**: Find file access sequences (check then use), shared state access patterns, synchronization primitives
2. **Trace execution paths**: Use `xrefs_to` to identify potential interleaving points and race windows
3. **Check synchronization**: Verify locks protect critical sections, check for atomic operations, assess lock ordering
4. **Assess exploitability**: Can attacker control timing? Is there a useful race window? What's the impact?

## Key Patterns

- TOCTOU (Time-of-Check to Time-of-Use)
- Double-checked locking issues
- Unprotected shared variables
- Non-atomic operations on shared data
- Signal handler issues

## Output Format

Report with: id, type, subtype, severity, confidence, location, vulnerability, check operation, use operation, race window, exploitability, attack scenario, impact, mitigation.

## Severity Guidelines

- **CRITICAL**: Race allowing privilege escalation
- **HIGH**: Race allowing file access bypass
- **MEDIUM**: Race causing data corruption
- **LOW**: Race with minor impact

## See Also

- `patterns.md` - Detailed detection patterns and exploitation scenarios
- `examples.md` - Example analysis cases and code samples
- `references.md` - CWE references and mitigation strategies

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.