Back to skill

Security audit

Generate Daily Sports Update

Security checks for vulnerabilities and agentic risk

Overview

The skill has a clear sports-reporting purpose, but it asks the agent to run unaudited local Python code and dependencies with Notion credentials.

Install only if you already trust the `sports-science-daily` checkout you will run. Review `daily_sports_update.py` and `requirements.txt`, use a dedicated virtual environment, pin and verify dependencies, run from an owned directory, and restrict the Notion token to the minimum page and permissions needed.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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 (1)

T07 · Tool Hijacking and Spoofing

Error
Location
SKILL.md:20
Finding

Execution of Unverified Current-Directory Script and Dependencies

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 20–38
Vulnerability Type: Untrusted relative-path code execution and insecure dependency loading
Risk Level: High

Vulnerable Code

markdown
- **Python 3**: Requires `python3` to be installed.
- **Dependencies**: The required Python packages defined in `requirements.txt` must be installed (`pip3 install -r requirements.txt`).
- **Environment Variables**:
  - `NOTION_TOKEN`: The integration token for Notion API.
  - `NOTION_PAGE_ID`: The ID of the Notion page to sync the daily update to.
- **Tools Needed**: You must have access to the `run_command` tool to execute the script in a bash terminal.

## Instructions

1.  **Locate the Script**:
    The script `daily_sports_update.py` is located in the user's sports-science-daily directory. You should first ensure you are in the correct working directory.

2.  **Run the update**:
    Use the `run_command` tool to execute the python script.

    ```bash
    python3 daily_sports_update.py --days 2
    ```

Technical Analysis

The Skill instructs the Agent to locate an unspecified user-controlled directory and execute daily_sports_update.py using a relative path. It also refers to installing dependencies from a relative-path requirements.txt. Neither file is included in the audited package, and the instructions provide no canonical path, integrity hash, signature, trusted repository revision, or other provenance validation.

Relative-path resolution makes the effective executable depend on the Agent's current working directory. If an attacker can create or replace daily_sports_update.py in the selected directory, python3 will execute that file with the Agent's operating-system privileges. Likewise, an attacker-controlled requirements.txt could introduce malicious or substituted packages; package installation can execute package build or installation logic.

The risk is amplified bec ...[truncated 2674 chars]

Remediation
View remediation

Remediation Suggestions

  1. Bundle daily_sports_update.py and the dependency manifest inside the reviewed Skill package rather than locating them in an unspecified user directory.
  2. Resolve the script from a canonical, immutable absolute path derived from the verified Skill installation directory. Do not execute a same-named file merely because it exists in the current working directory.
  3. Authenticate executable content before use through signed releases, pinned repository revisions, or cryptographic hashes obtained from a trusted source.
  4. Pin every dependency to an exact reviewed version and require hashes, such as with pip install --require-hashes -r requirements.txt.
  5. Install dependencies into a dedicated virtual environment rather than the user's global Python environment.
  6. Disable unnecessary package installation features and avoid untrusted indexes. Explicitly configure approved package repositories and review packages that require build-time execution.
  7. Pass only the environment variables required by the verified script. Avoid exposing unrelated credentials from the Agent's broader environment.
  8. Restrict the Notion integration token to only the target page and minimum necessary API capabilities. Support token rotation if compromise is suspected.
  9. Apply outbound network restrictions so the process can contact only documented and necessary endpoints, including the approved Notion and research-feed hosts.
  10. Validate directory ownership and permissions before execution, and reject scripts or manifests writable by untrusted users.
  11. Include the actual implementation and dependency files in future audits so endpoint use, file access, command construction, secret handling, and data collection can be verified.
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

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 · SKILL.md (reported line 14)May include surrounding context.

md
- NOTION_PAGE_ID
---

# Generate Daily Sports Update

This skill runs the `daily_sports_update.py` script to fetch the latest sports science research and wearable tech news. It automatically handles deduplication, so you can run it frequently without worrying about seeing the same content twice.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documented output file name and terminal success condition include Chinese text (运动科学日报, 没有发现新内容) with no indication that language is configurable or chosen by the user. This creates a locale policy concern because the skill appears to assume a specific language by default rather than offering or documenting user choice.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest description says the skill 'Runs the sports science crawler to generate a daily report, sync to Notion, and prevent duplicate content' but does not provide any explicit invocation phrases, constraints, or negative examples. For a user-invocable skill, this can make activation scope ambiguous and increase the chance of unintended matching against general requests about daily reports or sports updates.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.