Companion to iter-30's mcp-policy.json. Hand-authored Merkle-style
manifest pinning the sha256 of the two security-critical files that
mcp-policy.json governs:
.harness/mcp-policy.json → sha256 (iter-30's MCP governance policy)
.claude/settings.json → sha256 (declares the claude-flow MCP server)
POSTURE IMPROVEMENT (verified end-to-end against metaharness@0.1.14)
BEFORE iter 32 AFTER iter 32
composite oia-audit low CLEAN ★
threat-model worst low (unpinned-deps info (only "no issues
dropped iter 31) found" info note)
mcp-scan findings 0 (iter 31 cleared) 0
L7 governance text "mcp-policy.json "mcp-policy.json
(witness missing)" (witness missing)"
★ Composite worst severity now CLEAN — ruflo's audit pipeline reports
zero non-info findings. iter-7 + 27 + 30 + 31 + 32 closed the full
loop: instrumentation found a HIGH, fix-cycle drove it down to
clean over five iterations.
THE WITNESS GAP (intentionally not closed in this iter)
The OIA "implementation" note still reads "mcp-policy.json (witness
missing)". A witness.json would require Ed25519 signing the manifest,
which needs a WITNESS_SIGNING_KEY (64-char hex). Ruflo's existing
brain-signing-key in GCP is in a different format (89 chars). Three
options documented in .harness/README.md:
1. Provision a new GCP secret `witness-signing-key` (32 random
bytes hex). Requires explicit user authorization — creates a
new long-lived secret. NOT done in this iter.
2. Use a hardware key (YubiKey / Sigstore ephemeral identity).
3. Skip the witness — keep the "(witness missing)" note. Threat
model + mcp-scan are already CLEAN; the witness only signs the
manifest, doesn't add new security controls.
Current state is option 3 by default. Switch to (1) or (2) when
external manifest-verification becomes needed.
SMOKE STEP 17u
- manifest.json exists + parses
- Both security-critical files fingerprinted with valid 64-hex sha256
- README.md exists + documents witness-signing-key option
- ADR-150 anchor present in README
Smoke: 36 → 37. Fleet: 33/33.
Co-Authored-By: RuFlo <ruv@ruv.net>
3.9 KiB
.harness/ — ruflo's MetaHarness lifecycle directory
This directory holds the files that harness <subcommand> from metaharness reads to assess ruflo's governance posture. See ADR-150 for context.
Contents
| File | Purpose | Iter |
|---|---|---|
mcp-policy.json |
MCP governance policy. ADR-022 default-deny, audit-log on, dangerous-pattern list, per-turn call budget. Required to clear the no-policy HIGH finding from harness mcp-scan. |
30 |
manifest.json |
Hand-authored harness identity manifest: hosts + sha256 fingerprints of the security-relevant files (mcp-policy + .claude/settings). Required input for harness sign and for OIA-manifest's mcpPolicyPath field. |
32 |
witness.json |
NOT YET CREATED. Ed25519-signed Merkle-style witness over the manifest. Would push OIA governance from "full / mcp-policy.json (witness missing)" to "full / mcp-policy.json + witness ADR-011". See below. | — |
Witness — what's needed to ship it
harness sign . produces a witness from .harness/manifest.json BUT requires WITNESS_SIGNING_KEY (64-char hex Ed25519 private key) in the environment. Ruflo's existing brain-signing-key in GCP Secret Manager is in a different format (89 chars, not hex) and can't be reused.
To enable witness signing, one of:
-
Create a new GCP secret
witness-signing-key(32 random bytes, hex-encoded). Fetched via Workload Identity Federation in CI; locally viagcloud secrets versions access. Pros: same auth path as the existing OPENROUTER_API_KEY workflow. Cons: requires explicit user authorization (creates a new sensitive secret). -
Use a hardware key (YubiKey, Sigstore-style ephemeral identity). Pros: no long-lived private key on disk. Cons: more CI plumbing.
-
Skip the witness and accept the "partial witness" note in the OIA manifest. The threat-model and mcp-scan are already CLEAN without it; the witness only signs the manifest, it doesn't itself add new security controls.
Current state (option 3) gives ruflo:
- ✓ L7 governance alignment: full (per
harness oia-manifest) - ✓ threat-model worst severity: info / clean
- ✓ mcp-scan: 0 actionable findings
- The implementation note:
"mcp-policy.json (witness missing)"
The witness is genuinely optional unless an external party needs to verify the manifest hasn't been tampered with. For ruflo's internal use it's nice-to-have polish.
Verifying ruflo's current posture
# Full threat report
npx -y -p metaharness@latest harness threat-model .
# Per-server MCP scan
npx -y -p metaharness@latest harness mcp-scan .
# Full OIA layer alignment
npx -y -p metaharness@latest harness oia-manifest .
# Or via ruflo's wrappers (no metaharness install required if optional dep is present)
npx ruflo metaharness threat-model
npx ruflo metaharness mcp-scan
npx ruflo metaharness oia-audit --dry-run
Updating mcp-policy.json
If you change mcp-policy.json, regenerate the manifest's sha256 entry:
node -e "
const { readFileSync, writeFileSync } = require('node:fs');
const { createHash } = require('node:crypto');
const m = JSON.parse(readFileSync('.harness/manifest.json', 'utf-8'));
m.files['.harness/mcp-policy.json'] = createHash('sha256').update(readFileSync('.harness/mcp-policy.json')).digest('hex');
m.files['.claude/settings.json'] = createHash('sha256').update(readFileSync('.claude/settings.json')).digest('hex');
m.generated_at = new Date().toISOString();
writeFileSync('.harness/manifest.json', JSON.stringify(m, null, 2) + '\n');
console.log('Manifest updated.');
"
Smoke step 17t (in plugins/ruflo-metaharness/scripts/smoke.sh) locks the policy invariants. If you change the policy in a way that violates defaultDeny:true / auditLog:true / requireApprovalForDangerous:true or removes the toolTimeoutMs/maxToolCallsPerTurn positive-number requirements, CI will fail.