Back to skill

Security audit

context-not-control

Security checks for vulnerabilities and agentic risk

Overview

The skill is not clearly malicious, but it encourages broad agent autonomy while its promised permission checks are only advisory and can fail open.

Install only if you deliberately want a high-autonomy agent workflow. Do not rely on this skill's permission_check.py as a security control; review actions yourself before deployments, database changes, package installs, cron jobs, external messages, or anything involving credentials. Prefer Assistant Mode or strict custom red lines for sensitive projects.

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

Error
Location
scripts/permission_check.py:50
Finding

Fail-Open Permission Classification Creates a False Authorization Boundary

Content
View full analysis

Vulnerability Details

File Location: scripts/permission_check.py:50-75; related security claims in SKILL.md:94-106 and autonomy rules in SKILL.md:120-176
Vulnerability Type: Fail-open authorization logic and ineffective permission enforcement
Risk Level: High

Vulnerable Code

scripts/permission_check.py:50-75:

python
def check_permission(action, config):
    """
    Check if an action requires confirmation.

    Returns:
        bool: True if confirmation required, False otherwise
    """
    level = config.get('permission_level', 2)

    # Combine default and custom rules
    red_lines = config.get('red_lines', []) + config.get('custom_red_lines', [])
    yellow_lines = config.get('yellow_lines', []) + config.get('custom_yellow_lines', [])

    # Level 3: Everything requires confirmation
    if level == 3:
        return True

    # Level 2: Red + Yellow require confirmation
    if level == 2:
        return action in red_lines or action in yellow_lines

    # Level 1: Only Red requires confirmation
    if level == 1:
        return action in red_lines

    return False

SKILL.md:94-106 presents this classifier as automatic permission enforcement:

python
# Example: AI wants to delete a file
if permission_check('delete_file', user_permission_level):
    # Ask user for confirmation
else:
    # Execute directly

Technical Analysis

The permission check uses exact string matching against caller-controlled action names. At permission levels 1 and 2, every action not explicitly listed in red_lines or yellow_lines is classified as safe to execute without confirmation.

Consequently, semantically equivalent but unlisted names such as remove_file, erase_user_data, publish_message, or change_host_configuration bypass rules named delete_file, delete_database, send_public_message, or modify_system_config. There is no canonical ac ...[truncated 2752 chars]

Remediation
View remediation

Remediation Suggestions

  1. Fail closed for unknown actions

    • Require confirmation for every action that is not explicitly classified.
    • Replace the final return False with a confirmation-required result or a policy error.
  2. Use a closed action model

    • Define a canonical enumeration of supported operations.
    • Reject arbitrary action strings.
    • Map low-level operations to security categories such as filesystem deletion, external communication, production mutation, credential access, package installation, and system configuration.
  3. Validate configuration strictly

    • Require permission_level to be exactly 1, 2, or 3.
    • Validate that rule fields are lists containing only recognized action identifiers.
    • Reject malformed, empty, or unexpected YAML structures.
    • Treat all policy-loading errors as requiring confirmation.
  4. Use one authoritative default policy

    • Generate both fallback and on-disk policies from a shared constant or schema.
    • Add automated tests that verify parity between generated and fallback policies.
  5. Enforce checks at the operation boundary

    • Integrate authorization into the actual tool dispatcher or operation wrapper.
    • Prevent sensitive tool calls from executing until a valid policy decision and, where required, explicit user confirmation are recorded.
    • Do not rely on Agent instructions to invoke the checker voluntarily.
  6. Bind confirmation to the exact operation

    • Include the normalized action, target resource, environment, relevant parameters, and expected side effects in the confirmation request.
    • Prevent a confirmation for one operation from authorizing a broader or different operation.
  7. Correct the documentation

    • Describe the current script as an advisory classifier unless an enforcing integration is implemented.
    • Clearly state that it cannot itself prevent tool execution.
    • Avoid p ...[truncated 332 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

A second description-behavior mismatch reinforces that the skill is marketed as a trust and autonomy framework while only minimally supporting manual file updates. In a security context, overstating guardrails is hazardous because it conditions users to permit actions under the false assumption that approval checks and context controls exist.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

A second description-behavior mismatch reinforces that the skill is marketed as a trust and autonomy framework while only minimally supporting manual file updates. In a security context, overstating guardrails is hazardous because it conditions users to permit actions under the false assumption that approval checks and context controls exist.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill describes scripts that initialize and update local project files, but the skill metadata does not declare an explicit tool scope such as permissions or allowed-tools. That mismatch can cause the orchestrator or user to underestimate the skill's ability to read and write files, increasing the risk of unintended file modification when the skill is invoked.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill's broad positioning as a general workflow improvement tool can cause it to activate for many ordinary requests, even when autonomy and file-writing behavior are unnecessary. Overbroad triggering increases exposure to the risky parts of the skill, especially because it encourages trust-based delegation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The 'when to use' guidance is ambiguous and lacks boundaries, so the skill may be selected in situations involving sensitive operations, vague trust assumptions, or high-stakes environments without proper safeguards. Because the skill promotes increasing AI initiative, ambiguous activation conditions make unsafe delegation more likely.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

The skill explicitly authorizes the AI in 'Master Mode' to write, test, deploy code, install tools, and modify configurations without asking, while only carving out a few confirmations. That is dangerous because it normalizes broad autonomous action, including potentially destructive system and deployment changes, without any demonstrated enforcement layer in the skill itself.

Content

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

md
**Philosophy**: Maximum autonomy, minimum interruption

**AI can do without asking**:
- Write, test, and deploy code
- Install dependencies and tools
- Modify configurations

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
91% confidence
Finding

The 'Collaborative Mode' still permits autonomous code writing, file creation, dependency installation, and test execution without asking. In context, this is risky because the skill is framed as a trust-building workflow, so users may permit meaningful local changes believing that stronger guardrails exist than are actually implemented.

Content

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

md
**Philosophy**: Trust but verify on important operations

**AI can do without asking**:
- Write and test code
- Create/update files
- Research and documentation

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
**Philosophy**: AI suggests, you decide

**AI can do without asking**:
- Provide suggestions and explanations
- Show code examples
- Research information

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
87% confidence
Finding

Declaring that everything outside custom red and yellow lines is 'green' and needs no confirmation creates an unsafe default-allow model. In practice, unclassified actions can still be sensitive, and this is more dangerous here because the skill encourages autonomy and does not provide evidence of a robust policy engine to classify operations safely.

Content

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

  • install_npm_packages
    • modify_env_files

Everything else is green (no confirmation needed)

text

### Project Templates

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This example normalizes making system-level changes and configuring external integrations after only a generic 'Proceed?' prompt, without explicitly warning that dependencies will be installed, a persistent cron job will be created, and a Slack webhook involves handling sensitive credentials and outbound data flow. In a skill whose purpose is to increase agent autonomy, that omission can train users and downstream agents to treat persistent environment changes and secret-bearing integrations as routine, increasing the risk of unintended modification, credential exposure, or privacy-impacting automation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The Level 1 example depicts automatic database updates and authentication-related code changes with no explicit warning or confirmation, despite schema changes being potentially destructive and security-sensitive. Because this skill advocates higher-autonomy execution modes, presenting silent DB modification as acceptable behavior can encourage agents to perform impactful changes without informed user consent, leading to outages, data corruption, or unsafe auth deployments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The automation example depicts creating a script that queries PostgreSQL, sends emails, posts to Slack, and installs a cron job, all without any warning about credentials, access scope, side effects, or the risk of scheduling recurring actions. In a skill explicitly encouraging greater AI autonomy, this omission is more dangerous because readers may infer that persistent automation and external communications are routine to perform without explicit confirmation or sandboxing.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

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.

Content

Scanner excerpt · references/troubleshooting.md (reported line 161)May include surrounding context.

Should be in workspace root

ls PROJECT.md

If not found, create it

python scripts/init_context.py

text

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · scripts/init_context.py (reported line 27)May include surrounding context.

python
return f"""# PROJECT.md - Project Context

> Auto-generated by context-not-control skill
> Last updated: {__import__('datetime').datetime.now().strftime('%Y-%m-%d %H:%M')}

---

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

The generated permission model explicitly marks all non-listed actions as requiring no confirmation at permission levels 1-2, which can enable broad autonomous behavior by downstream agents. In a skill designed to increase AI autonomy, this creates a risky default-control gap: sensitive actions not anticipated in the red/yellow lists may be treated as implicitly authorized.

Content

Scanner excerpt · scripts/init_context.py (reported line 102)May include surrounding context.

python
- restart_service
  - send_email

# Green lines: Everything else (no confirmation needed at level 1-2)
# At level 3, all operations require confirmation

# Custom rules (optional)

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The example presents the AI as having built and run an application on localhost without any accompanying warning that code generation and execution may modify files, install dependencies, or affect the local environment. Because this is a markdown skill/example file, safety-relevant behavior should be disclosed when describing actions that affect user systems.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.