Back to skill

Security audit

Safe .env Manager

Security checks across malware telemetry and agentic risk

Overview

This is a disclosed local .env management helper; its sensitive file access matches its purpose, though users should avoid pasting real secrets into the example commands.

Install only if you want an agent to manage local .env files. Use it for key-only checks by default, approve set/unset operations deliberately, do not paste real secrets into visible command examples or chat transcripts, and periodically prune backup files after rotating sensitive values.

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 (3)

Credential Access

High
Category
Privilege Escalation
Content
- Check key exists:
  - `node {baseDir}/scripts/envsafe.js --file /home/node/.openclaw/.env exists OPENAI_API_KEY`
- Set/update key (safe stdin, default):
  - `printf '%s' 'NEW_VALUE' | node {baseDir}/scripts/envsafe.js --file /home/node/.openclaw/.env set OPENAI_API_KEY --stdin`
- Add new key with mandatory comment (recommended):
  - `printf '%s' 'NEW_VALUE' | node {baseDir}/scripts/envsafe.js --file /home/node/.openclaw/.env set NEW_PROVIDER_API_KEY --stdin --comment "Provider key for xxx integration"`
- Set only when missing:
Confidence
70% confidence
Finding
Although the skill prefers stdin over argv, the example uses `printf '%s' 'NEW_VALUE' | ... set ... --stdin`, which embeds the secret literal directly in the shell command. In real use, replacing NEW_VALUE with an actual secret can leak sensitive material into shell history, process audit trails, transcripts, or copied chat content, undermining the stated secret-safe posture.

Credential Access

High
Category
Privilege Escalation
Content
- Set/update key (safe stdin, default):
  - `printf '%s' 'NEW_VALUE' | node {baseDir}/scripts/envsafe.js --file /home/node/.openclaw/.env set OPENAI_API_KEY --stdin`
- Add new key with mandatory comment (recommended):
  - `printf '%s' 'NEW_VALUE' | node {baseDir}/scripts/envsafe.js --file /home/node/.openclaw/.env set NEW_PROVIDER_API_KEY --stdin --comment "Provider key for xxx integration"`
- Set only when missing:
  - `printf '%s' 'NEW_VALUE' | node {baseDir}/scripts/envsafe.js --file /home/node/.openclaw/.env set OPENAI_API_KEY --stdin --if-missing`
- Remove key:
Confidence
70% confidence
Finding
This example repeats the same unsafe demonstration pattern by embedding a would-be secret (`NEW_VALUE`) in the shell pipeline, even though the text claims secret-safe defaults. If users substitute a real API key, the value may be exposed in chat logs, terminal history, screenshots, or monitoring systems despite not being passed as a positional argv flag to the tool itself.

Credential Access

High
Category
Privilege Escalation
Content
- Add new key with mandatory comment (recommended):
  - `printf '%s' 'NEW_VALUE' | node {baseDir}/scripts/envsafe.js --file /home/node/.openclaw/.env set NEW_PROVIDER_API_KEY --stdin --comment "Provider key for xxx integration"`
- Set only when missing:
  - `printf '%s' 'NEW_VALUE' | node {baseDir}/scripts/envsafe.js --file /home/node/.openclaw/.env set OPENAI_API_KEY --stdin --if-missing`
- Remove key:
  - `node {baseDir}/scripts/envsafe.js --file /home/node/.openclaw/.env unset OPENAI_API_KEY`
- Lint format/duplicates:
Confidence
68% confidence
Finding
The `--if-missing` example still shows a secret literal being supplied via shell text. The underlying operation is legitimate, but the documentation pattern can train operators to handle secrets insecurely, causing accidental disclosure through operational artifacts.

VirusTotal

66/66 vendors flagged this skill as clean.

View on VirusTotal

Static analysis

No suspicious patterns detected.