T09 · Insecure Skill Coding Practices
- Location
agents/engagement-agent.js:65- Finding
Shell Command Injection Through Unvalidated Command Interpolation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is for X/Twitter automation, but it can perform public account actions automatically and contains unsafe command construction around those actions.
Install only if you are comfortable granting this skill X/Twitter posting authority. Review and fix the command construction and rate-limit state handling before enabling scheduled reply, amplify, or all modes; keep it in manual mode until those controls are clear.
agents/engagement-agent.js:65Shell Command Injection Through Unvalidated Command Interpolation
agents/engagement-agent.js:23Broken and Non-Persistent Daily Engagement Limit
The skill explicitly promotes automated posting and engagement on X without disclosing key risks such as account suspension, rate-limit violations, unintended public posting, or transmission of account/content data to external services. In a social-media automation context, omission of these warnings can mislead users into enabling behavior that affects their account reputation, compliance posture, and privacy.
This skill performs outward social-media actions (replying and liking) automatically once triggered, without any interactive approval, explicit disclosure, or safety gating at action time. In this context, that can cause unintended public posting, reputational damage, spam-like behavior, or policy violations if the agent engages with harmful, sensitive, or manipulated content.
The manifest description is broad enough to cover a wide range of social-media activity, which can cause the agent to invoke this skill in contexts the user did not explicitly intend. Because the skill also requests write access to X and advertises auto-posting/engagement behavior, overbroad invocation increases the chance of unintended posting or account actions.
The code reads process.env.X_API_KEY and forwards it into subprocess environment variables for xapi commands. This is a sensitive-credential access path, and the file does not include any user-facing warning, confirmation, or disclosure about using account credentials.
The inline documentation at L095 states 'Sort by score and engagement', which implies both factors influence ordering. The actual comparator at L097 uses only 'b.score - a.score', so engagement is not considered at all.
At L104 the comment says the code will 'Generate response based on content type', but 'generateResponse' simply returns a random template and does not inspect 'post' or 'config'. This is an intent-level mismatch between the documentation and behavior.
The natural-language description explicitly targets "X (Twitter)" engagement as the default platform. While not inherently unsafe, this can create a policy concern if the organization expects user choice of platform or locale/context rather than a fixed default, and the manifest does not state that this is an opt-in platform-specific skill.