본문으로 건너뛰기
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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Docker
설치 방법 보기

포함된 파일(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.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

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의 스킬 모두 보기

이 스킬의 문제 신고