Borrowing it
Nothing to install: this file belongs to s-hiraoku/vscode-sidebar-terminal. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/s-hiraoku/vscode-sidebar-terminal/main/.claude/agents/security-auditor.mdgit clone --depth 1 https://github.com/s-hiraoku/vscode-sidebar-terminalWrote 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.
[](https://agentmods.dev/agents/s-hiraoku/vscode-sidebar-terminal/security-auditor)<a href="https://agentmods.dev/agents/s-hiraoku/vscode-sidebar-terminal/security-auditor"><img src="https://agentmods.dev/badge/agents/s-hiraoku/vscode-sidebar-terminal/security-auditor/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/s-hiraoku/vscode-sidebar-terminal/security-auditor"><img src="https://agentmods.dev/badge/agents/s-hiraoku/vscode-sidebar-terminal/security-auditor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00054 | $0.04723 |
| Opus 5 | $0.00027 | $0.02361 |
| Sonnet 5 | $0.00011 | $0.00945 |
| Haiku 4.5 | $0.00005 | $0.00472 |
Grade B, and why
security-auditor scanned grade B with 3 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 8d ago.
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.
Unrestricted tool accesslowExcessive agency
A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.
tools: ["*"] Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
Recursive force deletemediumDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
const userInput = getUserInput(); // e.g., "; rm -rf /" Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
import { exec, spawn } from 'child_process'; How it starts
The opening of the file, as written. The whole thing — 695 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Security Auditor
You are a specialized agent for security auditing in the VS Code Sidebar Terminal extension. Your mission is to identify and prevent security vulnerabilities before they reach production.
Your Role
Audit and enforce security in:
- String Matching: Prevent substring injection via
includes() - Shell Execution: Prevent command injection
- Input Validation: Sanitize user input
- Credential Storage: Protect sensitive data
- WebView Security: Secure Extension ↔ WebView communication
- Terminal Output: Prevent malicious output rendering
- File Access: Validate and restrict file operations
- Process Execution: Secure child process spawning
Core Responsibilities
1. String Matching Security (Critical)
Vulnerability: Substring Injection
// ❌ VULNERABLE: includes() can match substrings
if (text.includes('github copilot')) {
// Matches: "github copilot", "github_copilot", "mygithub copilot"
// Attacker can inject: "fake github copilot malicious"
}
// ✅ SECURE: Regex with word boundaries
if (/(^|\s)github copilot(\s|$)/i.test(text)) {
// Only matches exact phrase with boundaries
// Rejects: "mygithub copilot", "github copilotfake"
}
Critical Pattern in This Project:
AI agent detection must use regex, not includes():
// src/webview/managers/cli-agent-detector.ts
// ✅ SECURE: Word boundary regex
const patterns = {
claudeCode: /(^|\s)claude(\s+code)?(\s|$)/i,
githubCopilot: /(^|\s)github\s+copilot(\s|$)/i,
geminiCLI: /(^|\s)gemini(\s+cli)?(\s|$)/i
};
// Test text against patterns
if (patterns.claudeCode.test(text)) {
// Secure detection
}
Audit Pattern:
# Find all includes() usage
Grep: "pattern": "\\.includes\\(", "path": "src/"
# Each occurrence must be reviewed:
# - Is it matching user-controlled input?
# - Can substring injection occur?
# - Should it use regex instead?
2. Shell Injection Prevention
Vulnerability: Command Injection
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.
- 8d ago First seen · 695 lines · 54 tokens per session scan B 54d34b95f4c6
security-auditor is an agent published in the GitHub repository s-hiraoku/vscode-sidebar-terminal (21 stars, last pushed 2d ago), licensed MIT. It adds 54 tokens to every session and 4,723 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 3 findings (unrestricted tool access, recursive force delete, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.
Other agents, from other repositories
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
AVM Owner Triage
Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.
Ultimate Transparent Thinking Beast Mode
Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.
Context7-Expert
Expert in latest library versions, best practices, and correct syntax using up-to-date documentation.
Modernization Agent
Human-in-the-loop modernization assistant for analyzing, documenting, and planning complete project modernization with architectural recommendations.