Security Audit Skill
SkillDatabases & dataAudit subprocess execution, path handling, SQL queries, panic conditions, and dependency risks in this Rust TUI project.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Security Audit Skill skill
What this skill tells your AI
The instructions your AI receives, as published by agentty-xyz/agentty in skills/security-audit/SKILL.md and read by ahel’s review.
Use this skill when asked to audit agentty for security vulnerabilities or assess its attack surface.
Agentty is a local TUI tool that spawns agent backends (Claude CLI, Codex, Gemini) as subprocesses, manages git worktrees, stores session data in SQLite, and streams agent output to the terminal. It has no web server, no authentication layer, and no network-facing API.
Workflow
-
Read Project Context
- Read the root
AGENTS.mdfor project conventions, architecture references, and boundary rules. - Identify the target directories or modules to audit (use the user's scope if provided, otherwise audit the full project).
- Read the root
-
Traverse Target Directories
- For each target directory, read the nearest available
AGENTS.mdto understand module purpose, entry points, and change boundaries before inspecting source files. - Follow the architecture docs and router modules to navigate into sub-modules when there is no deeper local guide.
- For each target directory, read the nearest available
-
Analyze Security Concerns
Focus on the threat categories that apply to a local CLI/TUI tool with subprocess management:
- Command Injection: Verify all subprocess spawning (
Command::new,tokio::process::Command) uses argument vectors (.arg()/.args()), never string interpolation or shell invocation. Check that user-supplied data (prompts, branch names, file paths) never flows into shell-interpreted strings. - Path Traversal: Review file path construction from user input or database
values. Ensure paths use safe APIs (
PathBuf::join,Path::strip_prefix) and reject..traversal or symlink escapes. CheckAGENTTY_ROOToverride handling. - SQL Safety: Confirm all
sqlxqueries use parameterized bindings (query!,query_as!,$1/$2placeholders). Flag any string-formatted SQL. - Panic Conditions: Identify bare
.unwrap()/.expect()on data from untrusted sources (user input, file reads, subprocess output, database results, environment variables). These can crash the TUI and lose unsaved state. - Sensitive Data Exposure: Check for API keys, tokens, or credentials hardcoded in source or logged to session output files. Verify that agent stdout/stderr capture does not persist secrets to disk unintentionally.
- Subprocess Lifecycle: Look for missing timeouts on spawned processes, unhandled zombie processes, or missing signal forwarding that could cause resource leaks or hangs.
- Concurrency & Race Conditions: Check for TOCTOU races in worktree
creation/cleanup, unguarded shared state across
tokiotasks, and unsafeSend/Syncimplementations. - Dependency Risks: Flag known-vulnerable dependencies,
unsafeblocks, unsafe FFI calls, and overly broad feature flags (e.g.,tokio/full). - Git Worktree Safety: Verify that worktree branch names are sanitized,
--forcecleanup cannot delete unrelated worktrees, and concurrent session creation/deletion does not race.
- Command Injection: Verify all subprocess spawning (
-
Return Findings
- Format findings as a prioritized markdown task list in your answer.
- Each item must include:
- Title: Short description of the finding.
- Priority:
Critical,High,Medium, orLow. - Scope: File path or module where the issue was found.
- Description: What the vulnerability is, why it matters, and a recommended mitigation.
- Order findings by priority (Critical first, Low last).
- Omit empty priority sections.
Output Format
# Security Audit Report
## Critical
- [ ] **[Title]** — `path/to/file.rs`
[Description of the vulnerability and recommended mitigation.]
## High
- [ ] **[Title]** — `path/to/file.rs`
[Description and mitigation.]
## Medium
- [ ] **[Title]** — `path/to/file.rs`
[Description and mitigation.]
## Low
- [ ] **[Title]** — `path/to/file.rs`
[Description and mitigation.]
Signals
- GitHub stars
- 35
- Forks
- 3
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
security-audit-agentty-xyz- Source
- github.com/agentty-xyz/agentty