Repository navigation
feat(agent-audit): cover Claude command/agent/skill/plugin + settings exec surfaces - #94
Closed
sandstream wants to merge 1 commit into
Closed
sandstream wants to merge 1 commit into
sandstream wants to merge 1 commit into
Conversation
… exec surfaces kit audited agent configs (.claude.json/.mcp.json/settings.json) and git hook *files*, but several Claude Code surfaces went unscanned: - settings.json declares two code-execution surfaces inline — `statusLine.command` (runs every render) and `hooks[].command` (runs per lifecycle event). kit scanned git-hook files for malware but not these strings. New `auditSettingsCommands()` runs the same malware patterns over them (fail/high). kit's own `<node> cli.js … memory hook` entries are inert, so no false positive. - `.claude/commands` (slash commands can embed `!`bash``), `.claude/agents` (subagents grant tools + carry a system prompt), `.claude/skills`, and `.claude/plugins` were entirely unscanned. New `scanAgentDirs()` walks them (depth/size-bounded) and flags plaintext secrets (critical), inline-code/malware MCP servers in JSON bundles (high), and malware-shaped command bodies (warn — heuristic, may be documentation). Pure analyzers stay string-in/findings-out; runAgentAudit refactored to keep complexity down. Tests: settings statusLine/hooks malware + kit's-own-hook negative; subagent secret; slash-command malware; plugin inline-MCP; clean tree. Full suite 1457/0.⚠️ Stacked on #87 (→ #75). Closes the Claude-surface-coverage gaps from the audit. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
sandstream
added a commit
that referenced
this pull request
Jun 24, 2026
sandstream
added a commit
that referenced
this pull request
Jun 24, 2026
….0 (#97) * recover(#94): feat(agent-audit): cover Claude command/agent/skill/plugin + settings exec surfaces * recover(#90): feat(audit): SIEM export (CEF / syslog / json) * chore(release): 1.24.0 — consolidated security batch + recovered #90/#94 Documents the merged hardening batch (#70-89) and bumps the version. The two recovered features (#90 SIEM export, #94 Claude agent-audit surfaces) were auto-closed when their stacked base branches were deleted on merge; recovered here via the PRs' own deltas onto current main. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * style: prettier-format recovered #90/#94 files --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Closed
6 tasks
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.
Completes the Claude Code surface-coverage gaps found in the audit. kit audited agent configs (
.claude.json/.mcp.json/settings.json) and git-hook files, but several Claude surfaces went unscanned.New coverage
Settings-declared exec surfaces (
auditSettingsCommands, pure):statusLine.command— a shell command run on every status-line render.hooks.<event>[].hooks[].command— run on each matched lifecycle event.kit scanned git-hook files for malware but not these inline command strings — the same execution surface. Same malware patterns are now applied (fail/high). kit's own
<node> cli.js … memory hookentries are inert (no malware shape) → no false positive.Command / agent / skill / plugin dirs (
scanAgentDirs, depth- and size-bounded walk):.claude/commands— slash commands can embed!`bash`.claude/agents— subagents grant tools + carry a system prompt.claude/skills—SKILL.md+ scripts.claude/plugins— installed plugin bundles (hooks/commands/MCP/agents)Each file is flagged for: plaintext secrets (critical), inline-code/malware MCP servers in JSON bundles (high), and malware-shaped command bodies (warn — heuristic, may be documentation rather than live code).
Notes
runAgentAuditrefactored (extractedscanAgentDirs) to keep complexity in check.statusLine/hooksmalware + kit's-own-hook negative; subagent secret; slash-command malware; plugin inline-MCP; clean-tree pass. Full suite 1457/0.🤖 Generated with Claude Code
https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
Generated by Claude Code