Back to skill

Security audit

hermes-attestation-guardian

Security checks for vulnerabilities and agentic risk

Overview

This Hermes security skill is coherent and disclosed, but users should treat its attestations and optional cron scheduling as sensitive operational features.

Install only for Hermes infrastructure. Verify the signed release first, review any watch_files and trust_anchor_files because their paths and hashes appear in attestations, protect ~/.hermes, avoid running scheduled jobs as root, preview cron entries before --apply, and do not leave --allow-unsigned enabled except for a short audited emergency window.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate_attestation.mjs:162
Finding

Checksum Sidecar Write Follows Symbolic Links

Content
View full analysis
.sha256` is a symbolic link, the program truncates and overwrites the link target with checksum text using the privileges of the account running the generator. Exploitation requires the attacker to be able to create or replace directory entries in the attestation output directory. The risk becomes more significant if the generator is invoked by a more privileged account or through a recurring scheduled job with `--write-sha256`. ### Attack Path 1. An attacker obtains write access to the attestation output directory. 2. The attacker creates `current.json.sha256` as a symbolic link to another file writable by the account that runs the Skill. 3. The operator or a scheduled process invokes: ```bash node scripts/generate_attestation.mjs --write-sha256 ``` 4. The generator calls `fs.writeFileSync()` on the symbolic-link path. 5. Node follows the link and truncates the target file. 6. The target is replaced with a line containing the generated digest and filename. ### Impact Assessment The vulnerability permits file corruption with the privileges of the invoking user. It does not independently provide arbitrary file contents or code execution because the written content is constrained to checksum text. However, it can overwrite any file that the in ...[truncated 380 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
lib/attestation.mjs:7
Finding

Generated Attestations Record an Incorrect Skill Version

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (24)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 21)May include surrounding context.

md
For standalone installs, verify the signed release manifest before trusting `SKILL.md`, `skill.json`, or the archive. The `skill.json` file is the package metad

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 90)May include surrounding context.

md
For standalone installs, verify the signed release manifest before trusting `SKILL.md`, `skill.json`, or the archive. The `skill.json` file is the package metad

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 37)May include surrounding context.

md
RELEASE_PUBKEY_SHA256="711424e4535f84093fefb024cd1ca4ec87439e53907b305b79a631d5befba9c8"

curl -fsSL "$BASE/checksums.json" -o "$TMP_DIR/checksums.json"
curl -fsSL "$BASE/checksums.sig" -o "$TMP_DIR/checksums.sig"
curl -fsSL "$BASE/signing-public.pem" -o "$TMP_DIR/signing-public.pem"
curl -fsSL "$BASE/$ZIP_NAME" -o "$TMP_DIR/$ZIP_NAME"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 110)May include surrounding context.

md
node scripts/generate_attestation.mjs

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 113)May include surrounding context.

md
node scripts/generate_attestation.mjs

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 193)May include surrounding context.

md
node scripts/generate_attestation.mjs

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 119)May include surrounding context.

md
node scripts/verify_attestation.mjs --input ~/.hermes/security/attestations/current.json

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 122)May include surrounding context.

md
node scripts/verify_attestation.mjs --input ~/.hermes/security/attestations/current.json

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 129)May include surrounding context.

md
node scripts/verify_attestation.mjs --input ~/.hermes/security/attestations/current.json

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 194)May include surrounding context.

md
node scripts/verify_attestation.mjs --input ~/.hermes/security/attestations/current.json

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 135)May include surrounding context.

md
node scripts/refresh_advisory_feed.mjs

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 147)May include surrounding context.

md
node scripts/refresh_advisory_feed.mjs

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 195)May include surrounding context.

md
node scripts/refresh_advisory_feed.mjs

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code reads the current crontab, removes a marker-delimited block, merges in a newly generated block, and writes the full result back to the user's crontab. Even if intended for legitimate operator automation, scheduled task persistence and overwrite behavior are high-risk because a compromised or misused skill can silently establish recurring execution, disrupt existing jobs, or create durable persistence on the host.

Content

No source excerpt is available for this finding.

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 · test/guarded_skill_verify.test.mjs (reported line 18)May include surrounding context.

js
return spawnSync(process.execPath, [setupScript, ...args], {
    cwd: skillRoot,
    encoding: "utf8",
    env: { ...process.env, ...env },
  });
}

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 · test/setup_advisory_check_cron.test.mjs (reported line 17)May include surrounding context.

js
return spawnSync(process.execPath, [setupScript, ...args], {
    cwd: skillRoot,
    encoding: "utf8",
    env: { ...process.env, ...env },
  });
}

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 · test/setup_attestation_cron.test.mjs (reported line 17)May include surrounding context.

js
return spawnSync(process.execPath, [setupScript, ...args], {
    cwd: skillRoot,
    encoding: "utf8",
    env: { ...process.env, ...env },
  });
}

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README states "Hermes-only" twice, which is a natural-language restriction to a specific platform/agent context. Under the policy for this audit, forced platform or locale-style constraints should be justified or presented as an explicit user opt-in; this text presents the restriction as mandatory without explanation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill declares no explicit tool scope or permission boundaries even though its documented behavior requires environment access, file reads/writes, network fetches, and shell execution. In an agent ecosystem, this creates unnecessary ambient authority and makes it harder for operators or policy engines to restrict what the skill may do, increasing the blast radius if the skill is misused or modified.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The attestation builder collects and emits host-level details such as hostname, platform, architecture, Hermes home path, config source path, and fingerprints of configured files. In a security attestation skill this may be operationally useful, but it still expands collection beyond minimal drift evidence and can disclose sensitive local-environment metadata if the attestation is shared, logged, or exfiltrated.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

buildAttestation() silently reads process environment, local Hermes configuration files, feed verification state, and arbitrary watch/trust-anchor file paths, then serializes the results into the attestation. Even though this is consistent with the skill's purpose, the lack of user-facing disclosure or consent creates a privacy and data-exposure risk because operators may not realize local state and file fingerprints are being harvested and emitted.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The file invokes an external scheduler binary via spawnSync to list and install scheduled jobs. In an attestation-focused skill, scheduler manipulation expands the trust boundary and creates an execution/persistence capability unrelated to pure evidence collection, making abuse or accidental misconfiguration more dangerous.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The orchestration path can modify the user's crontab without any confirmation or warning in this file beyond optional preflight output. That makes destructive or persistent changes easy to perform non-interactively, increasing the chance of silent job loss, unintended persistence, or operator surprise if the skill is triggered in automation.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
lib/cron.mjs:116

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
test/attestation_cli.test.mjs:16

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
test/guarded_skill_verify.test.mjs:15

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
test/setup_advisory_check_cron.test.mjs:14

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
test/setup_attestation_cron.test.mjs:14