T09 · Insecure Skill Coding Practices
- Location
scripts/x-utils.ts:256- Finding
Command Injection Through Shell-Enabled Subprocess Execution
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is not clearly malicious, but it can automate real posting through your logged-in X account and has unsafe implementation and disclosure gaps.
Install only if you are comfortable giving this skill control over a real logged-in X session and local browser automation. Use a dedicated Chrome profile, avoid --submit unless you explicitly want live posting, review every post before publishing, do not process untrusted Markdown or media paths, and avoid letting it automatically kill Chrome debugging processes.
scripts/x-utils.ts:256Command Injection Through Shell-Enabled Subprocess Execution
scripts/md-to-html.ts:106Server-Side Request Forgery Through Unrestricted Remote Image Downloads
scripts/x-article.ts:76Predictable Shared Temporary Paths Allow Symlink Overwrite and Cross-Run Tampering
scripts/package.json:5Unpinned Runtime Execution and Dependency Resolution
The skill is framed as social-media posting, but it includes undisclosed OS-level input simulation and app focusing behavior via clipboard/paste helpers. That expands the trust boundary from X posting into desktop automation, which can misdirect input to the wrong window or perform unintended actions on the user's machine.
The skill is framed as social-media posting, but it includes undisclosed OS-level input simulation and app focusing behavior via clipboard/paste helpers. That expands the trust boundary from X posting into desktop automation, which can misdirect input to the wrong window or perform unintended actions on the user's machine.
The skill is framed as social-media posting, but it includes undisclosed OS-level input simulation and app focusing behavior via clipboard/paste helpers. That expands the trust boundary from X posting into desktop automation, which can misdirect input to the wrong window or perform unintended actions on the user's machine.
The skill is framed as social-media posting, but it includes undisclosed OS-level input simulation and app focusing behavior via clipboard/paste helpers. That expands the trust boundary from X posting into desktop automation, which can misdirect input to the wrong window or perform unintended actions on the user's machine.
The skill is framed as social-media posting, but it includes undisclosed OS-level input simulation and app focusing behavior via clipboard/paste helpers. That expands the trust boundary from X posting into desktop automation, which can misdirect input to the wrong window or perform unintended actions on the user's machine.
The skill is framed as social-media posting, but it includes undisclosed OS-level input simulation and app focusing behavior via clipboard/paste helpers. That expands the trust boundary from X posting into desktop automation, which can misdirect input to the wrong window or perform unintended actions on the user's machine.
The skill is framed as social-media posting, but it includes undisclosed OS-level input simulation and app focusing behavior via clipboard/paste helpers. That expands the trust boundary from X posting into desktop automation, which can misdirect input to the wrong window or perform unintended actions on the user's machine.
Referenced artifact was not completely inspected
| `scripts/x-browser.ts` | Regular posts (text + images) |
Referenced artifact was not completely inspected
| `scripts/x-article.ts` | Long-form article publishing (Markdown) |
Referenced artifact was not completely inspected
| `scripts/check-paste-permissions.ts` | Verify environment & permissions |
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
seconds for preview...');
await sleep(30_000);
}
} finally {
let leaveChromeOpen = false;
if (chrome && loggedInDuringRun && cdp && sessionId) {
console.log('[x-quote] Waiting for X session cookies to persist...');
const sessionReady = await waitForXSessionPersistence({ cdp, sessionId });
if (!sessionReady) {
console.warn('[x-quote] X session cookies not observed yet. Leaving Chrome open so login can finish persisting.');
leaveChromeOpen = true;
}
}
if (cdp) {
if (reusing && targetId) {
try { await cdp.send('Target.closeTarget', { targetId }, { timeoutMs: 5_000 }); } catch {}
}
cdp.close();
}
if (chrome) {
if (leaveChromeOpen) {
chrome.unref();
} else {
await gracefulKillChrome(chrome, port);
}
}
}
}
function printUsage(): never {
console.log(`Quote a tweet on X (Twitter) using real Chrome browser
Usage:
n
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
seconds for preview...');
await sleep(30_000);
}
} finally {
let leaveChromeOpen = false;
if (chrome && loggedInDuringRun && cdp && sessionId) {
console.log('[x-quote] Waiting for X session cookies to persist...');
const sessionReady = await waitForXSessionPersistence({ cdp, sessionId });
if (!sessionReady) {
console.warn('[x-quote] X session cookies not observed yet. Leaving Chrome open so login can finish persisting.');
leaveChromeOpen = true;
}
}
if (cdp) {
if (reusing && targetId) {
try { await cdp.send('Target.closeTarget', { targetId }, { timeoutMs: 5_000 }); } catch {}
}
cdp.close();
}
if (chrome) {
if (leaveChromeOpen) {
chrome.unref();
} else {
await gracefulKillChrome(chrome, port);
}
}
}
}
function printUsage(): never {
console.log(`Quote a tweet on X (Twitter) using real Chrome browser
Usage:
n
The manifest declares an empty permissions set while the description explicitly advertises real browser automation, CDP control, and OS-level scripting via osascript. This creates a capability-transparency gap: reviewers, policy engines, and users may treat the skill as low-privilege even though its documented behavior implies powerful local execution and web interaction capabilities, increasing the risk of abuse or insufficient sandboxing.
The README describes live posting to X, dialog auto-acceptance, clipboard use, and browser/session automation without prominently warning that the skill will take real actions on the user's authenticated account and interact with an existing Chrome session. This is dangerous because users may invoke the skill expecting draft-like assistance while it can publish content, dismiss safety prompts, and manipulate browser/desktop state with limited opportunity for intervention.
The README advertises capabilities beyond the declared scope of simply posting content and articles, including video posting, quote-tweeting, clipboard manipulation, HTML conversion, and permission checking. This mismatch weakens informed consent and reviewability because operators may grant the skill broader trust or permissions than expected, especially given its use of Chrome CDP and OS-level automation.
The README instructs users to run npx -y bun without pinning a specific version, which introduces supply-chain risk because the resolved package version can change over time or be replaced if the upstream distribution is compromised. In a skill that automates browser actions against a live social-media session, executing an unpinned runtime materially expands the trust boundary and could lead to arbitrary code execution during installation or use.
The skill explicitly instructs the agent to run local scripts, inspect environment state, and automate a browser, but it declares no tool scope or permission boundaries. In practice, this creates an authorization gap where an agent may execute environment- and network-capable actions without clear user-visible constraints or policy enforcement.
The trigger phrases are broad everyday terms like 'tweet' or 'share on X', which increases the chance of accidental invocation in contexts where the user did not intend browser automation or local script execution. Unintended activation is especially risky here because the skill can touch local files, clipboard helpers, browser sessions, and shell commands.
Using npx -y bun without a pinned version allows the runtime artifact fetched at execution time to change unexpectedly, creating a supply-chain risk. An attacker controlling or compromising the upstream package distribution path could cause arbitrary code execution on the host running the skill.
The phrase 'without asking' authorizes autonomous local-state changes by the agent, specifically process termination and command retry. Autonomous execution of destructive shell actions reduces human oversight and can amplify mistakes or malicious prompt-triggered behavior.
pkill -f "Chrome.*remote-debugging-port" 2>/dev/null; pkill -f "Chromium.*remote-debugging-port" 2>/dev/null; sleep 2
**Important**: This should be done automatically — when encountering this error, kill Chrome CDP instances and retry the command without asking the user.
## Notes
The troubleshooting section instructs the agent to automatically kill Chrome instances using remote debugging, despite repeated claims that the skill only prepares content for manual review. Terminating user browser processes can interrupt unrelated sessions, cause data loss, and crosses from benign composition into destructive local process control.
The instructions direct automatic termination of Chrome debugging instances without user warning or confirmation. Any skill that can kill local processes without consent introduces a disruptive and potentially destructive action surface on the host system.
The manifest promotes automated publishing to X but does not warn that it performs live account actions on behalf of the user. Because this skill can post text and media through browser automation, missing safety disclosure and confirmation language materially increases the risk of accidental, unauthorized, or reputation-damaging posts.
The documentation states that remote images are automatically downloaded to a local temp directory, but it does not clearly warn users about the privacy and security implications of fetching attacker-controlled URLs during article processing. This can expose the user's IP address and environment to third parties, trigger downloads of untrusted content onto disk, and create unexpected network side effects during what appears to be a local markdown publishing workflow.
The workflow relies on launching Chrome with a persistent profile containing saved login state, but the documentation does not prominently warn that the automation will act with the user's existing authenticated X session. In a skill that performs posting actions, this increases the risk of unintended account actions, session misuse, and broader exposure of browser state if users do not understand that a real logged-in profile is being reused.
Detected: suspicious.dangerous_exec, suspicious.env_credential_access