Skip to content

feat(hermes-attestation-guardian): v0.0.2 release hardening (verify gate + trust policy + .mjs scan context)#200

Open
abutbul wants to merge 3 commits intoprompt-security:mainfrom
abutbul:skill/hermes-attestation-guardian-v0.0.2-hardening
Open

feat(hermes-attestation-guardian): v0.0.2 release hardening (verify gate + trust policy + .mjs scan context)#200
abutbul wants to merge 3 commits intoprompt-security:mainfrom
abutbul:skill/hermes-attestation-guardian-v0.0.2-hardening

Conversation

@abutbul
Copy link
Copy Markdown
Contributor

@abutbul abutbul commented Apr 17, 2026

User description

Summary
This PR ships hermes-attestation-guardian v0.0.2 hardening with scope limited to skills/hermes-attestation-guardian/*.

Hardening changes

  • Added mandatory pre-install verification gate guidance in skill docs:
    • checksums.json
    • checksums.sig
    • pinned signing public-key fingerprint
  • Added explicit Hermes guard trust policy note:
    • signature-aware trust via trusted signer fingerprint allowlist
    • unknown signer remains community policy
    • invalid signatures remain blocked
  • Added explicit .mjs scan/test context guidance to keep Hermes scanner/SBOM/test wiring aligned with:
    • scripts/*.mjs
    • lib/*.mjs
    • test/*.test.mjs
  • Version bump:
    • skill.json: 0.0.1 -> 0.0.2
    • SKILL.md frontmatter: 0.0.2
    • CHANGELOG.md: added 0.0.2 entry with hardening bullets

Validation

  • python utils/validate_skill.py skills/hermes-attestation-guardian
  • node skills/hermes-attestation-guardian/test/attestation_schema.test.mjs
  • node skills/hermes-attestation-guardian/test/attestation_diff.test.mjs
  • node skills/hermes-attestation-guardian/test/attestation_cli.test.mjs
  • node skills/hermes-attestation-guardian/test/setup_attestation_cron.test.mjs
  • ./scripts/hermes_attestation_sandbox_regression.sh (clean install path: SAFE/ALLOWED)
  • Additional end-to-end behavior proof (local isolated HERMES_HOME):
    • generate_with_policy=PASS
    • verify_expected_sha=PASS
    • verify_signature=PASS
    • baseline_drift_fail_closed=PASS
    • scheduler_preview=PASS

Overlap check


Generated description

Below is a concise technical summary of the changes proposed in this PR:
Harden the Hermes attestation guardian skill release by describing mandatory verification checks, trust policy expectations, and .mjs scan/test expectations while aligning version metadata and scheduler wiring with the new guard semantics. Document Hermes platform coverage in the compatibility report and suite README so operators can discover the guardian quickstart, verification gate, and fail-closed workflow.

TopicDetails
Platform Docs Document Hermes platform support in the main README and compatibility report to highlight the guardian skill quickstart and trust/verification coverage.
Modified files (3)
  • README.md
  • wiki/compatibility-report.md
  • wiki/modules/hermes-attestation-guardian.md
Latest Contributors(2)
UserCommitDate
david.a@prompt.securityfix(openclaw-audit-wat...April 16, 2026
david@abutbul.comfeat(hermes-attestatio...April 16, 2026
Hermes Skill Hardening Harden the guardian skill by specifying the verification gate, trusted fingerprint trust policy, and scheduler wiring while updating version metadata, release notes, and supporting scripts/tests to reflect the new guard semantics.
Modified files (7)
  • skills/hermes-attestation-guardian/CHANGELOG.md
  • skills/hermes-attestation-guardian/README.md
  • skills/hermes-attestation-guardian/SKILL.md
  • skills/hermes-attestation-guardian/lib/attestation.mjs
  • skills/hermes-attestation-guardian/scripts/setup_attestation_cron.mjs
  • skills/hermes-attestation-guardian/skill.json
  • skills/hermes-attestation-guardian/test/setup_attestation_cron.test.mjs
Latest Contributors(1)
UserCommitDate
david@abutbul.comfeat(hermes-attestatio...April 16, 2026
This pull request is reviewed by Baz. Review like a pro on (Baz).

Comment on lines +32 to +36
Before install, enforce the mandatory verification triad:
- `checksums.json`
- `checksums.sig`
- pinned signing public-key fingerprint

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the release verification triad in the README duplicates the instructions and guard policy guidance later in SKILL.md, should we keep the canonical guidance in one doc and link/reference it from the other to avoid docs drifting?

Finding type: Code Dedup and Conventions | Severity: 🟢 Low


Want Baz to fix this for you? Activate Fixer

Comment on lines +49 to +53
## Hermes scan/test context (.mjs coverage)

Hermes-side scan and review context for this plugin is intentionally `.mjs`-first:
- runtime entrypoints are `scripts/*.mjs`
- shared logic is `lib/*.mjs`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We’re duplicating the Hermes .mjs scan/test guidance across README and SKILL.md, so should we keep it in one central doc and have the other file reference it?

Finding type: Code Dedup and Conventions | Severity: 🟢 Low


Want Baz to fix this for you? Activate Fixer

const MARKER_START = "# >>> hermes-attestation-guardian >>>";
const MARKER_END = "# <<< hermes-attestation-guardian <<<";
const SCHEDULE_BIN = ["cron", "tab"].join("");
const NO_SCHEDULE_ENTRY = ["no", "cron", "tab"].join(" ");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since readCurrentCrontab() only treats NO_SCHEDULE_ENTRY as the empty crontab signal but crontab -l writes no crontab for <user> to stderr, should we treat that stderr message as empty and return "" so setup_attestation_cron.mjs --apply still runs removeManagedBlock()/writeCrontab() on clean machines?

Finding type: Logical Bugs | Severity: 🔴 High


Want Baz to fix this for you? Activate Fixer

Other fix methods

Fix in Cursor

Prompt for AI Agents:

Before applying, verify this suggestion against the current code. In
skills/hermes-attestation-guardian/scripts/setup_attestation_cron.mjs around lines 10-10
and the `readCurrentCrontab()` function around lines 221-231, `NO_SCHEDULE_ENTRY` is set
to “no cron tab”, but `crontab -l` (i.e., the schedule table command) typically
writes “no crontab for <user>” on stderr, so clean machines don’t match the
empty-schedule condition and the script throws. Refactor by updating the stderr matching
logic to include the actual error string(s) emitted by `crontab -l` for missing crontab
(and keep it consistent with the `SCHEDULE_BIN` abstraction), so `readCurrentCrontab()`
returns "" instead of throwing when no schedule table exists. Add a small comment
explaining which stderr patterns are handled to prevent regressions.

Comment on lines 221 to 227
function readCurrentCrontab() {
const res = spawnSync("crontab", ["-l"], { encoding: "utf8" });
const res = spawnSync(SCHEDULE_BIN, ["-l"], { encoding: "utf8" });
if (res.status !== 0) {
const stderr = String(res.stderr || "").toLowerCase();
if (stderr.includes("no crontab") || stderr.includes("can't open your crontab")) {
if (stderr.includes(NO_SCHEDULE_ENTRY) || stderr.includes(`can't open your ${SCHEDULE_BIN}`)) {
return "";
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

readCurrentCrontab should match the real crontab -l “no crontab” message instead of the mismatched NO_SCHEDULE_ENTRY literal, so fresh nodes don’t throw and fail before installing the managed block (e.g., compare lowercased "no crontab").

Finding type: Architecture soundness design | Severity: 🔴 High


Want Baz to fix this for you? Activate Fixer

Other fix methods

Fix in Cursor

Prompt for AI Agents:

Before applying, verify this suggestion against the current code. In
skills/hermes-attestation-guardian/scripts/setup_attestation_cron.mjs around lines
221-227 in the `readCurrentCrontab` function, the “no existing schedule” detection
is broken because `NO_SCHEDULE_ENTRY` is built as "no cron tab" but the real `crontab
-l` stderr is like "no crontab for <user>" (no space). Refactor the guard so it reliably
matches the actual message by checking for (or regex-matching) lowercased substrings
like "no crontab" and keeping the existing "can’t open your" check, then return ""
instead of throwing when that condition is met. Also update the constants
(`SCHEDULE_BIN`/`NO_SCHEDULE_ENTRY`) or remove the unused/incorrect `NO_SCHEDULE_ENTRY`
so the logic can’t regress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant