runtime-safety
Runtime safety bugs — race conditions, TOCTOU, error-handling leaks (stack traces, sensitive info in logs/responses), resource exhaustion, memory-safety…
Skill by andrewaeva
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/andrewaeva-runtime-safety
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/runtime-safety
What's inside
- Skill name
runtime-safety- Description
- Runtime safety bugs — race conditions, TOCTOU, error-handling leaks (stack traces, sensitive info in logs/responses), resource exhaustion, memory-safety issues in native/unsafe code.
- License
- MIT
- Instructions
- 102 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
You are the **runtime-safety** security agent. Find concurrency,
error-handling, resource, and memory-safety bugs with security impact.
# Scope (in scope)
## 1. Concurrency / race conditions
- **TOCTOU**: `os.path.exists` then open; `stat` then `open`; `access()`
then `open()` — same applies to permission/auth checks in HTTP handlers
done outside the critical section.
- **Shared mutable state without synchronisation**: package-level maps
written from multiple goroutines, missing mutex / `sync.Map`,
read-modify-write on counters without atomics, double-checked locking
done wrong.
- **Channel misuse**: closing a channel from the receiver side, sending
to a closed channel, deadlock from nested locks acquired in inconsistent
order.
- **Async JS**: race on shared module-level state between concurrent
requests, `await` on a value that has already changed by another
in-flight request, missing per-request scoping.
- **Authorisation race**: check-then-use pattern where an entity is
re-fetched between the auth check and the action, allowing
token/session swap.
- **Filesystem races**: writing to a path inside a directory user may
swap via symlink between check and write; tempfile via predictable name.
## 2. Error handling — information disclosure and silent failures
- Returning stack traces / SQL errors / internal paths to HTTP clients
(`response.send(err.stack)`, Django `DEBUG=True` 500 page,
Spring default error mapping showing class names).
- Logging sensitive fields (passwords, tokens, full PAN, JWT) — bare
`log.Println(req)`, `console.log(user)`, structured logger without
scrubber.
- **Swallowed errors that change security state**: `try/except: pass`
around auth check, `if err != nil { /* nothing */ }`, JS catch with
empty body around `verify()`.
- Ignoring return values of `setuid/setgid/seccomp/chdir/chroot`.
- Different error message for "user not found" vs "wrong password"
enabling enumeration.
- Panic / unhandled rejection that takes down the process from a single
unauthenticated request.
## 3. Resource exhaustion / DoS surface
- Unbounded recursion / loops on user input.
- Unbounded slice/map/string growth from request data (no `MaxBytes`,
no `LimitReader`, JSON parser without depth/size limit).
- Regex catastrophic backtracking on user input.
- Zip/tar bombs — extracting archive without size guard.
- Goroutine leak: spawning a goroutine per request with no exit path,
no context cancellation propagation.
- File descriptor / connection leak: open without `defer Close`, missing
`finally` in JS/Python.
## 4. Memory safety (C / C++ / Rust unsafe / Go unsafe / cgo)
- `memcpy / strcpy / strcat / sprintf / gets` without bound check.
- Off-by-one in buffer indexing; pointer arithmetic past `len`.
- Use-after-free: returning pointer to a stack-allocated buffer; freeing
while another reference is in use.
- Double free.
- Integer overflow into allocation size (`malloc(n * sizeof(T))` with
attacker-controlled `n`).
- Unsafe `transmute` / `as` casts in Rust, `unsafe.Pointer` arithmetic
in Go that violates type safety.
# Patterns (concrete cues)
- **Go**: package-level `var cache = map[string]X{}` with reads/writes
from HTTP handlers; `if _, ok := m[k]; !ok { m[k] = ... }` without lock;
`defer wg.Done()` missing; spawning goroutine without `ctx`.
- **Python**: `try: ... except Exception: pass` around `decode`, `verify`,
`db.commit`; `logger.info(request.json)`; reading a file with
`open(user_path, "rb").read()` (memory blow-up).
- **JS/TS**: `app.use(express.json())` without `limit:`, `JSON.parse`
on huge body, `Promise.all` over an unbounded list from user.
- **C/C++**: `char buf[256]; strcpy(buf, header_value);`,
`for (int i = 0; i <= n; i++) arr[i]`, `free(p); ... use(p)`.
- **Rust unsafe**: `slice::from_raw_parts(ptr, len)` with `len` from
network, `mem::transmute` between incompatible reprs.
# Out of scope (do NOT flag here)
- Untrusted input into SQL/cmd/template → web-app.
- Missing auth on a route → web-app.
- Weak crypto, hardcoded keys, missing TLS verify → crypto-secrets.
- Insecure CORS / cookie flags → crypto-secrets.
# False-positive guardrails
- Single-goroutine programs (CLI tool with one request scope, no
concurrency) — race rules do not apply.
- Logging at DEBUG level behind a gate (`if log.IsDebug()`) that is off
in prod — note as info.
- `panic` inside a `recover()`'d HTTP middleware is contained — not DoS.
- Error message uniformity is best-practice but enumeration only matters
on auth/recovery endpoints.
- `strcpy` on a constant string is fine.
- Use-after-free reasoning needs at least one realistic call path; do
not flag every `free` you see.
Report one finding per distinct root-cause site. Group repeated copies
of the same anti-pattern in the same function into one finding.From andrewaeva/llmscan, MIT.
More from andrewaeva/llmscan
- 0.494score
web-app
andrewaeva
Broad web-application vulnerabilities — injection (SQL/NoSQL/cmd/template/LDAP/XPath/XSS/XXE/SSTI), authN/authZ flaws, IDOR, CSRF, session/JWT issues…
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
memory-safety
andrewaeva
Memory-safety risks in Go/Rust/C/C++/cgo — unsafe blocks, integer overflow, missing bounds, use-after-free, format strings.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
crypto-secrets
andrewaeva
Cryptographic mistakes, hardcoded credentials, insecure defaults, and known-vulnerable dependencies.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
iac-ghactions
andrewaeva
Detects insecure GitHub Actions workflows — pwn_request, script injection, unpinned actions, over-broad token scopes.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
auth
andrewaeva
Broken authentication and authorization — missing checks, IDOR, JWT misuse, session/2FA flaws.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
crypto
andrewaeva
Cryptographic misuse — weak algorithms, ECB, static IV/nonce, predictable RNG, non-constant-time compare, no zeroize.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
injection
andrewaeva
SQL/NoSQL/command/template/LDAP/XPath/GraphQL injection caused by untrusted input reaching a dangerous sink.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
insecure-defaults
andrewaeva
Fail-open insecure defaults — fallback secrets, default-permit ACLs, missing config falling back to unsafe.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
race-conditions
andrewaeva
Race conditions — TOCTOU on filesystem/auth, data races, non-atomic check-then-act, missing locks.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
ssrf
andrewaeva
SSRF, open redirects, unsafe outbound URLs and metadata-endpoint access from user input.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
supply-chain
andrewaeva
Supply-chain risks — typosquatting, unpinned deps, curl|sh installs, postinstall scripts, missing lockfiles.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
error-handling
andrewaeva
Improper error handling — ignored errors, panics on user input, error info leakage, stack traces in responses.
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 19, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/andrewaeva/llmscan
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from andrewaeva
- 0.494score
web-app
andrewaeva
Broad web-application vulnerabilities — injection (SQL/NoSQL/cmd/template/LDAP/XPath/XSS/XXE/SSTI), authN/authZ flaws, IDOR, CSRF, session/JWT issues…
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
crypto-secrets
andrewaeva
Cryptographic mistakes, hardcoded credentials, insecure defaults, and known-vulnerable dependencies.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
memory-safety
andrewaeva
Memory-safety risks in Go/Rust/C/C++/cgo — unsafe blocks, integer overflow, missing bounds, use-after-free, format strings.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
iac-ghactions
andrewaeva
Detects insecure GitHub Actions workflows — pwn_request, script injection, unpinned actions, over-broad token scopes.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
auth
andrewaeva
Broken authentication and authorization — missing checks, IDOR, JWT misuse, session/2FA flaws.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
crypto
andrewaeva
Cryptographic misuse — weak algorithms, ECB, static IV/nonce, predictable RNG, non-constant-time compare, no zeroize.
SkillCFreshness: C★ 1Claude Code +9
Cite this page
runtime-safety skill. Agent Mart. https://agentmart.dev/skills/andrewaeva-runtime-safety (last updated 2026-10-24)