← Về thư mục
📄 / / root / .hermes / skills / devops / repo-sync-secret-guard / SKILL.md

name: repo-sync-secret-guard category: devops description: Git sync and pre-commit guardrails for Hermes/CEO repos, with emphasis on secret detection that avoids false positives in public research artifacts.


Repo Sync & Secret Guard

Use this skill when maintaining Git-backed Hermes/CEO repositories that are auto-synced, committed by cron, or protected by pre-commit secret scanning.

When to use

Core principles

  1. Prefer high-confidence secret detection over broad keyword blocking.
  2. Do not block on generic strings like api_key, token, or secret alone.
  3. Block on concrete token formats or a sensitive key name paired with a real-looking secret value.
  4. Do not blindly exclude research source artifacts.
  5. Files under content/research/**/sources/** may be noisy, but they are often important evidence and should remain in policy.
  6. If they contain secret-like strings, handle them with pattern quality, not path-based blanket exemptions.
  7. Cron sync must be silent on no-op and explicit on failure.
  8. No changes: exit 0 and print a quiet/success marker if needed.
  9. Hook failure or commit failure: surface the exact offending path and pattern class.
  10. Treat auto-sync as a pipeline, not a single command.
  11. Stash, pull/rebase, restore stash, stage, secret-guard, commit, push.
  12. Verify the actual failing step before editing the script.
  1. Inspect the failing job output and reproduce locally.
  2. Run the sync script with tracing if necessary to identify the exact failing command.
  3. Test the commit path separately from the push path.
  4. If pre-commit is the blocker, tighten the hook before changing the cron job.
  5. Re-run the sync end-to-end and confirm the exit code is zero.

Secret-detection policy

Prefer blocking on

Avoid

Pitfalls

Verification

Linked notes