Git镜像仓库审计与同步校验
git-mirror-audit
验证已配置的辅助 git 镜像是否存在,且未与主远程/默认分支发生偏离。
- License 许可
- MIT
- 所属仓库
- jmagly/aiwg
- 最近更新
- 2026-11-14
- Stars
- ★ 229
- Forks
- 36
01 前言 Front Matter
- name
- git-mirror-audit
- errors
- [ { "config-missing": "no remotes.secondary[] configured" }, { "remote-missing": "configured secondary remote does not exist in git remote" } ]
- ensures
- [ { "report": "mirror drift per configured secondary remote" }, { "exit-code": "non-zero when drift exists and --fail-on-drift is set" } ]
- requires
- [ { "git": "repository with remotes" }, { "config": ".aiwg/aiwg.config remotes.secondary[] entries" } ]
- namespace
- aiwg
- platforms
- [ "all" ]
- invariants
- [ "read-only audit; never pushes to mirrors", "backup-mirror semantics are reported separately from active replication" ]
- commandHint
- { "model": "haiku", "category": "maintenance", "modelRole": "efficiency", "modelTier": "economy", "allowedTools": "Read, Bash", "argumentHint": "[--fail-on-drift] [--default-branch <name>] [--format text|json]", "orchestration": false }
- description
- Verify configured secondary git mirrors are present and not drifting from the primary remote/default branch
03 SKILL.md 正文
Git Mirror Audit
Audit redundant git mirrors declared in .aiwg/aiwg.config:
{
"remotes": {
"primary": "origin",
"secondary": [
{
"name": "github",
"purpose": "backup-mirror",
"push_on_release": true
}
]
}
}
Execution Flow
- Read
remotes.primary,delivery.default_branch, andremotes.secondary[]. - Confirm every configured secondary exists in
git remote. - Fetch remote refs in read-only mode when the operator permits network access.
- Compare
refs/remotes/{primary}/{default_branch}with each secondary's default branch ref. - Report drift, missing remotes, and last known commit for each mirror.
Semantics
purpose: backup-mirrormeans the mirror is a disaster-recovery copy and should receive release pushes.push_on_release: truemeans release procedures must push tags and release commits to that mirror before declaring release complete.- This skill audits state; it never performs the push.
References
agentic/code/addons/aiwg-utils/rules/delivery-policy.md.aiwg/security/curl-checklist-gap-analysis.mdrow 3, Practice 21
04 同仓库更多 Skills
plugin-search
Search marketplaces for plugins using configured local manifests and directory caches; rank matching plugins by observed installs, review tier and cache dates without installing or fetching anything
plugin-search
Search marketplaces for plugins using configured local manifests and directory caches; rank matching plugins by observed installs, review tier and cache dates without installing or fetching anything
host-hardening
Read-only system hardening baseline and plan-first host hardening recommendations for SSH, Docker bind addresses, firewall persistence, datastores, exporters and audit retention.
exposure-analysis
Read-only firewall analysis and effective host exposure reconstruction for Docker published ports, UFW bypass, stale rules, CDN scope, IPv6 asymmetry and external probe allowlists.
host-hardening
Read-only system hardening baseline and plan-first host hardening recommendations for SSH, Docker bind addresses, firewall persistence, datastores, exporters and audit retention.
exposure-analysis
Read-only firewall analysis and effective host exposure reconstruction for Docker published ports, UFW bypass, stale rules, CDN scope, IPv6 asymmetry and external probe allowlists.