Back to skill

Security audit

backup-optimizer

Security checks for vulnerabilities and agentic risk

Overview

The skill only generates a packaging plan, but it deliberately puts credential files into deployment bundles without safeguards, which could lead users to distribute secrets.

Review before installing or using. This skill does not appear to steal data or run a backdoor, but its default guidance can cause private keys, service-account credentials, .env files, or other secrets to be included in deployment artifacts. Use it only after changing the workflow to exclude raw secrets by default and rely on a secret manager or runtime injection instead.

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
script/plan.py:15
Finding

Sensitive Credentials Included in General Deployment Packaging Plans

Content
View full analysis

Vulnerability Details

File Location: script/plan.py, lines 15-18 and 31-37; supporting instructions in SKILL.md, lines 18-21
Vulnerability Type: Sensitive credential propagation through deployment artifacts
Risk Level: Medium

Vulnerable Code

python
if ftype in ('environment', 'credentials', 'configuration'):
    env_config_files.append(f)
    print(f"  [ENV-CONFIG] {fpath} ({ftype})")
elif ftype == 'ci-cd':
python
if env_config_files:
    plan["packages"].append({
        "package_name": "environment-config-bundle",
        "description": "Environment files, credentials, and configuration for deployment consistency. Includes .env, config files, credential files, and database configs.",
        "files": [f["path"] for f in env_config_files],
        "rationale": "Configuration files must travel with deployment to ensure environment consistency. This bundle includes all environment variables, credentials, and service account keys needed at runtime."
    })

The supporting Skill instructions explicitly require credential files such as private keys and service-account JSON files to be included in the configuration package.

Technical Analysis

The implementation treats entries classified as credentials identically to ordinary environment and configuration files. Their paths are placed in environment-config-bundle, which is expressly designed for consumption by a downstream deployment packager.

This design violates least privilege and secure secret-management principles. Private keys, environment files, and service-account credentials commonly have narrower access requirements than application configuration. Combining them into a general deployment bundle increases the number of systems, artifacts, and operators that may gain access to those credentials.

The script itself only generates a JSON plan: it does not read credential contents, create an archive, transmit data, ...[truncated 1605 chars]

Remediation
View remediation

Remediation Suggestions

  1. Exclude entries classified as credentials from deployment bundles by default.
  2. Replace secret file paths with references to an approved secret manager, workload identity, or runtime secret-injection mechanism.
  3. Separate non-sensitive configuration from secrets using distinct package types and access policies.
  4. Require an explicit allowlist for every file eligible for packaging.
  5. Canonicalize and validate all paths, then reject paths outside the declared project directory.
  6. Reject high-risk secret formats such as .pem, .key, .env, and service-account key files unless an authorized exceptional workflow explicitly approves them.
  7. Require downstream packagers to independently enforce secret exclusions rather than blindly trusting the generated plan.
  8. Apply least-privilege permissions, encryption, retention limits, and audit logging to any exceptional secret-distribution process.
  9. Update SKILL.md so it instructs users to deploy secret references rather than raw credential files.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly instructs bundling credential files such as .pem, .key, and service-account.json into deployment packages. This normalizes secret propagation through build artifacts, increasing the chance of credential leakage via artifact stores, CI logs, package sharing, or downstream environments; in the deployment-packaging context, this is especially dangerous because such artifacts are commonly replicated and broadly accessible.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The instructions semantically direct the inclusion of secrets and credential-bearing files in standard deployment packaging workflows. Because the skill’s purpose is to optimize what gets shipped, this creates a direct path for sensitive material to be copied, archived, distributed, and retained far beyond its intended scope, making compromise of build systems or artifacts far more damaging.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file forces a specific language for the skill description and operational guidance, but provides no user opt-in or explanation that the skill is intentionally region- or locale-specific. This can violate language or locale policy when users are not given a choice.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill explicitly groups files typed as credentials together with environment and configuration files and states that the deployment bundle should include credentials and service account keys needed at runtime. In a backup/deployment-planning context, this encourages creation of artifacts containing secrets, which materially increases the risk of credential leakage, over-broad distribution, and persistence of sensitive keys in package stores or CI artifacts.

Content

No source excerpt is available for this finding.

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 · script/plan.py (reported line 27)May include surrounding context.

python
plan = {
        "project_path": project_dir,
        "plan_timestamp": __import__('datetime').datetime.now().isoformat(),
        "packages": []
    }

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The plan description and rationale normalize inclusion of credential files and service account keys without any warning, gating, or safeguards around handling sensitive data. In this skill's deployment-packaging context, that omission makes accidental secret exfiltration more likely because downstream users may treat the generated bundle as routine build output and store or transmit it insecurely.

Content

No source excerpt is available for this finding.