Back to skill

Security audit

200iq-ai-agent

Security checks for vulnerabilities and agentic risk

Overview

The skill is a simple prompt and planning helper with local logging and no evidence of hidden data theft or real external execution.

Use this as an advisory planning mode. Require explicit approval before any real tool, account, financial, or business action is taken, and be aware it may write task details to persistent ../logs files if its Python helpers are run.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
logger.py:4
Finding

Unrestricted Local File Append and Overwrite

Content
View full analysis

Vulnerability Details

File Location: logger.py, lines 4-10
Vulnerability Type: Arbitrary file write through unrestricted output paths
Risk Level: Medium

Vulnerable Code

python
def log_journal(entry, path="../logs/journal.log"):
    with open(path, "a") as f:
        f.write(f"[{datetime.now()}] {entry}\n")

def log_actions(actions, path="../logs/actions.json"):
    with open(path, "w") as f:
        json.dump(actions, f, indent=2)

Technical Analysis

Both public logging functions accept a caller-controlled path and pass it directly to open() without path normalization, directory restriction, symlink validation, or access-policy enforcement.

log_actions() is particularly sensitive because opening a file in w mode truncates an existing target before writing caller-supplied JSON. log_journal() can append caller-controlled text to any writable target. Absolute paths and traversal paths such as ../../target are not rejected.

The default paths also use ../logs, causing writes outside the project directory, although this default behavior alone does not establish malicious intent. Existing internal callers use the default journal path; no built-in path-injection trigger was identified.

Attack Path

  1. An attacker obtains influence over a call to log_actions() or log_journal(), including the path argument.
  2. The attacker supplies an absolute path, directory-traversal path, or path resolving through a symlink to a writable target outside the intended logging directory.
  3. Python opens the target without validating its resolved location.
  4. log_actions() truncates and replaces the target with attacker-controlled JSON, or log_journal() appends attacker-controlled text.
  5. The modified file may disrupt the application or affect another process that consumes it.

Impact Assessment

Exploitation is limited to files writable by the operating-system identity run ...[truncated 523 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the path parameter from public logging APIs unless custom destinations are required.
  2. Configure one dedicated logging directory and resolve every destination beneath it.
  3. Reject absolute paths, traversal components, and any resolved path outside the approved directory.
  4. Reject symlink targets or open files using platform-supported no-follow protections.
  5. Create the logging directory explicitly with restrictive permissions.
  6. Apply restrictive file permissions to newly created logs.
  7. Avoid direct w-mode replacement for structured data. Write to a securely created temporary file in the same approved directory, flush and synchronize it, and atomically replace the intended fixed target.
  8. If configurable filenames are necessary, accept only a validated basename or an allowlisted identifier rather than an arbitrary path.
  9. Add tests covering absolute paths, .. traversal, symlinks, and targets outside the approved logging directory.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

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 · prompt_optimizer.py (reported line 13)May include surrounding context.

python
f"Provide step-by-step reasoning and actionable steps."
    )
    log_journal(f"Generated high-IQ prompt for task '{task_description}'")
    return prompt

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The activation phrase is broad enough to be triggered by ordinary user requests for planning or optimization, which can cause the skill to activate unintentionally. Because the skill promises stronger planning and execution behavior, accidental invocation could change agent behavior in ways the user did not explicitly intend.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill states that it 'executes tasks with ROI threshold' and elsewhere refers to execution delegation, but it does not warn users that the agent may take impactful actions or require explicit approval before doing so. This increases the risk of overbroad autonomy, where the agent could perform external, costly, or irreversible actions without clear consent boundaries.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code appends to a journal log and overwrites an actions JSON file, but it provides no confirmation prompt, logging/print statement, docstring, or comment explaining these file modifications. For code files, safety-relevant file writes should include at least some visible disclosure unless clearly covered elsewhere.

Content

No source excerpt is available for this finding.