agentleFS
Hashi-Ai-DevHashi-Ai-Dev/HermitDoc/skills/hermes-security/SKILL.md

hermes-security

Skill4 starsChanged 7 months agoMITView on GitHub

Use when configuring security settings, command approvals, secret management, or sandboxing. Covers: approvals mode, YOLO mode, secret redaction, PII redaction, shell hooks allowlist, sandboxing, command safety, credential security, security config. Triggers on: security, approval, YOLO, secret, redaction, sandbox, safe, dangerous, permissions.

  • Reads credentials
  • Deletes or force-pushes

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Remove entries you don't trust:

    line 114
  2. Distinctive:

    Enable secret redaction: if sharing logs

    line 201
  3. Distinctive:

    Use credential pools: instead of single keys

    line 203

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Hermes Security Reference

Complete guide to Hermes security configuration and best practices.

Security Model Overview

Hermes has layered security:

  1. Command approval — prompt before dangerous commands
  2. Secret redaction — mask API keys in logs
  3. PII redaction — protect user data in context
  4. Shell hooks allowlist — control hook execution
  5. Sandboxing — isolate tool execution

Command Approvals

Modes

ModeBehaviorWhen to use
manualAlways prompt before flagged commandsDefault, recommended
smartAuto-approve low-risk, prompt on high-riskTrust some commands
offSkip all promptsNever in production

Configuration

# config.yaml
approvals:
  mode: "manual"  # manual | smart | off

# Or via CLI
hermes config set approvals.mode smart

Destructive Commands (always flagged)

  • rm -rf or rm -r /*
  • git reset --hard
  • mkfs or dd with device target
  • pkill -f or kill -9 on system processes
  • Deleting /etc, /var, /home

Per-Invocation Bypass

# Single session with no approvals
hermes --yolo

# Or in config
export HERMES_YOLO_MODE=1

[!WARNING] Never use --yolo or mode: off in production.

Secret Redaction

Prevents API keys and tokens from appearing in conversation logs:

# Enable
hermes config set security.redact_secrets true

# Restart required — changes don't apply mid-session

With redaction enabled, strings matching these patterns are masked:

  • sk-... (OpenAI, Anthropic)
  • sk-or-... (OpenRouter)
  • Bearer ...
  • api_key=...
  • token=...
  • Long alphanumeric strings matching API key format

[!NOTE] Redaction must be enabled at startup. Toggling mid-session has no effect.

PII Redaction

Separate from secret redaction. Hashes user IDs and strips phone numbers:

# Enable
hermes config set privacy.redact_pii true

# Disable (default)
hermes config set privacy.redact_pii false

Shell Hooks Allowlist

Some shell-hook integrations require explicit allowlisting:

  • First time a hook wants to run, Hermes prompts interactively
  • Decisions stored in ~/.hermes/shell-hooks-allowlist.json
  • Review periodically:
    cat ~/.hermes/shell-hooks-allowlist.json

Remove entries you don't trust:

# Edit the allowlist
nano ~/.hermes/shell-hooks-allowlist.json

Credential Security

API Keys

Store in ~/.hermes/.env, never in config.yaml:

# In .env
ANTHROPIC_API_KEY=sk-ant-...
OPENROUTER_API_KEY=sk-or-...

# In config.yaml (reference only)
model:
  api_key: "${ANTHROPIC_API_KEY}"

Credential Pools

Rotate across multiple API keys automatically:

hermes auth add                # add more credentials
hermes auth list              # see all
hermes auth remove P INDEX    # remove one
hermes auth reset PROVIDER     # clear exhaustion

File Permissions

# Secure your Hermes home
chmod 700 ~/.hermes/
chmod 600 ~/.hermes/config.yaml
chmod 600 ~/.hermes/.env
chmod 600 ~/.hermes/auth.json

Sandboxing

Isolate tool execution in containers:

# Check sandbox status
hermes sandbox status

# Enable sandboxing (if supported)
hermes config set sandbox.enabled true

Sandboxing limits:

  • File system access (scoped to project)
  • Network access (configurable)
  • Process execution (containerized)

Security Configuration Template

security:
  # Redact API keys from logs
  redact_secrets: true
  
  # Enable content filtering
  tirith_enabled: false
  
  # Block specific URLs
  website_blocklist:
    - "https://malicious-site.com"

privacy:
  # Hash user IDs, strip phone numbers
  redact_pii: false

approvals:
  # Prompt before dangerous commands
  mode: "manual"  # manual | smart | off

Best Practices

  1. Never use --yolo in production
  2. Keep approvals.mode: manual for sensitive environments
  3. Enable secret redaction if sharing logs
  4. Review shell hooks allowlist regularly
  5. Use credential pools instead of single keys
  6. Set proper file permissions on config and .env
  7. Don't commit secrets to version control

Security Checklist

  • approvals.mode set to manual or smart
  • security.redact_secrets enabled (if sharing logs)
  • API keys in .env, not in config.yaml
  • File permissions correct: chmod 600 on sensitive files
  • Shell hooks allowlist reviewed
  • No --yolo in production
  • Regular hermes doctor checks

References

Structured reference docs:

  • Config Reference — Security config schema
  • Secrets Redaction — API key protection
  • Best Practices — Security guidelines

Related skills:

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.