Back to skill

Security audit

Managing Docker containers via docker-socket-proxy

Security checks for vulnerabilities and agentic risk

Overview

This Docker operations skill is mostly coherent and scoped, but its included report script can print unsanitized container log excerpts that may expose secrets.

Install only for agents that are authorized to inspect Docker operational data and restart listed containers. Review the whitelist carefully, keep can_restart=false unless restart authority is intended, and fix or avoid scripts/container-report.sh until log excerpts are redacted and the documented 500-line limit is enforced.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/container-report.sh:77
Finding

Unsanitized Container Logs May Disclose Sensitive Information

Content
View full analysis
&1 || true) ERRORS=$(echo "${LOG_CACHE}" | grep -ci 'error\|exception\|fatal\|traceback' || true) WARNINGS=$(echo "${LOG_CACHE}" | grep -ci 'warn' || true) echo "Errors: ${ERRORS}" echo "Warnings: ${WARNINGS}" if [ "${ERRORS}" -gt 0 ]; then echo "" echo "--- LAST ERRORS ---" echo "${LOG_CACHE}" | grep -i 'error\|exception\|fatal\|traceback' | sort -u | tail -10 fi ``` ### Technical Analysis The script retrieves up to 5,000 container log lines and stores them in `LOG_CACHE`. When an error-related pattern is found, it prints matching lines directly without applying any sanitization. Container logs commonly include bearer tokens, API keys, passwords, credential-bearing connection strings, authorization headers, session identifiers, personal data, and environment-variable values. Error messages and stack traces are particularly likely to contain request parameters or configuration values. This implementation contradicts the redaction requirement in `SKILL.md`, which instructs the agent to mask sensitive patterns before displaying log fragments. It also exceeds the 500-line query limit documented in `README.md` and the log-viewing procedure in `SKILL.md`, increasing the volume of potentially sensitive data processed. The whitelist limits which containers can be queried, but it does not make their logs safe to disclose. Authorization to inspect a container's status does not necessarily imply authorization to receive every secret recorded in its logs. ### Attack Path 1. A whitelisted container writes a token, password, connection string, authorization header, or other sensitive value into an error message or traceback. 2. An authorized or malicious user reques ...[truncated 1112 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill explicitly supports fetching and displaying container logs, which commonly contain secrets, credentials, tokens, personal data, request payloads, and internal infrastructure details. Although the skill includes a requirement to sanitize some sensitive patterns, it does not clearly warn users that log access itself is sensitive and the masking rules are incomplete, so operators may expose confidential data through summaries or displayed fragments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The reference explicitly documents docker restart <name> and an automated verification loop without any caution, approval requirement, or discussion of service impact. In a skill context, this can normalize or enable disruptive operational actions against containers, causing downtime or masking ongoing incidents if used casually or by an over-permissioned agent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file includes natural-language policy-relevant content saying the skill's whitelist error messages were standardized to English. Forcing a specific language without user opt-in can violate language/locale policy, and no justification or opt-in is provided in this file.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The top comments present the file as a quick reporting utility, but the documented requirements omit that execution is gated by a whitelist loaded from an environment-specified YAML file. This is not just missing implementation detail in isolation; the documentation suggests a straightforward report script while the code embeds an authorization check that materially affects intent and behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

This shell script depends on the SYSCTL_WHITELIST_PATH environment variable and validates the referenced file, which constitutes access to environment-provided configuration. Although the script errors if the variable is missing, it does not clearly disclose to the user that it will read a path supplied via environment state beyond the terse requirement comment.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.