Back to skill

Security audit

Phy Dotenv Inheritance Mapper

Security checks for vulnerabilities and agentic risk

Overview

The skill is a local dotenv analyzer, but it can expose real secrets by reading and printing full .env values in its reports.

Install only if you are comfortable with the agent reading dotenv files in the target project. Avoid running it on repositories with real production secrets unless you first remove or redact values, and do not paste or share generated reports that contain raw environment values.

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
SKILL.md:145
Finding
Raw Environment Secrets May Be Exposed in Generated Reports## Vulnerability Details **File Location**: `SKILL.md`, lines 145–154; report behavior demonstrated at lines 259–268 **Vulnerability Type**: Plaintext sensitive-data exposure **Risk Level**: High ### Vulnerable Code The parsing instructions extract and retain complete plaintext values from every discovered environment file: ```bash # Parse a single .env file (handles comments, blank lines, quoted values) parse_env_file() { local file="$1" local source_label="$2" grep -E "^[A-Za-z_][A-Za-z0-9_]*=" "$file" 2>/dev/null | while IFS= read -r line; do key="${line%%=*}" value="${line#*=}" echo "$key|$value|$source_label" done } ``` The generated-report example explicitly places those values into a full variable map: ```markdown ### Full Variable Map | Variable | .env | .env.local | .env.staging | .env.production | .env.example | Effective (dev) | Status | |----------|------|------------|--------------|-----------------|--------------|-----------------|--------| | DATABASE_URL | ✓ postgres://localhost | ✓ **postgres://dev-db** | ✓ postgres://stg | ✓ postgres://prod | ✓ placeholder | .env.local | ✅ OK | | STRIPE_SECRET_KEY | ✓ sk_test_xxx | — | ✓ sk_test_stg | ✓ sk_live_xxx | ✓ placeholder | .env (base) | 🔴 .env not gitignored! | ``` ### Technical Analysis Reading environment-variable definitions is necessary for the declared inheritance-analysis functionality. Reading, retaining, and reproducing their complete values is not necessary to determine precedence, presence, conflicts, or missing definitions. The Skill extracts everything after the first equals sign and emits it as part of an intermediate record. Its output template then instructs the Agent to include values from `.env`, `.env.local`, staging, and production files in a report. These files commonly contain API tokens, passwords, private keys, authenticated database URLs, session secrets, and production service credentials. ...[truncated 2022 chars]
Remediation
## Remediation Suggestions 1. **Remove plaintext values from reports by default.** Report only variable names, defining files, override order, presence, and status. 2. **Do not place complete values in Agent context.** Perform parsing and comparison locally where possible, returning only sanitized metadata. 3. **Redact all values consistently.** Sensitive-name heuristics alone are insufficient because arbitrary names and URLs may contain credentials. Use output such as `[REDACTED]`, optionally with non-sensitive metadata such as value length or type. 4. **Use ephemeral hashes for conflict detection.** Compare locally generated keyed hashes when determining whether two definitions differ. Do not print hashes, use unsalted reusable hashes, or retain comparison material after the scan. 5. **Minimize file access.** Exclude `.env.local`, `.env.*.local`, and production environment files by default. Require explicit user authorization before accessing them. 6. **Make value display an explicit per-variable opt-in.** Present a clear disclosure warning and never offer bulk plaintext output. 7. **Sanitize URLs and connection strings.** Remove usernames, passwords, tokens, query parameters, and other embedded credentials before displaying them. 8. **Add output-safety requirements to the Skill.** Explicitly prohibit reproduction of secrets in final answers, diagnostics, examples based on user data, tool traces, and generated files. 9. **Recommend credential rotation after accidental disclosure.** If a report has already exposed real values, affected credentials should be revoked or rotated and retained copies of the report should be removed where possible.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (65)

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
---
name: Dotenv Inheritance Mapper
description: Maps your full .env inheritance chain into a single resolved view. Reads all .env files (.env, .env.local, .env.example, .env.staging, .env.production, .env.test) in the correct override order, shows which layer each variable comes from, flags conflicts between environments, detects variables missing from .env.example, and identifies variables referenced in code that have no definition anywhere. Works for any framework or language. Zero external API — pure local file analysis. Triggers on "env inheritance", "which env file wins", "merge env files", "effective env values", "env override order", ".env chain", "/dotenv-mapper".
license: Apache-2.0
homepage: https://canlah.ai
metadata:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Static analysis

No suspicious patterns detected.