toolbastion AGENTS.md

toolbastion AGENTS.md is an instructions file for Codex, OpenCode from MaharMuavia/toolbastion. It costs 373 tokens per session, scanned A, original, Apache-2.0.

Contributor instructions for ToolBastion, a security-focused proxy for connecting a coding agent to one local tool server at a time.

In plain words
What is it for?
They guide work on ToolBastion's command-line tool, proxy, policy checks, detectors, audits, remediation, examples, tests, and documentation.
Why use it?
They set rules for validating untrusted input, isolating security stages, protecting the communication protocol, and testing behavior changes.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

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 instructions/maharmuavia/toolbastion/agents-md
Clone the repo
git clone --depth 1 https://github.com/MaharMuavia/toolbastion

Made for: Codex, OpenCode.

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 toolbastion AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/maharmuavia/toolbastion/agents-md.svg)](https://agentmods.dev/instructions/maharmuavia/toolbastion/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/maharmuavia/toolbastion/agents-md"><img src="https://agentmods.dev/badge/instructions/maharmuavia/toolbastion/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 373 This file is loaded in full into every session.
When invoked 373 The same file — it is already loaded in full.
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.00373 $0.00373
Opus 5 $0.00187 $0.00187
Sonnet 5 $0.00075 $0.00075
Haiku 4.5 $0.00037 $0.00037

Measured 5d ago against content hash 7ba4e60ca541, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

toolbastion AGENTS.md 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 5d 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.

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.

AGENTS.md · 42 lines

What it actually says

ToolBastion contributor guide

Architecture

  • apps/cli: the toolbastion command and stdio entrypoint.
  • packages/core: MCP proxy lifecycle, target transport, events, and errors.
  • packages/shared: validated boundary types and canonical hashing.
  • examples/benign-server: minimal target used for interoperability tests.
  • examples/vulnerable-server: controlled attack target; effects stay in fixtures.
  • packages/policy, packages/detectors, packages/judge, packages/audit, and packages/remediation: isolated security stages added in phase order.

The proxy supports one local stdio target per process. Enforcement must not depend on the API or dashboard.

Conventions

  • TypeScript strict mode, ES modules, two-space indentation, and named exports.
  • Validate all external or cross-package input with Zod.
  • Write human diagnostics to stderr; stdout is reserved for MCP JSON-RPC.
  • Spawn subprocesses with argument arrays and shell: false.
  • Keep behavior changes covered by tests. Update docs when CLI flags, commands, or configuration change.

Security rules

  • Treat MCP metadata, arguments, results, YAML, model output, and subprocess output as untrusted.
  • Deterministic hard denies cannot be overridden by a model.
  • Never log raw secrets; redact before persistence.
  • Fail closed in enforce mode when policy, audit, trust, or required judgment is unavailable.
  • Never auto-apply remediation output.
  • Never place credentials in source, fixtures, reports, screenshots, .env, audit JSONL, or configuration examples.

Required validation

Before completing a behavior change, run the relevant focused test plus:

npm.cmd run lint
npm.cmd run typecheck
npm.cmd test
npm.cmd run build
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. 5d ago First seen · 42 lines · 373 tokens per session scan A 7ba4e60ca541

Subscribe to this mod's changes

toolbastion AGENTS.md is an instructions file published in the GitHub repository MaharMuavia/toolbastion (0 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 373 tokens to every session, about $0.0019 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-08-31.