Back to skill

Security audit

Literature Daily Report

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly does what it says, but it automatically sends reports externally and loads broad shell credentials without enough user control or disclosure.

Install only if you are comfortable with automatic writes to local report locations, ClawLib, Zotero, the knowledge graph, and an ambient Matrix messaging channel. Before regular use, disable or gate Matrix sending, avoid sourcing ~/.zshrc for secrets, restrict Zotero credentials to the minimum needed, and change arXiv API calls to HTTPS.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/literature_collector.py:383
Finding

Overbroad Environment and Credential Exposure to an External Zotero Tool

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/literature_collector.py:1262
Finding

Automatic Transmission of the Full Report to an Unspecified Matrix Destination

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/literature_collector.py:246
Finding

Plaintext HTTP Used for arXiv API Retrieval

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (22)

Tainted flow: 'fact' from requests.get (line 616, network input) → subprocess.run (code execution)

Critical
Category
Data Flow
Confidence
97% confidence
Finding

Remote article metadata is incorporated into fact and then handed to an external script, creating a real tainted-data-to-code-boundary flow. Even without shell=True, this is dangerous because downstream tooling may log, parse, render, or execute on that content, enabling second-order injection and pollution of trusted knowledge-graph records from untrusted internet sources.

Content

Scanner excerpt · scripts/literature_collector.py (reported line 627)May include surrounding context.

python
fact += f" | URL: {url}"

            # 调用 kg.py add
            result = subprocess.run(
                ["python3", KG_SCRIPT, "add",
                 "--entity", entity,
                 "--fact", fact,

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documented behavior extends beyond the declared purpose by performing additional outbound or side-effecting actions, including extra local copies and reported messaging behavior noted by analysis. Description-behavior mismatches are dangerous because users may authorize a benign-seeming reporting skill without realizing it also distributes content elsewhere, which can leak data, create unauthorized persistence, or trigger unintended communications.

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
95% confidence
Finding

Copying the full process environment and then augmenting it via a login shell effectively harvests all available environment secrets, not just the specific credentials needed. In an agent-skill context, this is more dangerous because the skill also invokes other subprocesses and external services, increasing the chance that unrelated secrets are exposed, inherited, or misused.

Content

Scanner excerpt · scripts/literature_collector.py (reported line 385)May include surrounding context.

python
def _source_zshrc():
    """从 ~/.zshrc 加载环境变量,返回更新后的 env dict"""
    env = os.environ.copy()
    try:
        result = subprocess.run(
            ["bash", "-l", "-c", "env"],

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script automatically sends the generated report to Matrix, an external messaging channel not clearly necessary for local report generation. This creates an undisclosed exfiltration path for collected and summarized data and widens the skill's operational scope beyond collection, summarization, and local organization.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill documents capabilities that imply network access, shell execution, filesystem read/write, and environment access, but it declares no explicit tool scope or permission boundaries. This is dangerous because a user or orchestrator cannot easily distinguish intended literature-fetching behavior from broader host access, increasing the chance of over-privileged execution and misuse if the skill or its companion scripts are modified or abused.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description explicitly states '中文格式报告输出', making Chinese output a default requirement. Because the file does not offer a language choice or explain a necessary region-specific constraint, this is a natural-language locale policy violation under the stated rules.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill advertises automatic synchronization to multiple external systems, including Zotero and a knowledge graph, without a prominent warning or consent gate for those side effects. This is dangerous because generated reports and metadata may be propagated outside the local workspace automatically, causing unintended disclosure, difficult-to-reverse writes, and broader data distribution than the user expected.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Automatically loading credentials from ~/.zshrc expands the trust boundary from the skill into a user's general shell configuration, which may contain unrelated secrets and shell logic. This is risky because it encourages broad secret exposure and can accidentally ingest or rely on sensitive environment data unrelated to Zotero, especially when combined with shell-capable execution.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file is written as a normative standard in Chinese and describes the classification system without indicating that other languages are supported or that Chinese is optional. Under the stated policy, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The workflow specifies that summaries must be generated in a Chinese format ("100-250 字中文格式总结"). This is a natural-language locale constraint presented as mandatory behavior, and the document does not offer the user a language choice or explain a justified region-specific requirement.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/workflows.md (reported line 70)May include surrounding context.

md
"""从 bioRxiv 获取摘要"""
    try:
        # bioRxiv API
        api_url = f"https://api.biorxiv.org/details/{doi}"
        response = requests.get(api_url, timeout=15)
        response.raise_for_status()
        data = response.json()

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/literature_collector.py (reported line 224)May include surrounding context.

python
"""从 bioRxiv 获取摘要"""
    try:
        # bioRxiv API
        api_url = f"https://api.biorxiv.org/details/{doi}"
        response = requests.get(api_url, timeout=15)
        response.raise_for_status()
        data = response.json()

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/literature_collector.py (reported line 791)May include surrounding context.

python
"""从 bioRxiv 获取摘要"""
    try:
        # bioRxiv API
        api_url = f"https://api.biorxiv.org/details/{doi}"
        response = requests.get(api_url, timeout=15)
        response.raise_for_status()
        data = response.json()

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/literature_collector.py (reported line 828)May include surrounding context.

python
"""从 bioRxiv 获取摘要"""
    try:
        # bioRxiv API
        api_url = f"https://api.biorxiv.org/details/{doi}"
        response = requests.get(api_url, timeout=15)
        response.raise_for_status()
        data = response.json()

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The docstring states that summaries are generated '始终使用中文格式' and the implementation is built around converting output into Chinese-formatted summaries. This is a language policy issue because it forces a specific language without offering user choice or documenting a justified locale restriction.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill loads a broad shell-derived environment and harvests credentials/API settings unrelated to minimal literature collection. This increases exposure of sensitive tokens and expands the capability scope of the skill, especially since the imported environment is then reused for subprocesses and network-connected integrations.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
92% confidence
Finding

The code launches a full login shell (bash -l -c env) to import environment variables from the user's shell startup files. This executes arbitrary commands embedded in .bash_profile, .profile, or related login-shell initialization, which broadens the trust boundary from this script to all shell config code and can unintentionally trigger attacker-controlled code if those files are modified.

Content

Scanner excerpt · scripts/literature_collector.py (reported line 387)May include surrounding context.

python
"""从 ~/.zshrc 加载环境变量,返回更新后的 env dict"""
    env = os.environ.copy()
    try:
        result = subprocess.run(
            ["bash", "-l", "-c", "env"],
            capture_output=True, text=True, timeout=10
        )

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 · scripts/literature_collector.py (reported line 408)May include surrounding context.

python
if ZOTERO_GROUP_ID:
            env["ZOTERO_GROUP_ID"] = ZOTERO_GROUP_ID
        
        result = subprocess.run(
            ["python3", ZOTERO_SCRIPT, "collections", "--json"],
            capture_output=True, text=True, timeout=30, env=env
        )

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
95% confidence
Finding

The script passes article-derived network content (fact, built from title/authors/journal/url fetched remotely) into another executable script via command-line arguments. Although subprocess.run is used without a shell, this still crosses a trust boundary: if kg.py interprets argument values unsafely, malicious article metadata can trigger downstream command/markup injection, data corruption, or persistence in the knowledge graph.

Content

Scanner excerpt · scripts/literature_collector.py (reported line 627)May include surrounding context.

python
fact += f" | URL: {url}"

            # 调用 kg.py add
            result = subprocess.run(
                ["python3", KG_SCRIPT, "add",
                 "--entity", entity,
                 "--fact", fact,

Tainted flow: 'url' from requests.get (line 606, network input) → requests.get (network output)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/literature_collector.py (reported line 873)May include surrounding context.

python
query = quote(f"((cat:q-bio OR cat:cs.AI OR cat:cs.LG) AND (machine learning OR deep learning OR bioinformatics OR metagenomics)) AND {submitted_date_filter}")
        url = f"http://export.arxiv.org/api/query?search_query={query}&start=0&max_results={max_results}&sortBy=submittedDate&sortOrder=descending"
        
        response = requests.get(url, timeout=30)
        response.raise_for_status()
        
        root = ET.fromstring(response.text)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script writes and overwrites files in workspace directories, including a latest.md file and copied report artifacts, without confirmation or dry-run safeguards. In this skill context the paths are fixed rather than attacker-controlled, so the issue is more about unsafe side effects and accidental data loss than arbitrary file write exploitation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill transmits collected article data to Matrix automatically without an explicit prompt or just-in-time disclosure. While the data is mostly public literature content, the generated editorial summary and selection may still reflect user interests or internal workflow, making silent external transmission a real privacy and policy concern.

Content

No source excerpt is available for this finding.