Back to skill

Security audit

Ai Capsule

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real AI news digest skill, but its default X/Twitter integration handles browser session cookies and inherited environment secrets too broadly.

Review this skill before installing if you use X/Twitter in Chrome or keep API keys in your agent environment. Prefer disabling or removing the X/Twitter source unless you accept browser-cookie access, run setup in a clean environment with minimal secrets, and consider pinning dependencies before use.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
fetch.py:402
Finding

Authenticated X/Twitter Session Credentials and Unrelated Environment Secrets Are Exposed to a Third-Party Subprocess

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
scripts/setup-env.sh:23
Finding

Security-Sensitive Dependencies Are Installed from Broad Version Ranges Without Integrity Pinning

Content
View full analysis
=6.0,<7 requests>=2.32.4,<3 beautifulsoup4>=4.12,<5 PyYAML>=6.0,<7 scrapling>=0.2.99,<0.4 trafilatura>=2.0,<3 browser-cookie3>=0.19,<1 twitter-cli>=0.7,<1 ``` ### Technical Analysis The setup script resolves and installs packages dynamically from the configured package index. Every dependency is specified using a broad compatible range rather than an exact reviewed version, and no cryptographic hashes or lockfile are provided. The risk is elevated because these are not low-privilege libraries: - `browser-cookie3` is intentionally used to access browser credential storage. - `twitter-cli` receives authenticated X/Twitter credentials and the full parent environment. - Fetching and parsing packages process attacker-controlled network content. - Python packages may execute code during installation, import, or ordinary runtime. The unconditional pip upgrade introduces another dynamically selected executable component before project dependencies are installed. As a result, the effective code executed by setup can change after the Skill itself has been reviewed, without any modification to the repository. There is no evidence of dependency confusion or a currently malicious package in the audited files. The confirmed weakness is the absence of reproducible, integrity-verified dependency resolution around packages that operate with sensitive privileges. ### Attack Path 1. An attacker compromises a package maintainer account, package index account, release pipeline, ...[truncated 1507 chars]
Remediation
View remediation

T01 · Skill Instruction Hijacking

Warning
Location
sections/daily-mode.md:11
Finding

Untrusted Article Content Is Passed to a Tool-Capable Agent Without Prompt-Injection Isolation

Content
View full analysis
list[dict]: """ 对 content 字段为空的条目并发抓取文章正文。 已有 content(如 HuggingFace abstract)的条目直接跳过。 失败时保留原条目(content 保持空字符串,由 Claude WebFetch 兜底)。 """ to_enrich = [i for i in items if not i.get("content", "").strip() and i.get("url")] if not to_enrich: return items print(f" 正文抓取: {len(to_enrich)} 篇...") def fetch_article(item: dict) -> dict: try: resp = _scrapling_fetcher.get(item["url"], timeout=12) html = resp.html_content or "" if html and len(html) > 500: text = trafilatura.extract(html) or "" ...[truncated 3396 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
Findings (26)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the wider skill/package includes release automation that edits metadata files, performs git operations, and publishes externally, that is materially different from the declared end-user purpose of ranking news. Hidden repository modification and publication behavior can cause unintended code changes or external disclosure when run in an agent context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

If the wider skill/package includes release automation that edits metadata files, performs git operations, and publishes externally, that is materially different from the declared end-user purpose of ranking news. Hidden repository modification and publication behavior can cause unintended code changes or external disclosure when run in an agent context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the wider skill/package includes release automation that edits metadata files, performs git operations, and publishes externally, that is materially different from the declared end-user purpose of ranking news. Hidden repository modification and publication behavior can cause unintended code changes or external disclosure when run in an agent context.

Content

No source excerpt is available for this finding.

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
85% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

Scanner excerpt · SKILL.md (reported line 170)May include surrounding context.

md
Dedup file: `{data_dir}/dedup-titles.txt` (one title per line).

**Daily mode**: handled centrally in `sections/daily-mode.md` Step 3 — never judge manually.

**Single / URL / Batch mode**:

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
92% confidence
Finding

Copying the full parent environment into a subprocess that is also given authentication cookies increases the blast radius of that child process and any dependency it loads. In this skill, the subprocess is an external twitter CLI and the script also auto-discovers a proxy, so unnecessary inherited secrets such as API keys, tokens, and credentials may be exposed to third-party code or transmitted over attacker-controlled networking paths.

Content

Scanner excerpt · fetch.py (reported line 428)May include surrounding context.

python
return []

    # 3. 逐账号抓取
    env = os.environ.copy()
    env["TWITTER_AUTH_TOKEN"] = auth_token
    env["TWITTER_CT0"] = ct0

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · scripts/publish.sh (reported line 28)May include surrounding context.

sh
read -r -p "版本号 [$NEXT]: " INPUT
VERSION="${INPUT:-$NEXT}"

# ── Update SKILL.md version ──
sed -i '' "s/^version: .*/version: $VERSION/" SKILL.md
echo "SKILL.md → version: $VERSION"

YARA rule 'info_stealer': Information stealer patterns (credential harvesting, browser data theft) [malware]

High
Category
YARA Match
Confidence
84% confidence
Finding

The skill explicitly instructs fetch.py to read x.com cookies from the user's local Chrome profile and pass them to a subprocess for authenticated Twitter/X access. Even if the stated purpose is limited and in-memory, browser cookie extraction is a sensitive credential-handling pattern: compromise of the subprocess, logs, environment leakage, or misuse of the fetched code path could expose session tokens and enable account hijacking.

Content

Scanner excerpt · sections/daily-mode.md (reported line 32)May include surrounding context.

md
andled by fetch.py.

| Source type | Fetched by | Notes |
|-------------|-----------|-------|
| `type: rss` | fetch.py (Step 1) | Done |
| `type: webfetch`, `python_fetch: true` | fetch.py (Step 1) | Done, `content` field populated |
| `type: webfetch`, `python_fetch: false` (Product Hunt) | Claude `WebFetch` | Cloudflare — must use WebFetch |
| `type: twitter` | fetch.py (Step 1) | Reads x.com cookies from local Chrome, auto-detects proxy |
| `type: tavily` | Claude Tavily search | Reddit etc. |

Skip a source on failure — do not block on it. **Use dates in article titles, body text, or page ordering to determine whether an article falls within the cutoff date; skip old articles immediately.**

**Do NOT pre-filter by topic or relevance.** Add all items from each source that pass the date cutoff — even if they seem unrelated to AI. The scoring system handles ranking. Every item from Product Hunt, GitHub Trending, etc. goes into pending regardless of whether it looks relevant.

**

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · sections/output-format.md (reported line 27)May include surrounding context.


text

**Action tag display rules:**
- `🎯 **TRY**` — article contains a GitHub repo / runnable code / dataset
- `🎯 **READ**` — deep content worth reading in full
- `🎯 **SCAN**` — news brief or low-score item, a quick skim is enough

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README instructs users to invoke the skill by saying daily, and later lists daily as a usage trigger. As a standalone common word, this is an ambiguous activation phrase that could easily occur in normal conversation and lacks constraints or negative examples clarifying when the skill should or should not activate.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

The skill persists user profile data and history under ~/.ai-capsule/, creating session state that survives across runs and updates. While persistence is expected for this product, storing preferences, reading history, and scored article history can expose behavioral data or be reused by later runs without fresh consent, especially in multi-user or less isolated environments.

Content

Scanner excerpt · README.md (reported line 78)May include surrounding context.

md
---

Claude will walk you through a short setup (role, familiar areas, output language) and write your config to `~/.ai-capsule/config.yaml`. Your data lives in `~/.ai-capsule/data/` — separate from the skill, safe across updates.

---

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

README 将“然后说 daily”描述为调用方式,但 daily 是常见英文词,单独作为触发词容易与普通对话或其他工作流发生碰撞。文档未提供触发上下文限制、精确命令前缀,或不会触发的反例说明,因此存在意外激活风险。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

文档说明“在 OpenClaw 会话中说 daily”即可触发,但未说明更细的约束条件或排除条件。由于该短语过于简短且通用,容易与自然会话中的普通表达重叠,造成非预期调用。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

“daily 或 每日模式”“粘贴 URL”“粘贴文章正文”等触发描述较为宽泛,且没有说明何时应触发、何时不应触发。尤其“粘贴 URL/文章正文”可能覆盖用户普通分享内容的场景,缺少约束会增加误调用概率。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill explicitly instructs use of shell, file reads/writes, environment variables, and network access, but does not declare any tool scope or allowed-tools boundary. That creates an overly broad execution surface where a host agent may grant more capabilities than users expect, increasing the chance of unintended local file access, persistence, or network actions.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
89% confidence
Finding

The skill intentionally persists user configuration and history across sessions in the home directory, creating durable state about interests, role, language, and reading history. Persistent state is not inherently malicious, but it increases privacy risk and can influence future agent behavior in ways users may not expect if not clearly disclosed and controlled.

Content

Scanner excerpt · SKILL.md (reported line 121)May include surrounding context.

  • A) ~/.ai-capsule/data (default — survives skill updates)
  • B) Custom path (describe freely)

After collecting answers, write the config:

bash
mkdir -p ~/.ai-capsule
cat > "${AI_CAPSULE_CONFIG:-$HOME/.ai-capsule/config.yaml}" << 'EOF'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The setup flow writes personally descriptive profile data, preferences, and storage paths into a persistent config file under the user's home directory without an explicit privacy/safety warning. Persisting this data can expose user profiling details to other local processes, backups, or future agent runs without the user realizing it.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Daily mode can trigger behavior that reads local Chrome x.com cookies and invokes an external twitter-related subprocess, yet the operational step only says to execute another file and does not prominently warn the user at the point of action. Access to browser cookies and external tooling is sensitive because it can expose authenticated session material and broaden the trust boundary beyond the skill itself.

Content

No source excerpt is available for this finding.

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Content

Scanner excerpt · fetch.py (reported line 440)May include surrounding context.

python
import socket
        for port in ["7890", "6152", "1080", "1087"]:
            try:
                s = socket.create_connection(("127.0.0.1", int(port)), timeout=0.3)
                s.close()
                proxy = f"http://127.0.0.1:{port}"
                print(f"  [INFO] 检测到本地代理: {proxy}", file=sys.stderr)

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · fetch.py (reported line 459)May include surrounding context.

python
print(f"  X/Twitter @{handle}...")
            try:
                # 多拉一些确保时间过滤后还能拿到目标条数
                result = subprocess.run(
                    [_twitter_bin, "user-posts", f"@{handle}", "--max", "20"],
                    capture_output=True, text=True, timeout=20, env=env
                )

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This shell script presents its interactive prompts and status output entirely in Chinese, including the confirmation gate and cancellation messaging. That imposes a specific language on users without offering a choice or documenting a justified locale restriction, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The instructions direct the agent to append to history/dedup files and delete pending.json in the user's local data directory without an explicit warning or confirmation step. Even though these are expected application state files, silent modification and deletion of user-local data can cause unintended data loss, make recovery harder, and violate least-surprise expectations for an agent skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The URL parameter spoken_language_code=en imposes an English-language locale constraint in the skill configuration. This is a natural-language policy concern because the file does not indicate user opt-in, alternative locale selection, or a region-specific justification for forcing English.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The request headers hard-code Accept-Language: en-US,en;q=0.5, which imposes a specific language/locale preference for fetched content. This is a natural-language policy concern because the skill does not offer a user choice or explain why English is required.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: feedparser has 10 known advisory(ies) (CVE-2011-1157 (feedparser Cross-site Scripting vulnerability); CVE-2009-5065 (feedparser Cross-site Scripting vulnerability); CVE-2011-1158 (feedparser Cross-site Scripting vulnerability) +7 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.