Back to skill

Security audit

Multi-Environment Isolator

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly an environment scaffolder, but it generates executable scripts and production config with unsafe defaults that should be reviewed before use.

Review before installing. Use only on a trusted local project, avoid untrusted command-line values, do not run generated scripts until values are inspected, replace all JWT secrets with strong random secrets before any production use, and review npm/package lockfiles before running the generated frontend or Playwright scripts.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/setup_envs.py:105
Finding

Shell Command Injection in Generated Startup Scripts

Content
View full analysis
str: """Generate startup shell script for a specific environment.""" env_label = {"dev": "Development", "test": "Testing", "prod": "Production"}[env] port = config[f"{env}_port"] app_module = config["app_module"] name = config["name"] user_line = "" if env == "dev" and config.get("dev_user"): user_line = f'\necho "👩‍💻 Happy coding, {config["dev_user"]}!"' elif env == "test" and config.get("test_user"): user_line = f'\necho "🧪 Happy testing, {config["test_user"]}!"' reload_flag = "\n --reload \\" if env == "dev" else "" workers = "$(nproc)" if env == "prod" else "1" workers_line = "" if env == "dev" else f"\n --workers {workers} \\" log_level = {"dev": "debug", "test": "info", "prod": "warning"}[env] return f"""#!/bin/bash # {'=' * 50} # {name} - {env_label} Environment # {'=' * 50} set -e SCRIPT_DIR="$(cd "$(dirname "${{BASH_SOURCE[0]}}")" && pwd)" PROJECT_DIR="$(dirname "$SCRIPT_DIR")" export ENV_FILE="$PROJECT_DIR/.env.{env}" echo "🚀 Starting {name} {env_label} Environment..." echo "📍 Port: {port}" echo "📍 Environment: $ENV_FILE" echo "📍 Database: ./data/{env}/"{user_line} echo "" cd "$PROJECT_DIR" [ -d "venv" ] && source venv/bin/activate uvicorn {app_module} \\ --host 127.0.0.1 \\ --port {port} \\{reload_flag}{workers_line} --log-level {log_level} """ ``` From `scripts/setup_envs_v2.py`: ```python def generate_frontend_script(env: str, config: dict) -> str: """Generate frontend startup shell script for a specific environment.""" env_label = {"dev": "Development", "test": "Testing", "prod": "Production"}[e ...[truncated 3202 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/setup_envs.py:77
Finding

Predictable Hard-Coded JWT Secrets in Generated Environments

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/setup_envs_v2.py:180
Finding

Automatic Execution of Unverified npm Dependencies and Lifecycle Scripts

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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The code largely matches the core stated purpose of setting up isolated dev/test/prod environments for a FastAPI/uvicorn project: it creates environment-specific config files, backend startup scripts, data directories, documentation, and updates .gitignore. However, the declared description materially overstates functionality by claiming frontend (Vue/React) support and Playwright test integration. The supplied code only generates backend uvicorn scripts and contains no frontend-specific scaffolding, no npm/Vue/React handling, and no Playwright files, commands, or configuration. Because these are explicit, user-facing capabilities in the description rather than minor implementation details, this is a description-behavior mismatch.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

The generated .env content includes hardcoded JWT secrets derived only from the environment name, such as 'prod-jwt-secret-change-me'. These are predictable default credentials, and if a user forgets to replace them, attackers could forge authentication tokens or impersonate users across environments.

Content

Scanner excerpt · scripts/setup_envs.py (reported line 21)May include surrounding context.

python
def generate_env_file(env: str, config: dict) -> str:
    """Generate .env file content for a specific environment."""
    settings = {
        "dev": {
            "APP_ENV": "development",

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup_envs.py (reported line 250)May include surrounding context.

python
def generate_env_file(env: str, config: dict) -> str:
    """Generate .env file content for a specific environment."""
    settings = {
        "dev": {
            "APP_ENV": "development",

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup_envs_v2.py (reported line 23)May include surrounding context.

python
def generate_env_file(env: str, config: dict) -> str:
    """Generate .env file content for a specific environment."""
    settings = {
        "dev": {
            "APP_ENV": "development",

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup_envs_v2.py (reported line 409)May include surrounding context.

python
def generate_env_file(env: str, config: dict) -> str:
    """Generate .env file content for a specific environment."""
    settings = {
        "dev": {
            "APP_ENV": "development",

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill describes capabilities that would read, write, and execute shell actions against a target project, but it does not declare any explicit tool scope such as permissions or allowed-tools. In an agent ecosystem, that increases the chance of over-broad execution, accidental file modification, or command execution in unintended locations because reviewers and runtime policy cannot easily constrain what the skill is allowed to do.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger conditions include broad natural-language phrases like general requests about separating development and production, which can cause the skill to activate in situations broader than intended. For a skill that can write files and run shell-oriented setup actions, over-triggering increases the risk of unintended project modifications or execution in the wrong repository/context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation includes a forceful process termination command (kill -9 <PID>) without warning about data loss, skipped cleanup, or the risk of killing the wrong process. In the context of environment-management instructions, users may copy-paste this during troubleshooting and inadvertently terminate unrelated services or corrupt in-flight work.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The example pkill -f "uvicorn" is overly broad and may terminate any process whose command line matches uvicorn, including unrelated development or production services on the same host. Because this skill is specifically about managing multiple environments in parallel, the chance of collateral shutdown is higher, making the guidance more dangerous in context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script recursively creates directories and writes configuration, startup, documentation, and .gitignore files inside an arbitrary user-supplied project path. Although it skips some existing files, it still overwrites docs and may modify repository state without any confirmation, backup, dry-run mode, or explicit warning, creating a real integrity risk if pointed at the wrong directory or run in automation.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script automatically creates multiple .env files containing security-sensitive settings, including JWT secrets, without clearly warning the user that credentials and environment-specific security configuration are being written to disk. In the context of a setup generator for dev/test/prod isolation, this is more dangerous because it encourages immediate operational use of generated defaults across environments, increasing the chance that placeholder secrets remain deployed.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The generated structure lists environment-specific scripts such as start-backend-dev.sh, start-frontend-dev.sh, and run-playwright-tests.sh (L037-L047), but the usage sections instruct users to run ./scripts/start-dev.sh, ./scripts/start-test.sh, and ./scripts/start-prod.sh (L087-L094, L105-L111), which are not listed as generated artifacts. This is an intent/documentation contradiction rather than a mere omission because the file inventory explicitly specifies what the setup creates.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

Earlier usage examples document separate backend and frontend port flags such as --dev-backend-port, --dev-frontend-port, --test-backend-port, and --prod-frontend-port (L067-L078). The later command reference instead describes different flags --dev-port, --test-port, and --prod-port plus database options not mentioned elsewhere (L126-L135), creating conflicting documentation about what the script actually accepts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

This code modifies the project's .gitignore file, which is a persistent file write affecting repository behavior. It reports completion after the fact, but there is no prior disclosure in the script description or usage text that running the tool will change version-control ignore rules.

Content

No source excerpt is available for this finding.