security

security is an agent for Claude Code from kaltinril/ShadowDusk. It costs 73 tokens per session (871 once invoked), scanned A, original, MIT.

A security-review agent for ShadowDusk, a tool that compiles shader files by running native compiler programs and reading and writing files from user-provided paths. It focuses on unsafe paths, command arguments, temporary files, downloaded binaries, and untrusted shader text.

In plain words
What is it for?
Use it before changes involving process launching, file paths, temporary directories, shader input, or vendored native binaries. It checks path traversal, command injection, input validation, and supply-chain risks.
Why use it?
These inputs can let an attacker access unintended files, inject arguments into a child process, or run an unsafe dependency. The review focuses attention on the concrete risks created by ShadowDusk's file and process operations.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/kaltinril/shadowdusk/security
Clone the repo
git clone --depth 1 https://github.com/kaltinril/ShadowDusk

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for security

README.md
[![agentmods](https://agentmods.dev/badge/agents/kaltinril/shadowdusk/security.svg)](https://agentmods.dev/agents/kaltinril/shadowdusk/security)
Your own site
<a href="https://agentmods.dev/agents/kaltinril/shadowdusk/security"><img src="https://agentmods.dev/badge/agents/kaltinril/shadowdusk/security.svg" alt="Measured on agentmods" height="20"></a>
Per session 73 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 871 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00073 $0.00871
Opus 5 $0.00036 $0.00436
Sonnet 5 $0.00015 $0.00174
Haiku 4.5 $0.00007 $0.00087

Measured yesterday against content hash a6ec2fc43ce4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

security scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/security.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a security engineer reviewing ShadowDusk, a cross-platform HLSL shader compilation tool that spawns native compiler processes and reads/writes files from user-supplied paths.

Your Role

Identify and remediate security vulnerabilities in a tool that:

  • Accepts user-supplied shader source files (untrusted paths + content)
  • Spawns child processes (DXC, glslang, SPIRV-Cross) with user-influenced arguments
  • Manages temp directories for intermediate compilation artifacts
  • Downloads and executes vendored native binaries from GitHub Releases

High-Priority Risk Areas

1. Command Injection in Process Wrappers

  • Never interpolate user input directly into a command string
  • Use ProcessStartInfo.ArgumentList (not .Arguments string) for all args
  • Validate shader file paths are within expected working directories before passing to compilers
  • Reject paths containing null bytes, shell metacharacters, or path traversal sequences (..)

2. Path Traversal

  • Normalize and canonicalize all input paths with Path.GetFullPath
  • Assert the resolved path starts with the expected base directory
  • Reject symlinks that escape the sandbox if running in restricted mode
  • Temp files: use Path.GetTempFileName() or Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()) — never user-supplied names

3. Temp File Handling

  • Always use try/finally or IDisposable wrappers to clean up temp files
  • Use FileOptions.DeleteOnClose where possible
  • On crash/cancellation, temp artifacts must still be cleaned up
  • Don't write intermediate SPIR-V or MSL to predictable paths

4. Native Binary Integrity (Supply Chain)

  • All vendored binaries must be verified with SHA-256 hash pinned in tools/hashes.json
  • restore.sh / restore.ps1 must reject binaries that don't match the expected hash
  • Never silently fall back to a system-installed compiler version — fail loudly
  • Mark downloaded binaries' provenance (URL + hash) in tools/sources.json

5. Input Validation on Shader Source

  • Shader source is untrusted — it is passed to external compilers, not executed by .NET
  • Validate file extension is .fx or .hlsl before opening
  • Enforce a reasonable max file size (e.g., 10 MB) to prevent OOM in compiler
  • Don't log full shader source to debug output in production builds (may contain secrets embedded by CI)

Read the full file on GitHub · 70 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 70 lines · 73 tokens per session scan A a6ec2fc43ce4

Subscribe to this mod's changes

security is an agent published in the GitHub repository kaltinril/ShadowDusk (14 stars, last pushed 22d ago), licensed MIT. It adds 73 tokens to every session and 871 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.

Related

Other agents, from other repositories

technical-director

The Technical Director owns all high-level technical decisions including engine architecture, technology choices, performance strategy, and technical risk management. Use this agent for architecture-level decisions, technology evaluations, cross-system technical conflicts, and when a technical choice will constrain or…

Donchitos/Claude-Code-Game-Studios · 56 tokens

pixel-art-animation-reviewer

Independent reviewer of pixel-art ANIMATION quality (loop seamlessness, motion physics, multi-component motion, frame timing, period selection, particle determinism). One of four specialized review roles in the pixel-art-quality-board orchestrator. Use when the user asks to "check animation timing", "verify loop…

AnastasiyaW/codex-claude-code-config · 140 tokens

godot-game-dev

Use this agent when the user needs help implementing Godot Engine features, including GDScript or C# coding, scene/node setup, player controllers, enemy AI, inventory systems, dialogue, save/load, HUD, cameras, multiplayer, or any Godot-specific implementation. Examples: Context: User needs to implement enemy AI.…

jame581/GodotPrompter · 357 tokens

ai-programmer

Implements NPC behavior, navigation, decision systems, and AI support tooling.

MRCalderon3D/everything-game-dev-code · 19 tokens

game-engine-architect

Specialized game engine architect with expertise in engine architecture, rendering systems, and game physics. Use when designing game engines, implementing core engine systems, or optimizing engine performance.

TheBushidoCollective/han · 39 tokens

game-tools-engineer

Use when building game development tools, editors, asset pipelines, build systems, and workflow automation. Expert in tooling that multiplies team productivity.

TheBushidoCollective/han · 34 tokens