本文へ移動
cccskills
無料GitHub で公開

sovereign-audit

Produce a single consolidated hardening report for the DSH node. Runs audit.sh, dome-check.sh, and machine-probe.py, parses their outputs, and writes one markdown file listing every passing check, every failure with a specific remediation command, and a top-line verdict (ALL GREEN / N ISSUES). Non-destructive — reads only, no auto-fix.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md6.6 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

You are producing a single human- and AI-readable report on the DSH node's current hardening posture. The three subcomponent scripts (audit.sh, dome-check.sh, machine-probe.py) each surface their own findings; this skill's job is to merge them into one authoritative view with specific remediation for every gap.

1. Run the three probes in order

cd "$DOME_ROOT"
TS=$(date -u +%Y%m%dT%H%M%SZ)
OUT="logs/sovereign-audit-$TS.md"
mkdir -p logs

# Fresh machine probe first (dome-check depends on it)
.venv/bin/python scripts/machine-probe.py > /tmp/audit-probe.out 2>&1

# Security audit (read-only)
bash scripts/audit.sh > /tmp/audit-audit.out 2>&1

# Full protocol check (may auto-fix screen-lock + DNS; that's intended)
bash scripts/dome-check.sh > /tmp/audit-dome-check.out 2>&1 || true

Note: dome-check.sh exits non-zero if any protocol fails, which is fine — we want the report, not a hard exit.

2. Parse the machine profile

import json, sys
sys.path.insert(0, "$DOME_ROOT")
from agents.core.machine import get_profile, summary_one_liner, security_posture

profile = get_profile()
line = summary_one_liner()
posture = security_posture()

Fields you'll quote in the report:

  • summary_one_liner() → one-line machine identity
  • profile["tier"] → sovereign/guardian/scout/seed
  • profile["storage"]["filevault"]
  • profile["security"] → all the posture flags
  • profile["runtime"] → Python/Node/Ollama/Docker versions

3. Parse the audit output

audit.sh emits ✅ / ❌ / ⚠️ lines. Count them and bucket by category:

from pathlib import Path
import re

audit_text = Path("/tmp/audit-audit.out").read_text()
passes = re.findall(r"^✅ (.+)$", audit_text, re.M)
fails  = re.findall(r"^❌ (.+)$", audit_text, re.M)
warns  = re.findall(r"^⚠️  ?(.+)$", audit_text, re.M)

4. Parse the dome-check output

Same pattern but dome-check also includes auto-fixes:

dc_text = Path("/tmp/audit-dome-check.out").read_text()
dc_passes = re.findall(r"^✅ (.+)$", dc_text, re.M)
dc_fails  = re.findall(r"^❌ (.+)$", dc_text, re.M)
dc_fixed  = re.findall(r"^🔧 (.+)$", dc_text, re.M)

Extract the summary counts from the trailing block:

m = re.search(r"Passed:\s+(\d+).*Fixed:\s+(\d+).*Failed:\s+(\d+)", dc_text, re.S)

5. Build the remediation table

For every failure, attach the exact fix command. The known mappings:

Failed checkRemediation
Firewall OFFsudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on
Stealth mode OFFsudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode on
FileVault OFFManual: System Settings → Privacy & Security → FileVault
SIP disabledManual: reboot into Recovery → csrutil enable
Screen lock OFFdefaults write com.apple.screensaver askForPassword -int 1 && defaults write com.apple.screensaver askForPasswordDelay -int 0
No GPG keybash scripts/sovereign-secrets.sh
pass store not initializedbash scripts/sovereign-secrets.sh
Git commit signing OFFgit config --global commit.gpgsign true
DNS → <not 127.0.0.1>sudo networksetup -setdnsservers Wi-Fi 127.0.0.1 && sudo brew services start dnscrypt-proxy
dnscrypt-proxy not runningsudo brew services start dnscrypt-proxy
Python import errorssource .venv/bin/activate && pip install -r compute/requirements.txt
TypeScript errorspnpm install && pnpm typecheck (review errors)
SQLite DB missingpython3 scripts/register-claude.py
ChromaDB emptypython3 scripts/ingest.py
N uncommitted change(s)git -C "$DOME_ROOT" status then review & commit
.env NOT in .gitignoreecho '.env' >> .gitignore && git add .gitignore && git commit -m 'chore: gitignore .env'

For any failure not in this table, return "Manual review — see logs/sovereign-audit-<timestamp>.md"

6. Write the report

Structure (emit to $OUT which is logs/sovereign-audit-<timestamp>.md):

# DSH Sovereign Audit — <ISO-8601 timestamp>

## Verdict
<ALL GREEN> | <N ISSUES REQUIRE MANUAL ACTION>

## Node
`<summary_one_liner output>`

Tier: **<tier>**

## Security posture
| Control | State |
|---|---|
| FileVault | ✅ / ❌ |
| SIP | ✅ / ❌ |
| Gatekeeper | ✅ / ❌ |
| Firewall | ✅ / ❌ |
| Private DNS | ✅ / ❌ |
| Secrets backend | ✅ / ❌ |

## Passes
- <count> from audit.sh
- <count> from dome-check.sh

## Failures (if any)
| Check | Source | Fix |
|---|---|---|
| <failure> | audit.sh | <command> |
| <failure> | dome-check | <command> |

## Auto-fixed during this run
- <list from dome-check's 🔧 lines>

## Runtime
- Python: <version>
- Node: <version>
- Ollama: <running? yes/no>
- Docker: <present? yes/no>

## Source outputs
- `/tmp/audit-audit.out` — 100 lines, ended <exit code>
- `/tmp/audit-dome-check.out` — <X> lines, ended <exit code>
- `/tmp/audit-probe.out` — machine-probe summary

## Next action
<one sentence — what the user should do first>

Save, print the path, and emit a 2-line summary to stdout for the calling agent:

✅ Audit complete: logs/sovereign-audit-<timestamp>.md
<0/N issues>

7. When the report is used downstream

Other skills may call this skill and parse the first two lines of the markdown:

  • Line 1: # DSH Sovereign Audit — ...
  • Line 2: the verdict paragraph (ALL GREEN or N ISSUES REQUIRE MANUAL ACTION)

Keep those two lines machine-parseable. Everything else in the report is human prose.

Non-negotiables

  • Never auto-fix. This skill is read-only. The remediation column is suggestions; the user or a separate skill runs them.
  • Never exfiltrate the report to a remote address. The audit contains the node's full security posture — it's sensitive to anyone but the owner.
  • Never skip failed parse cases. If dome-check.sh produced output in an unexpected format, flag it in the report rather than pretending it succeeded.
  • Never commit logs/sovereign-audit-*.md. logs/*.md is gitignored; reports accumulate locally and can be hand-archived if useful.
  • Never run this skill in parallel with sovereign-lockdown. Lockdown is writing state; audit is reading state. Sequencing matters.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

ai-sdk

無料

Vercel AI SDK expert guidance. Use when building AI-powered features — chat interfaces, text generation, structured output, tool calling, agents, MCP integration, streaming, embeddings, reranking, image generation, or working with any LLM provider.

日本語の概要は準備中です。原文の説明を表示しています。

garochee33/DSH42026年10月12日 更新

Algorithm design and analysis skill for DSH; use when working on optimization, data structures, or computational procedures.

日本語の概要は準備中です。原文の説明を表示しています。

garochee33/DSH42026年10月12日 更新

Design and implement scalable API gateways, RESTful APIs, GraphQL endpoints, WebSocket handlers, and microservice communication patterns. Use when creating API routes, designing endpoints, implementing middleware, or setting up service mesh architectures.

日本語の概要は準備中です。原文の説明を表示しています。

garochee33/DSH42026年10月12日 更新

best-of-n

無料

Implement a task N ways in parallel and pick the best. Spawns multiple subagents in isolated worktrees, evaluates all candidates, and applies the winner. Use when asked to "best of n", "try multiple approaches", "parallel implementations", "/best-of-n", or "/bon".

日本語の概要は準備中です。原文の説明を表示しています。

garochee33/DSH42026年10月12日 更新

check

無料

Check your work with a verification subagent. Spawns a verifier that reviews diffs, runs builds and tests, and evaluates correctness. Use when asked to "check work", "verify changes", "self-verify", "/check", "/verify", "/check-work", or "/self-verify".

日本語の概要は準備中です。原文の説明を表示しています。

garochee33/DSH42026年10月12日 更新

CI/CD pipeline design, GitHub Actions workflows, deployment automation, infrastructure as code, and release management. Use when setting up CI/CD, automating deployments, configuring build pipelines, or managing releases.

日本語の概要は準備中です。原文の説明を表示しています。

garochee33/DSH42026年10月12日 更新

garochee33 のスキルをすべて見る

このスキルの問題を報告する