SPLHunting query: tune before alertingAI coding agents on endpoints
Claude Code telemetry: Bash tool commands that read credential stores
Claude Code exports tool_decision and tool_result OpenTelemetry events. With OTEL_LOG_TOOL_DETAILS=1, tool_parameters for the Bash tool carries bash_command and full_command, so you can see agent-run commands that touch ~/.aws/credentials, SSH keys, .npmrc, .env and similar files (the files SANDWORM_MODE's injected prompt asked agents to collect). The decision and decision_source attributes show whether a person or a config rule approved the call.
- Log source
- Claude Code OpenTelemetry log events exported to Splunk (attribute names as documented; OTEL_LOG_TOOL_DETAILS=1)
- Techniques
- AML.T0055 Unsecured Credentials · AML.T0098 AI Agent Tool Credential Harvesting · ASI02 Tool Misuse and Exploitation · AML.T0086 Exfiltration via AI Agent Tool Invocation
- MITRE ATT&CK
- T1552.001Credentials In FilesT1552.004Private Keys
- Reviewed
- 2026-11-10
Query
index=otel event.name IN ("tool_decision", "tool_result") tool_name="Bash"
| spath input=tool_parameters path=full_command output=full_command
| spath input=tool_parameters path=bash_command output=bash_command
| eval cmd=coalesce(full_command, bash_command)
| where isnotnull(cmd)
| regex cmd="(\.aws/credentials|\.ssh/id_|\.npmrc|\.git-credentials|\.netrc|\.kube/config|\.docker/config\.json|gh\s+auth\s+token|(^|[\s/=])\.env(\s|$|\.))"
| stats count AS events values(cmd) AS commands values(decision) AS decisions
values(decision_source) AS decision_sources values(permission_mode) AS permission_modes
BY user.email session.id
| sort - events Expected false positives
- Users asking Claude Code to fix their own credential or registry configuration
- Test suites that load .env files
Sources
- Claude Code docs: Monitoring (OpenTelemetry events)
- Socket: SANDWORM_MODE npm worm poisons AI toolchains (Feb 2026)
- SpecterOps: An evening with Claude Code (CVE-2025-64755)
Reviewed against vendor documentation, not tested in your environment. Defensive use only.