toolbox AGENTS.md

Project instructions for go-appsec/toolbox, a command-line and agent toolkit for testing application security. It explains how the project is built, organised, configured, and connected to testing tools.

In plain words
What is it for?
Use it when modifying go-appsec/toolbox, running its builds or tests, or working with its HTTP proxy, out-of-band testing, and web-crawling components.
Why use it?
It gives coding agents the repository context needed to make changes that fit the existing design and commands. It reduces guesswork about builds, tests, architecture, and configuration.

Instructions file for CodexOpenCode

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/go-appsec/toolbox/agents-md
Clone the repo
git clone --depth 1 https://github.com/go-appsec/toolbox

Made for: Codex, OpenCode.

Per session 6,727 This file is loaded in full into every session.
When invoked 6,727 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 $0.06727 $0.06727
Opus 5 $0.03363 $0.03363
Sonnet 5 $0.01345 $0.01345
Haiku 4.5 $0.00673 $0.00673

Measured 2d ago against content hash 6a90b40d15e2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

toolbox 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 2d 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 · 393 lines

How it starts

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

Project Overview

go-appsec/toolbox (sectool) is a CLI and MCP toolkit for human and LLM agent collaboration for application security testing.

Key characteristics:

  • MCP-primary architecture: single API serves both agents and CLI
  • CLI is a thin client over MCP for human interaction
  • Global config at ~/.sectool/config.json (auto-created)
  • All output in markdown format for LLM consumption
  • Pluggable backend architecture (native built-in proxy or Burp MCP for HTTP, Interactsh for OAST, Colly for crawling)

Build Commands

make build          # Build to bin/sectool
make build-cross    # Cross-compile (linux/darwin, amd64/arm64)
make test           # Quick tests (-short flag)
make test-all       # Full tests with -race and coverage
make lint           # Run golangci-lint and go vet

Architecture

CLI Command → MCP Client → MCP Server → Backends (Built-in Proxy or Burp MCP, OAST, Crawler)
MCP Agent  → MCP Server → Backends (Built-in Proxy or Burp MCP, OAST, Crawler)

Core Files

  • sectool/main.go - Entry point; routes mcp subcommand to server mode, else CLI command dispatch
  • sectool/config/config.go - Config loading/saving, defaults, auto-creation
  • sectool/config/socket_unix.go / socket_windows.go - DefaultSidecarSocket: per-OS sidecar IPC address (Unix domain socket, or loopback TCP on Windows)
  • sectool/mcpclient/client.go - MCP client wrapper for CLI usage
  • sectool/mcpclient/tools.go - Typed methods for each MCP tool
  • sectool/mcpclient/types.go - Client-specific option types (*Opts structs)
  • sectool/bundle/bundle.go - Client-side bundle file operations for export

Protocol

  • sectool/protocol/workflow.go - Workflow mode constants shared between service and mcpclient
  • sectool/protocol/types.go - Shared MCP response types (used by both service and mcpclient)

Service Layer

  • sectool/service/server.go - MCP server lifecycle and backend coordination
  • sectool/service/mcp_server.go - MCP server setup, tool registration, workflow handling
  • sectool/service/mcp_proxy.go - Proxy and flow_get tool handlers (poll, flow_get, cookie_jar, rules)
  • sectool/service/mcp_proxy_internal.go - Internal MCP proxy tool (_internal_history_delete)
  • sectool/service/mcp_replay.go - Replay tool handlers (send, request_send)
  • sectool/service/mcp_crawl.go - Crawl tool handlers (create, seed, status, poll, sessions, stop)
  • sectool/service/mcp_oast.go - OAST tool handlers (create, poll, get, list, delete)
  • sectool/service/mcp_encode.go - Encode/decode tool handlers (url, base64, html)
  • sectool/service/mcp_uuid.go - UUID generation tool handler (v4, v7)
  • sectool/service/mcp_hash.go - Hash tool handler (md5, sha1, sha256, sha512, HMAC)
  • sectool/service/mcp_jwt.go - JWT decode tool handler
  • sectool/service/mcp_diff.go - Diff tool handler (structured flow comparison)
  • sectool/service/mcp_reflection.go - Reflection tool handler (parameter reflection detection)
  • sectool/service/mcp_jssurface.go - JS analyze tool handler (extract API surface from JS/HTML responses)
  • sectool/service/mcp_jsendpoint.go - JS endpoint detail tool handler (per-call-site request shape by deterministic id)
  • sectool/service/js/ - JS bundle parser and extractors (tdewolff/parse/v2/js)
  • sectool/service/js/analyze.go - main JS bundle analyzer
  • sectool/service/js/dedupe.go - deduplication logic
  • sectool/service/js/detail.go - per-call-site request-shape extraction (body/headers/query/path params) and deterministic EndpointID
  • sectool/service/js/extract.go - extraction logic
  • sectool/service/js/html.go - HTML-specific handling
  • sectool/service/js/parse.go - parsing logic
  • sectool/service/js/scope.go - scoping logic
  • sectool/service/js/secrets.go - secrets detection
  • sectool/service/mcp_notes.go - Notes tool handlers (save, list) and flow listing attachment
  • sectool/service/mcp_respond.go - Proxy responder tool handlers (respond_add, respond_delete, respond_list); native backend only
  • sectool/service/flags.go - MCP server flag parsing (--port, --proxy-port, --burp, --workflow, --config, --notes, --sidecar-socket)
  • sectool/service/backend.go - HttpBackend, ResponderBackend, OastBackend, CrawlerBackend interfaces
  • sectool/service/backend_http_native.go - Native built-in proxy implementation of HttpBackend
  • sectool/service/backend_http_native_respond.go - Native backend implementation of ResponderBackend
  • sectool/service/backend_http_burp.go - Burp MCP implementation of HttpBackend; hosts burpFlowIndex (flow_id ↔ Burp offset mapping)
  • sectool/service/backend_oast_interactsh.go - Interactsh implementation of OastBackend
  • sectool/service/smtputil.go - SMTP email header parsing utilities
  • sectool/service/backend_crawler_colly.go - Colly-based crawler implementation
  • sectool/service/capture_filter.go - BuildCaptureFilter: compiles proxy exclusion patterns from config
  • sectool/service/mcp_coreinvoke.go - CoreInvoke dispatch for sidecars: invoke a core MCP tool by name (reuses the handlers agents call; internal tools excluded)
  • sectool/service/mcp_replay_originate.go - Native HTTP origination for sidecar sends (originateNative); mirrors request_send, produces an attributable flow
  • sectool/service/mcp_sidecar_tools.go - Recomposes the advertised MCP tool list as sidecars connect/disconnect; adds sidecar-conditional params to core tools
  • sectool/service/sidecar_replay_sink.go - replayRoutingSink: diverts sidecar-performed replays (annotated replay=true) into the replay history store, else proxy history
  • sectool/service/search.go - RE2 pattern compilation with LLM-friendly double-escape correction; flow content matching
  • sectool/service/httputil.go - HTTP request/response parsing utilities
  • sectool/service/jsonutil.go - JSON read/analysis helpers (flatten, parse list)
  • sectool/service/types.go - Service-specific request and internal types
  • sectool/service/dedupe/dedupe.go - Order-preserving slice deduplication helpers
  • sectool/service/fileutil/fileutil.go - Filesystem helpers (AtomicWriteFile)

Read the full file on GitHub · 393 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. 2d ago First seen · 393 lines · 6,727 tokens per session scan A 6a90b40d15e2

Subscribe to this mod's changes

toolbox AGENTS.md is an instructions file published in the GitHub repository go-appsec/toolbox (42 stars, last pushed 10d ago), licensed MIT. It adds 6,727 tokens to every session, about $0.0336 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-30.