Back to skill

Security audit

Env Doctor

Security checks for vulnerabilities and agentic risk

Overview

This is a local .env checking skill that reads files the user points it at and does not show evidence of hidden transmission, persistence, or destructive behavior.

Install only if you are comfortable with the agent reading the specific .env files you ask it to check. Treat terminal and JSON reports as sensitive, especially in CI, because malformed lines may be echoed in output.

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
scripts/env_doctor.py:116
Finding

Malformed Environment Lines May Disclose Secrets in Reports

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (17)

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 · SKILL.md (reported line 3)May include surrounding context.

md
#!/usr/bin/env python3
"""Env file doctor — validate .env files, detect leaked secrets, find duplicates and issues.

Usage:
    env_doctor.py <envfile> [--example EXAMPLE] [--json] [--strict]

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 · SKILL.md (reported line 8)May include surrounding context.

md
#!/usr/bin/env python3
"""Env file doctor — validate .env files, detect leaked secrets, find duplicates and issues.

Usage:
    env_doctor.py <envfile> [--example EXAMPLE] [--json] [--strict]

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

md
#!/usr/bin/env python3
"""Env file doctor — validate .env files, detect leaked secrets, find duplicates and issues.

Usage:
    env_doctor.py <envfile> [--example EXAMPLE] [--json] [--strict]

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 · SKILL.md (reported line 14)May include surrounding context.

md
#!/usr/bin/env python3
"""Env file doctor — validate .env files, detect leaked secrets, find duplicates and issues.

Usage:
    env_doctor.py <envfile> [--example EXAMPLE] [--json] [--strict]

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 · SKILL.md (reported line 15)May include surrounding context.

md
#!/usr/bin/env python3
"""Env file doctor — validate .env files, detect leaked secrets, find duplicates and issues.

Usage:
    env_doctor.py <envfile> [--example EXAMPLE] [--json] [--strict]

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 · SKILL.md (reported line 22)May include surrounding context.

md
#!/usr/bin/env python3
"""Env file doctor — validate .env files, detect leaked secrets, find duplicates and issues.

Usage:
    env_doctor.py <envfile> [--example EXAMPLE] [--json] [--strict]

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/env_doctor.py (reported line 2)May include surrounding context.

python
#!/usr/bin/env python3
"""Env file doctor — validate .env files, detect leaked secrets, find duplicates and issues.

Usage:
    env_doctor.py <envfile> [--example EXAMPLE] [--json] [--strict]

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/env_doctor.py (reported line 9)May include surrounding context.

python
#!/usr/bin/env python3
"""Env file doctor — validate .env files, detect leaked secrets, find duplicates and issues.

Usage:
    env_doctor.py <envfile> [--example EXAMPLE] [--json] [--strict]

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/env_doctor.py (reported line 10)May include surrounding context.

python
#!/usr/bin/env python3
"""Env file doctor — validate .env files, detect leaked secrets, find duplicates and issues.

Usage:
    env_doctor.py <envfile> [--example EXAMPLE] [--json] [--strict]

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/env_doctor.py (reported line 11)May include surrounding context.

python
#!/usr/bin/env python3
"""Env file doctor — validate .env files, detect leaked secrets, find duplicates and issues.

Usage:
    env_doctor.py <envfile> [--example EXAMPLE] [--json] [--strict]

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/env_doctor.py (reported line 46)May include surrounding context.

python
#!/usr/bin/env python3
"""Env file doctor — validate .env files, detect leaked secrets, find duplicates and issues.

Usage:
    env_doctor.py <envfile> [--example EXAMPLE] [--json] [--strict]

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/env_doctor.py (reported line 235)May include surrounding context.

python
#!/usr/bin/env python3
"""Env file doctor — validate .env files, detect leaked secrets, find duplicates and issues.

Usage:
    env_doctor.py <envfile> [--example EXAMPLE] [--json] [--strict]

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/env_doctor.py (reported line 239)May include surrounding context.

python
#!/usr/bin/env python3
"""Env file doctor — validate .env files, detect leaked secrets, find duplicates and issues.

Usage:
    env_doctor.py <envfile> [--example EXAMPLE] [--json] [--strict]

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/env_doctor.py (reported line 240)May include surrounding context.

python
#!/usr/bin/env python3
"""Env file doctor — validate .env files, detect leaked secrets, find duplicates and issues.

Usage:
    env_doctor.py <envfile> [--example EXAMPLE] [--json] [--strict]

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/env_doctor.py (reported line 242)May include surrounding context.

python
#!/usr/bin/env python3
"""Env file doctor — validate .env files, detect leaked secrets, find duplicates and issues.

Usage:
    env_doctor.py <envfile> [--example EXAMPLE] [--json] [--strict]

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
82% confidence
Finding

The skill advertises file-reading behavior over potentially sensitive .env files but does not declare any explicit tool scope or permissions boundaries. That makes the capability less auditable and increases the risk that an agent may invoke the skill on secrets-bearing files without clear user-visible constraints.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad enough to match many common requests about configuration, secrets, or validation, which can cause over-invocation of a skill that reads sensitive environment files. In a secrets-focused skill, overly broad routing increases exposure risk even if the underlying purpose is legitimate.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.