T09 · Insecure Skill Coding Practices
- Location
SKILL.md:45- Finding
Full Process Command-Line Collection May Expose Sensitive Arguments
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 45-52; related logging instructions at lines 88-91
Vulnerability Type: Sensitive information exposure through insecure process inspection
Risk Level: MediumVulnerable Code Snippet:
markdown ## Step 1: Establish Current Baseline - Capture current utilization: - `uptime` - `ps -eo pcpu,cmd | head` - `nvidia-smi --query-gpu=utilization.gpu,memory.used --format=csv` Note which hosts/GPUs are already busy. - Record any CI/cluster budgets (time quotas, GPU hours) before launching work. - Set a per-task CPU minute / GPU minute budget that respects those limits.The collected information is subsequently subject to documentation requirements:
markdown Conclude by documenting the commands that were run and their resource cost (duration, CPU%, GPU%), confirming whether they remained within the per-task budget.Technical Analysis
The command
ps -eo pcpu,cmd | headrequests complete process command lines through thecmdfield. Process arguments can contain API tokens, passwords, database connection strings, confidential file paths, customer identifiers, or other sensitive job parameters.Complete command lines are not necessary to establish a CPU-utilization baseline. Moreover, the command does not specify CPU-based sorting, so
headreturns the first process-table entries rather than reliably selecting the processes with the highest CPU usage. This creates avoidable information exposure without consistently fulfilling the stated monitoring objective.The skill also directs the agent to document commands and resource observations. If sensitive process arguments enter the agent context, they may subsequently be copied into notes, logs, conversation output, or another reporting system.
Attack Path
- A process visible to the user running the skill is launched with sensitive data in its command-line arguments ...[truncated 1254 chars]
- Remediation
View remediation
Remediation Suggestions
- Avoid collecting full process arguments. Replace the command with a sanitized, CPU-sorted view:
sh ps -eo pid,comm,pcpu --sort=-pcpu | head - Use
commrather thancmdorargsso only executable names are collected. - Explicitly prohibit copying process arguments, credentials, tokens, connection strings, or other secrets into notes and reports.
- Apply redaction before retaining any monitoring output, including filtering common secret-bearing flags and environment-derived values.
- Limit baseline collection to sessions that will perform resource-intensive work rather than automatically collecting process information at every session.
- Document only aggregate utilization metrics and sanitized process identifiers required for resource planning.
- Avoid collecting full process arguments. Replace the command with a sanitized, CPU-sorted view:
