Repository navigation
feat(agent-audit): cover OpenCode + Codex agents - #87
Merged
sandstream merged 1 commit intoJun 24, 2026
Merged
Conversation
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
This was referenced Jun 23, 2026
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>
This was referenced Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Broadens kit's agent coverage beyond Claude/Cursor/VSCode (the opencode/codex/t3code question):
opencode.json/opencode.jsonc+.codex/config.*for plaintext secrets (format-agnostic via findSecrets), and recognizes OpenCode'smcpserver container in the cleartext-http and inline-code stdio checks..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
commandisn't stdio-audited yet (missed detection, not a false positive).feat/agent-audit-stdio-mcp).Generated by Claude Code