competition-race-condition-state-drift
하는 일
이 도구는 여러 행동이 동시에 일어날 때 생기는 문제를 재현하도록 돕습니다. 행동의 순서와 타이밍이 잘못된 데이터나 중복 작업 같은 예기치 않은 오류를 어떻게 일으키는지에 집중합니다.
사용하는 경우
- ✓행동의 순서가 오류를 일으킨다고 의심될 때.
- ✓두 가지가 같은 데이터를 동시에 바꾸려고 하면 무슨 일이 일어나는지 테스트하고 싶을 때.
- ✓일시적인 실패가 어떻게 다른 결과로 이어지는지 이해하는 경우.
스킬 링크
https://github.com/zhaoxuya520/reverse-skill/blob/main/CTF-Sandbox-Orchestrator/competition-race-condition-state-drift/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“두 사람이 같은 계좌에서 동시에 돈을 인출하려고 하면 무슨 일이 일어나는지 테스트하고 싶습니다.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
도구는 시스템에서 변경될 수 있는 부분(데이터베이스나 캐시의 데이터 등)을 찾습니다. 그다음 동시 행동을 시뮬레이션하며, 순서나 타이밍만 바꿔 기대와 다른 결과가 나오는지 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Competition Race Condition State Drift
Use this skill only as a downstream specialization after $ctf-sandbox-orchestrator is already active and has established sandbox assumptions, node ownership, and evidence priorities. If that has not happened yet, return to $ctf-sandbox-orchestrator first.
Use this skill when the decisive behavior depends on request timing, async ordering, lock gaps, or stale state.
Reply in Simplified Chinese unless the user explicitly requests English.
Quick Start
- Identify mutable state first: rows, cache keys, queue payloads, session fields, counters, or files.
- Reproduce with smallest concurrent sequence and fixed timing assumptions.
- Capture one baseline run and one racing run with only one variable changed.
- Track read, check, write, enqueue, and commit boundaries separately.
- Prove final state drift from a clean reset.
Workflow
1. Map Mutable Boundaries
- Record transaction scope, lock behavior, retry logic, idempotency keys, cache invalidation, and queue handoff.
- Note where read-check-write is split across requests, workers, or services.
- Keep each boundary tied to exact timestamps or sequence numbers.
2. Reproduce Timing Window
- Build deterministic concurrent inputs with controlled delay, duplicate requests, or reordered worker execution.
- Compare accepted and rejected paths under identical payloads.
- Record which condition flips when ordering changes.
3. Reduce To Decisive Race Chain
- Compress to: request A and B ordering -> stale check or lock gap -> conflicting writes -> resulting capability or artifact.
- State whether root cause is missing lock, weak idempotency, stale cache read, delayed async commit, or retry side effect.
- If the path becomes queue-dominant, hand off to queue worker drift skill.
Read This Reference
- Load
references/race-condition-state-drift.mdfor race harness ideas, evidence blocks, and parity checks.
What To Preserve
- Mutable keys, transaction boundaries, lock behavior, and idempotency markers
- Timestamped or sequenced traces for baseline and race runs
- One minimal replayable concurrent sequence proving drift
자주 묻는 질문
‘상태’란 무엇인가요?
은행 잔액이나 주문 상태처럼 특정 시점에 시스템이 가진 정보입니다.
‘레이스 컨디션’이란 무엇인가요?
여러 동시 행동이 실행되는 정확한 순서에 따라 작업의 결과가 달라지는 문제입니다.
‘순서’가 왜 중요한가요?
많은 행동이 동시에 일어나는 시스템에서는 처리 순서에 따라 최종 결과가 바뀔 수 있습니다. 순서를 통제하지 않으면 오류가 생길 수 있습니다.
상세 정보
작성자의 원본 설명
Internal downstream skill for ctf-sandbox-orchestrator. CTF-sandbox workflow for race windows, ordering bugs, idempotency failures, lock gaps, concurrent worker drift, and state inconsistencies that produce decisive effects. Use when the user asks to reproduce timing-sensitive bugs, concurrent state corruption, duplicate actions, stale reads, or privilege or balance drift caused by request orderin
인기도
- GitHub 스타
- 42k
- 순위
- #6445
- 라이선스
- MIT
- 업데이트
- 2026. 9. 22.
댓글
- …
이 저장소의 다른 스킬
competition-ad-certificate-abuse
42k에이전트가 디지털 인증서 시스템에 대한 공격을 분석하도록 돕습니다. 인증서가 접근 권한을 얻는 데 어떻게 악용될 수 있는지 조사합니다.
competition-agent-cloud
42k에이전트가 AI와 클라우드 시스템의 보안 과제를 분석하도록 돕습니다. 프롬프트, 도구, 클라우드가 어떻게 악용될 수 있는지 조사합니다.
competition-android-hooking
42k에이전트가 안드로이드 애플리케이션을 조사하도록 돕습니다. 앱이 내부적으로 어떻게 작동하는지, 어떻게 변경되거나 악용될 수 있는지 분석합니다.
competition-browser-persistence
42k에이전트가 웹사이트가 브라우저에 정보를 저장하는 방식을 분석하도록 돕습니다. 쿠키와 기타 데이터를 조사해 세션이 어떻게 작동하는지 이해합니다.
비슷한 스킬
api-connector-builder
280k에이전트가 기존 패턴을 따라 새로운 API 연결을 만들도록 합니다. 새로운 방식을 도입하지 않고 연동을 하나 더 추가할 때 씁니다.
api-design
280k에이전트가 모범 사례에 따라 REST API를 설계하도록 돕습니다. API가 통신하는 방식, 오류를 보여 주는 방식, 데이터를 정리하는 방식을 정하는 데 유용합니다.
backend-patterns
280k에이전트가 서버 쪽 아키텍처 패턴과 데이터베이스 최적화를 다루도록 돕습니다. 서버에서 실행되는 코드를 만들거나 검토할 때 유용합니다.