T09 · Insecure Skill Coding Practices
- Location
scripts/scrape.js:393- Finding
Chromium Security Sandbox Disabled for Untrusted Remote Content
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is not plainly malicious, but it automates a logged-in X/Grok browser session and stores reusable account data locally with weak safeguards.
Review carefully before installing. Use only on a machine where you are comfortable storing an X/Grok browser session, keep session/ and output/ private, avoid shared folders and backups, and do not run it from cron unless you accept unattended account activity. Prefer isolating it in a dedicated OS account or container and removing the --no-sandbox browser flag where possible.
scripts/scrape.js:393Chromium Security Sandbox Disabled for Untrusted Remote Content
scripts/login.js:9Authenticated X Browser Profile Stored Inside the Project Without Explicit Protection
The skill is presented as a simple Grok query mechanism, but its documented behavior includes manual x.com authentication, creation of a reusable browser session, and local storage of session material. That mismatch is dangerous because it obscures the fact that the skill handles persistent authenticated state for a third-party account, which can expose users to credential/session theft risk, policy violations, or unintended actions under their account.
The documentation explicitly promotes bypassing official API restrictions by driving Grok through a logged-in X Premium browser session. That is a strong indicator of intentional evasion of platform controls, and it normalizes credential-backed scraping in place of supported access patterns, which increases legal, account security, and abuse risk.
The README states that browser session data is stored locally and scraped results are persisted to disk, but it does not warn that these artifacts may contain authenticated cookies, tokens, prompts, or sensitive outputs. In a tool that automates a logged-in account, such silent persistence materially raises the risk of credential theft, local compromise, and data leakage.
The README instructs users to run npx playwright without pinning a specific version, which can pull whatever package/version is current at execution time. This creates a supply-chain risk and undermines reproducibility, especially in a security-sensitive skill that already relies on browser automation and authenticated sessions.
The README explicitly tells users to log into x.com and save a browser session, but does not clearly warn that authenticated session artifacts will be stored locally and may grant account access if copied or exposed. In the context of a browser automation skill targeting a premium account, persisted session state is sensitive and raises account takeover risk on shared or compromised hosts.
The README instructs users to run npx playwright install chromium without pinning a specific Playwright version. This can lead to non-reproducible installs and exposure to unexpected upstream changes or a compromised package release, which is meaningful because the tool automates a logged-in browser session against x.com.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
crontab -e
添加一行,每 6 小时执行一次:
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
crontab -e
添加一行,每 6 小时执行一次:
The trigger language is broad enough to match common requests such as 'ask Grok' or 'search X for real-time info,' which can cause the agent to invoke this browser-automation skill in situations where safer built-in tools or APIs would be more appropriate. Because this skill relies on a logged-in Premium X browser session, overbroad activation increases the chance of unnecessary use of authenticated automation and exposure of session-linked data.
The instruction to 'ALWAYS use this skill' encourages unconditional invocation whenever a user mentions Grok or avoiding API billing, bypassing normal tool-selection safety judgment. In context, that is more dangerous because the skill launches a real browser, depends on stored login state, and may route routine information requests through a privileged authenticated session unnecessarily.
Using npx playwright without pinning a specific version allows the installed package version to vary over time, which weakens build reproducibility and increases supply-chain risk. In a skill that automates browser login and persists authenticated X sessions, an unexpected dependency change could affect security-sensitive behavior or introduce malicious code if the package resolution path is compromised.
The guide instructs users to rely on specific Chinese-language labels such as "粗体 class", aria-label="重新生成", and a Chinese test prompt. This creates a locale-specific workflow without user opt-in or documentation that the skill is intended only for a Chinese-language X/Twitter environment, which is a natural-language locale policy concern.
This markdown file is in Chinese and relies on the exact Chinese aria-label value 重新生成 as the stable selector. That creates a locale-specific assumption for skill operation, but the document does not state that the workflow only applies to a Chinese-language X/Twitter UI or provide an opt-in or alternative for other locales.
The script takes a screenshot of the Grok/X session and writes extracted DOM/chat structure to local files in the output directory. In the context of a browser session tied to a persistent profile, those artifacts can capture prompts, model responses, account state, or other sensitive page content, creating unintended local data retention and possible later exposure.
The default prompt instructs Grok to answer in Chinese (用 Markdown 格式...介绍 Python 语言的3个优点), and the surrounding user-facing messages are also Chinese. For a general-purpose DOM inspection tool, this imposes a locale choice without opt-in, which matches the language/locale policy violation criteria.
The script extracts the full Grok reply container HTML from an authenticated browser session and writes it to disk for offline analysis. That can capture more than just the intended selector metadata, including user-visible content and surrounding page structure, creating unnecessary local data retention and increasing exposure if the workstation, repo, or output directory is later accessed by others.
The script saves captured reply HTML from a live logged-in session to a local file without a prominent warning, consent step, or retention controls. This can unintentionally store sensitive prompts, responses, and nearby DOM content on disk, where they may be exposed through backups, shared folders, or source-control mistakes.
The code defines a session directory on disk and uses launchPersistentContext to store authenticated browser state locally. Persisted session artifacts can contain cookies and tokens that allow later access to the user's x.com account, so compromise of the local filesystem or reuse by unrelated automation can expose the account without reauthentication.
The script launches a persistent browser profile, directs the user to log into x.com, and saves the authenticated session for later reuse. That creates durable access to the user's account beyond a one-off Grok query and exceeds the narrow user-facing purpose of simple querying/search, increasing the risk of account misuse if the session directory is reused, copied, or accessed by other code.
This code formats the generated timestamp using toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' }), which forces a specific language/locale and regional timezone in the output. The file does not provide any user opt-in, configuration, or documented justification for this locale restriction.
The cron-based scheduled execution turns the skill from an interactive query helper into unattended persistent automation against a logged-in web session. In this context, that increases the chance of account misuse, stealthy long-term scraping, and repeated execution without user awareness or review.
The README recommends scheduled execution and notes that results and logs are written to disk, but does not warn that prompts, Grok responses, operational logs, and failure markers may persist and be readable by other local users or included in backups. This can expose sensitive queries, scraped content, or metadata over time, especially in unattended cron deployments.
This markdown file is entirely in Chinese, including the title, section headings, and explanatory content, and it does not indicate that the skill or documentation is region-specific or that users may choose another language. Under the language/locale policy, forcing a specific language without opt-in can be a natural-language policy violation.
The file’s descriptive comments and several inline comments are written in Chinese, which imposes a language expectation on operators without any opt-in or stated regional justification. Under the policy, forcing a specific language without user choice is a natural-language locale violation.
The file header and inline comment use Chinese exclusively for key usage instructions, while the runtime messages are in English. This creates a language/locale policy concern because the skill does not offer user opt-in or an alternative language for those instructions.
No suspicious patterns detected.