Skip to content

feat(agent-audit): cover OpenCode + Codex agents - #87

Merged
sandstream merged 1 commit into
feat/agent-audit-stdio-mcpfrom
feat/agent-coverage-opencode-codex
Jun 24, 2026
Merged

sandstream merged 1 commit into
feat/agent-audit-stdio-mcpfrom
feat/agent-coverage-opencode-codex

Conversation

@sandstream

Copy link
Copy Markdown
Owner

Broadens kit's agent coverage beyond Claude/Cursor/VSCode (the opencode/codex/t3code question):

  • agent-audit: scans opencode.json/opencode.jsonc + .codex/config.* for plaintext secrets (format-agnostic via findSecrets), and recognizes OpenCode's mcp server container in the cleartext-http and inline-code stdio checks.
  • scan-transcripts: walks .codex/ (+ ~/.codex/projects/<slug>) for replayed-secret leaks, alongside the existing .claude/.opencode/.cursor/.aider.

Covers agents driven through the t3code GUI harness too, since it runs the underlying Codex/Claude/Cursor/OpenCode whose dirs these are. Follow-up: OpenCode's array-form command isn't stdio-audited yet (missed detection, not a false positive).

⚠️ Stacked on #75 (base = feat/agent-audit-stdio-mcp).


Generated by Claude Code

Broadens kit's agent coverage beyond Claude/Cursor/VSCode:

- agent-audit: scan `opencode.json`/`opencode.jsonc` and `.codex/config.*` for
  plaintext secrets (format-agnostic via findSecrets), and recognize OpenCode's
  `mcp` server container in the cleartext-http and inline-code stdio checks
  (alongside `mcpServers`/`servers`).
- scan-transcripts: walk `.codex/` (project) + `~/.codex/projects/<slug>` for
  replayed-secret leaks, alongside the existing `.claude`/`.opencode`/`.cursor`/
  `.aider` dirs.

This also covers agents driven through the t3code GUI harness, since t3code runs
the underlying Codex/Claude/Cursor/OpenCode whose dirs these are. (Follow-up:
OpenCode's array-form `command` is not yet stdio-audited — missed detection, not
a false positive.)

Stacked on the stdio-MCP-audit branch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
@sandstream
sandstream merged commit 1fd4e21 into feat/agent-audit-stdio-mcp Jun 24, 2026
2 checks passed
@sandstream
sandstream deleted the feat/agent-coverage-opencode-codex branch June 24, 2026 04:13
sandstream added a commit that referenced this pull request Jun 24, 2026
…code (#75)

* feat(agent-audit): flag stdio MCP servers that run inline/obfuscated code

`auditMcpServers` only inspected `url`-based MCP servers (flagging http://).
But a *stdio* MCP server runs a local `command` (+args) on every agent startup
— an unwatched code-execution surface. A malicious `.mcp.json` / `.claude.json`
can ship `{"command":"node","args":["-e","…"]}` or `sh -c "curl … | sh"` and it
executes silently whenever the agent launches.

Add `auditMcpStdio`: flags only the unambiguous abuse shapes — a malware-pattern
command line (reusing the hook patterns: pipe-to-shell, /dev/tcp, base64|sh,
eval-substitution) or an interpreter running INLINE code (`node -e`, `python -c`,
`sh -c`, …). It deliberately does NOT flag the common, legitimate `npx <pkg>`
stdio server: blanket-warning every config is the noise that gets security
tooling ignored. Wired into `runAgentAudit` across all known config files.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg

* feat(agent-audit): cover OpenCode + Codex agents (#87)

Broadens kit's agent coverage beyond Claude/Cursor/VSCode:

- agent-audit: scan `opencode.json`/`opencode.jsonc` and `.codex/config.*` for
  plaintext secrets (format-agnostic via findSecrets), and recognize OpenCode's
  `mcp` server container in the cleartext-http and inline-code stdio checks
  (alongside `mcpServers`/`servers`).
- scan-transcripts: walk `.codex/` (project) + `~/.codex/projects/<slug>` for
  replayed-secret leaks, alongside the existing `.claude`/`.opencode`/`.cursor`/
  `.aider` dirs.

This also covers agents driven through the t3code GUI harness, since t3code runs
the underlying Codex/Claude/Cursor/OpenCode whose dirs these are. (Follow-up:
OpenCode's array-form `command` is not yet stdio-audited — missed detection, not
a false positive.)

Stacked on the stdio-MCP-audit branch.


Claude-Session: https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg

Co-authored-by: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants