commitguardian 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (484) hide show
  1. commitguardian-0.1.0/.gitignore +44 -0
  2. commitguardian-0.1.0/CHANGELOG.md +515 -0
  3. commitguardian-0.1.0/CITATION.cff +26 -0
  4. commitguardian-0.1.0/CODE_OF_CONDUCT.md +39 -0
  5. commitguardian-0.1.0/CONTRIBUTING.md +395 -0
  6. commitguardian-0.1.0/LICENSE +21 -0
  7. commitguardian-0.1.0/PKG-INFO +694 -0
  8. commitguardian-0.1.0/README.md +654 -0
  9. commitguardian-0.1.0/SECURITY.md +202 -0
  10. commitguardian-0.1.0/action.yml +93 -0
  11. commitguardian-0.1.0/config/default.yaml +39 -0
  12. commitguardian-0.1.0/config/examples/allow-ai.yaml +15 -0
  13. commitguardian-0.1.0/config/examples/block-ai-coauthors.yaml +20 -0
  14. commitguardian-0.1.0/config/examples/enterprise.yaml +38 -0
  15. commitguardian-0.1.0/config/strict.yaml +29 -0
  16. commitguardian-0.1.0/docs/README.md +78 -0
  17. commitguardian-0.1.0/docs/adr/001-detection-separate-from-policy.md +39 -0
  18. commitguardian-0.1.0/docs/adr/002-rules-as-data.md +37 -0
  19. commitguardian-0.1.0/docs/adr/003-fail-closed.md +42 -0
  20. commitguardian-0.1.0/docs/adr/004-trusted-policy-source.md +37 -0
  21. commitguardian-0.1.0/docs/adr/005-no-regex-trailer-parser.md +43 -0
  22. commitguardian-0.1.0/docs/adr/006-mandatory-policy-only-strengthens.md +37 -0
  23. commitguardian-0.1.0/docs/adr/007-immutable-evidence.md +39 -0
  24. commitguardian-0.1.0/docs/adr/008-not-published-to-pypi.md +52 -0
  25. commitguardian-0.1.0/docs/adr/009-published-to-pypi-as-commitguardian.md +83 -0
  26. commitguardian-0.1.0/docs/adr/README.md +19 -0
  27. commitguardian-0.1.0/docs/api/README.md +143 -0
  28. commitguardian-0.1.0/docs/api/audit.md +164 -0
  29. commitguardian-0.1.0/docs/api/authentication.md +347 -0
  30. commitguardian-0.1.0/docs/api/authorization.md +167 -0
  31. commitguardian-0.1.0/docs/api/bulk-operations.md +147 -0
  32. commitguardian-0.1.0/docs/api/compliance-exports.md +70 -0
  33. commitguardian-0.1.0/docs/api/errors.md +129 -0
  34. commitguardian-0.1.0/docs/api/exceptions.md +225 -0
  35. commitguardian-0.1.0/docs/api/github-installations.md +109 -0
  36. commitguardian-0.1.0/docs/api/notifications.md +407 -0
  37. commitguardian-0.1.0/docs/api/organizations.md +246 -0
  38. commitguardian-0.1.0/docs/api/pagination.md +117 -0
  39. commitguardian-0.1.0/docs/api/policies.md +374 -0
  40. commitguardian-0.1.0/docs/api/policy-drafts.md +318 -0
  41. commitguardian-0.1.0/docs/api/rate-limits.md +73 -0
  42. commitguardian-0.1.0/docs/api/repositories.md +221 -0
  43. commitguardian-0.1.0/docs/api/repository-groups.md +159 -0
  44. commitguardian-0.1.0/docs/api/rollouts.md +147 -0
  45. commitguardian-0.1.0/docs/api/rules.md +152 -0
  46. commitguardian-0.1.0/docs/api/scan-schedules.md +129 -0
  47. commitguardian-0.1.0/docs/api/scans.md +254 -0
  48. commitguardian-0.1.0/docs/api/security-posture.md +230 -0
  49. commitguardian-0.1.0/docs/api/simulations.md +85 -0
  50. commitguardian-0.1.0/docs/api/violations.md +150 -0
  51. commitguardian-0.1.0/docs/api/webhooks.md +100 -0
  52. commitguardian-0.1.0/docs/architecture.md +388 -0
  53. commitguardian-0.1.0/docs/cli/README.md +50 -0
  54. commitguardian-0.1.0/docs/cli/benchmark.md +77 -0
  55. commitguardian-0.1.0/docs/cli/doctor.md +76 -0
  56. commitguardian-0.1.0/docs/cli/github.md +57 -0
  57. commitguardian-0.1.0/docs/cli/init.md +54 -0
  58. commitguardian-0.1.0/docs/cli/install.md +66 -0
  59. commitguardian-0.1.0/docs/cli/policy.md +41 -0
  60. commitguardian-0.1.0/docs/cli/reproduce.md +56 -0
  61. commitguardian-0.1.0/docs/cli/scan.md +65 -0
  62. commitguardian-0.1.0/docs/community/README.md +23 -0
  63. commitguardian-0.1.0/docs/community/case-study-template.md +76 -0
  64. commitguardian-0.1.0/docs/community/data-policy.md +51 -0
  65. commitguardian-0.1.0/docs/community/external-evaluation.md +76 -0
  66. commitguardian-0.1.0/docs/community/feedback-triage.md +47 -0
  67. commitguardian-0.1.0/docs/community/good-first-issues.md +77 -0
  68. commitguardian-0.1.0/docs/community/pilot-program.md +73 -0
  69. commitguardian-0.1.0/docs/compliance-reporting.md +112 -0
  70. commitguardian-0.1.0/docs/configuration.md +261 -0
  71. commitguardian-0.1.0/docs/dashboard.md +776 -0
  72. commitguardian-0.1.0/docs/deployment/README.md +156 -0
  73. commitguardian-0.1.0/docs/deployment/github-actions.md +111 -0
  74. commitguardian-0.1.0/docs/deployment/github-app.md +85 -0
  75. commitguardian-0.1.0/docs/deployment/local.md +101 -0
  76. commitguardian-0.1.0/docs/deployment/organization.md +117 -0
  77. commitguardian-0.1.0/docs/deployment/production.md +274 -0
  78. commitguardian-0.1.0/docs/deployment/self-hosted.md +343 -0
  79. commitguardian-0.1.0/docs/deployment/troubleshooting.md +256 -0
  80. commitguardian-0.1.0/docs/deployment.md +56 -0
  81. commitguardian-0.1.0/docs/detection-engine.md +190 -0
  82. commitguardian-0.1.0/docs/evidence/cli.json +34 -0
  83. commitguardian-0.1.0/docs/evidence/phase-10-report.md +367 -0
  84. commitguardian-0.1.0/docs/evidence/phase-10-verification-report.md +609 -0
  85. commitguardian-0.1.0/docs/evidence/tests.json +68 -0
  86. commitguardian-0.1.0/docs/evidence/timeline.md +52 -0
  87. commitguardian-0.1.0/docs/evidence/validation-matrix.md +38 -0
  88. commitguardian-0.1.0/docs/getting-started/quickstart.md +140 -0
  89. commitguardian-0.1.0/docs/git-hooks.md +323 -0
  90. commitguardian-0.1.0/docs/github-app.md +531 -0
  91. commitguardian-0.1.0/docs/github-enforcement.md +369 -0
  92. commitguardian-0.1.0/docs/maintainers/README.md +28 -0
  93. commitguardian-0.1.0/docs/maintainers/architecture.md +151 -0
  94. commitguardian-0.1.0/docs/maintainers/benchmarking.md +79 -0
  95. commitguardian-0.1.0/docs/maintainers/development.md +181 -0
  96. commitguardian-0.1.0/docs/maintainers/incident-response.md +20 -0
  97. commitguardian-0.1.0/docs/maintainers/release-process.md +276 -0
  98. commitguardian-0.1.0/docs/maintainers/repository-management.md +66 -0
  99. commitguardian-0.1.0/docs/maintainers/security.md +58 -0
  100. commitguardian-0.1.0/docs/merge-queue.md +120 -0
  101. commitguardian-0.1.0/docs/notifications.md +253 -0
  102. commitguardian-0.1.0/docs/operations/runbook.md +611 -0
  103. commitguardian-0.1.0/docs/organization-governance.md +269 -0
  104. commitguardian-0.1.0/docs/policy-engine.md +92 -0
  105. commitguardian-0.1.0/docs/policy-exceptions.md +125 -0
  106. commitguardian-0.1.0/docs/policy-inheritance.md +231 -0
  107. commitguardian-0.1.0/docs/policy-management.md +184 -0
  108. commitguardian-0.1.0/docs/policy-rollouts.md +133 -0
  109. commitguardian-0.1.0/docs/policy-simulation.md +103 -0
  110. commitguardian-0.1.0/docs/presentations/commitguard-technical-overview.md +53 -0
  111. commitguardian-0.1.0/docs/presentations/technical-article.md +207 -0
  112. commitguardian-0.1.0/docs/recovery.md +97 -0
  113. commitguardian-0.1.0/docs/repository-management.md +223 -0
  114. commitguardian-0.1.0/docs/research/README.md +52 -0
  115. commitguardian-0.1.0/docs/research/bypass-resistance.md +56 -0
  116. commitguardian-0.1.0/docs/research/commitguard-architecture.md +118 -0
  117. commitguardian-0.1.0/docs/research/cross-platform-validation.md +65 -0
  118. commitguardian-0.1.0/docs/research/detection-evaluation.md +134 -0
  119. commitguardian-0.1.0/docs/research/fuzzing.md +98 -0
  120. commitguardian-0.1.0/docs/research/github-enforcement-validation.md +69 -0
  121. commitguardian-0.1.0/docs/research/impact.md +74 -0
  122. commitguardian-0.1.0/docs/research/innovation.md +95 -0
  123. commitguardian-0.1.0/docs/research/limitations.md +93 -0
  124. commitguardian-0.1.0/docs/research/merge-queue-security.md +44 -0
  125. commitguardian-0.1.0/docs/research/methodology.md +113 -0
  126. commitguardian-0.1.0/docs/research/performance-evaluation.md +100 -0
  127. commitguardian-0.1.0/docs/research/policy-tampering.md +64 -0
  128. commitguardian-0.1.0/docs/research/problem-definition.md +67 -0
  129. commitguardian-0.1.0/docs/research/reliability-evaluation.md +50 -0
  130. commitguardian-0.1.0/docs/research/reproducibility.md +97 -0
  131. commitguardian-0.1.0/docs/research/roadmap.md +89 -0
  132. commitguardian-0.1.0/docs/security/README.md +34 -0
  133. commitguardian-0.1.0/docs/security/authorization-matrix.md +238 -0
  134. commitguardian-0.1.0/docs/security/ci-pipeline-security.md +111 -0
  135. commitguardian-0.1.0/docs/security/incident-response.md +102 -0
  136. commitguardian-0.1.0/docs/security/review-guide.md +428 -0
  137. commitguardian-0.1.0/docs/security/security-boundaries.md +268 -0
  138. commitguardian-0.1.0/docs/security/supply-chain.md +77 -0
  139. commitguardian-0.1.0/docs/security/threat-model.md +723 -0
  140. commitguardian-0.1.0/docs/security/vulnerability-response.md +73 -0
  141. commitguardian-0.1.0/docs/security-posture.md +203 -0
  142. commitguardian-0.1.0/docs/support/compatibility-policy.md +218 -0
  143. commitguardian-0.1.0/docs/support/compatibility.md +180 -0
  144. commitguardian-0.1.0/docs/support/maintenance-policy.md +127 -0
  145. commitguardian-0.1.0/docs/threat-model.md +12 -0
  146. commitguardian-0.1.0/examples/README.md +32 -0
  147. commitguardian-0.1.0/examples/basic/.commitguard.yaml +17 -0
  148. commitguardian-0.1.0/examples/basic/README.md +58 -0
  149. commitguardian-0.1.0/examples/basic/commits/ai-coauthor.txt +3 -0
  150. commitguardian-0.1.0/examples/basic/commits/ai-tool-footer.txt +3 -0
  151. commitguardian-0.1.0/examples/basic/commits/clean.txt +6 -0
  152. commitguardian-0.1.0/examples/basic/commits/disguised-coauthor.txt +3 -0
  153. commitguardian-0.1.0/examples/basic/commits/malformed-trailer.txt +3 -0
  154. commitguardian-0.1.0/examples/basic/expected.json +30 -0
  155. commitguardian-0.1.0/examples/exceptions/README.md +35 -0
  156. commitguardian-0.1.0/examples/github-actions/README.md +44 -0
  157. commitguardian-0.1.0/examples/github-actions/commitguard.yml +33 -0
  158. commitguardian-0.1.0/examples/github-app/README.md +52 -0
  159. commitguardian-0.1.0/examples/organization-policy/README.md +42 -0
  160. commitguardian-0.1.0/examples/organization-policy/mandatory-policy.yaml +17 -0
  161. commitguardian-0.1.0/examples/organization-policy/repository-attempt.yaml +9 -0
  162. commitguardian-0.1.0/examples/policy-rollout/README.md +38 -0
  163. commitguardian-0.1.0/hooks/README.md +9 -0
  164. commitguardian-0.1.0/hooks/commit-msg +31 -0
  165. commitguardian-0.1.0/hooks/pre-commit +31 -0
  166. commitguardian-0.1.0/hooks/pre-push +33 -0
  167. commitguardian-0.1.0/pyproject.toml +169 -0
  168. commitguardian-0.1.0/requirements/ci.in +11 -0
  169. commitguardian-0.1.0/requirements/ci.txt +253 -0
  170. commitguardian-0.1.0/rules/ai-domains.yaml +51 -0
  171. commitguardian-0.1.0/rules/ai-identities.yaml +131 -0
  172. commitguardian-0.1.0/rules/bot-identities.yaml +53 -0
  173. commitguardian-0.1.0/rules/patterns.yaml +52 -0
  174. commitguardian-0.1.0/src/commitguard/__init__.py +26 -0
  175. commitguardian-0.1.0/src/commitguard/__main__.py +6 -0
  176. commitguardian-0.1.0/src/commitguard/api/__init__.py +18 -0
  177. commitguardian-0.1.0/src/commitguard/api/app.py +1376 -0
  178. commitguardian-0.1.0/src/commitguard/api/governance.py +1085 -0
  179. commitguardian-0.1.0/src/commitguard/api/hosting.py +196 -0
  180. commitguardian-0.1.0/src/commitguard/api/http.py +252 -0
  181. commitguardian-0.1.0/src/commitguard/api/settings.py +169 -0
  182. commitguardian-0.1.0/src/commitguard/audit/__init__.py +13 -0
  183. commitguardian-0.1.0/src/commitguard/audit/logger.py +34 -0
  184. commitguardian-0.1.0/src/commitguard/audit/models.py +222 -0
  185. commitguardian-0.1.0/src/commitguard/audit/storage.py +59 -0
  186. commitguardian-0.1.0/src/commitguard/ci/__init__.py +7 -0
  187. commitguardian-0.1.0/src/commitguard/ci/context.py +60 -0
  188. commitguardian-0.1.0/src/commitguard/cli/__init__.py +6 -0
  189. commitguardian-0.1.0/src/commitguard/cli/app.py +74 -0
  190. commitguardian-0.1.0/src/commitguard/cli/commands/__init__.py +1 -0
  191. commitguardian-0.1.0/src/commitguard/cli/commands/benchmark.py +441 -0
  192. commitguardian-0.1.0/src/commitguard/cli/commands/check.py +100 -0
  193. commitguardian-0.1.0/src/commitguard/cli/commands/ci.py +165 -0
  194. commitguardian-0.1.0/src/commitguard/cli/commands/dashboard.py +141 -0
  195. commitguardian-0.1.0/src/commitguard/cli/commands/doctor.py +533 -0
  196. commitguardian-0.1.0/src/commitguard/cli/commands/github.py +449 -0
  197. commitguardian-0.1.0/src/commitguard/cli/commands/hook.py +156 -0
  198. commitguardian-0.1.0/src/commitguard/cli/commands/init.py +137 -0
  199. commitguardian-0.1.0/src/commitguard/cli/commands/install.py +152 -0
  200. commitguardian-0.1.0/src/commitguard/cli/commands/policy.py +36 -0
  201. commitguardian-0.1.0/src/commitguard/cli/commands/report.py +39 -0
  202. commitguardian-0.1.0/src/commitguard/cli/commands/reproduce.py +123 -0
  203. commitguardian-0.1.0/src/commitguard/cli/commands/scan.py +47 -0
  204. commitguardian-0.1.0/src/commitguard/cli/common.py +44 -0
  205. commitguardian-0.1.0/src/commitguard/cli/output.py +89 -0
  206. commitguardian-0.1.0/src/commitguard/cli/render.py +367 -0
  207. commitguardian-0.1.0/src/commitguard/config/__init__.py +6 -0
  208. commitguardian-0.1.0/src/commitguard/config/defaults.py +53 -0
  209. commitguardian-0.1.0/src/commitguard/config/enforcement.py +53 -0
  210. commitguardian-0.1.0/src/commitguard/config/loader.py +174 -0
  211. commitguardian-0.1.0/src/commitguard/config/schema.py +105 -0
  212. commitguardian-0.1.0/src/commitguard/config/sources.py +183 -0
  213. commitguardian-0.1.0/src/commitguard/controlplane/__init__.py +24 -0
  214. commitguardian-0.1.0/src/commitguard/controlplane/access.py +231 -0
  215. commitguardian-0.1.0/src/commitguard/controlplane/commands.py +393 -0
  216. commitguardian-0.1.0/src/commitguard/controlplane/errors.py +88 -0
  217. commitguardian-0.1.0/src/commitguard/controlplane/identity.py +478 -0
  218. commitguardian-0.1.0/src/commitguard/controlplane/members.py +219 -0
  219. commitguardian-0.1.0/src/commitguard/controlplane/notifications.py +787 -0
  220. commitguardian-0.1.0/src/commitguard/controlplane/pagination.py +146 -0
  221. commitguardian-0.1.0/src/commitguard/controlplane/policies.py +1204 -0
  222. commitguardian-0.1.0/src/commitguard/controlplane/queries.py +1814 -0
  223. commitguardian-0.1.0/src/commitguard/controlplane/results.py +909 -0
  224. commitguardian-0.1.0/src/commitguard/controlplane/rules.py +184 -0
  225. commitguardian-0.1.0/src/commitguard/controlplane/views.py +799 -0
  226. commitguardian-0.1.0/src/commitguard/core/__init__.py +6 -0
  227. commitguardian-0.1.0/src/commitguard/core/context.py +31 -0
  228. commitguardian-0.1.0/src/commitguard/core/decision.py +58 -0
  229. commitguardian-0.1.0/src/commitguard/core/engine.py +82 -0
  230. commitguardian-0.1.0/src/commitguard/core/result.py +177 -0
  231. commitguardian-0.1.0/src/commitguard/detectors/__init__.py +6 -0
  232. commitguardian-0.1.0/src/commitguard/detectors/base.py +58 -0
  233. commitguardian-0.1.0/src/commitguard/detectors/bot.py +87 -0
  234. commitguardian-0.1.0/src/commitguard/detectors/coauthor.py +86 -0
  235. commitguardian-0.1.0/src/commitguard/detectors/identity.py +76 -0
  236. commitguardian-0.1.0/src/commitguard/detectors/registry.py +72 -0
  237. commitguardian-0.1.0/src/commitguard/detectors/trailer.py +211 -0
  238. commitguardian-0.1.0/src/commitguard/exceptions/__init__.py +33 -0
  239. commitguardian-0.1.0/src/commitguard/exceptions/base.py +9 -0
  240. commitguardian-0.1.0/src/commitguard/exceptions/configuration.py +22 -0
  241. commitguardian-0.1.0/src/commitguard/exceptions/detection.py +11 -0
  242. commitguardian-0.1.0/src/commitguard/exceptions/git.py +41 -0
  243. commitguardian-0.1.0/src/commitguard/exceptions/service.py +25 -0
  244. commitguardian-0.1.0/src/commitguard/git/__init__.py +12 -0
  245. commitguardian-0.1.0/src/commitguard/git/commands.py +101 -0
  246. commitguardian-0.1.0/src/commitguard/git/commit.py +97 -0
  247. commitguardian-0.1.0/src/commitguard/git/diff.py +36 -0
  248. commitguardian-0.1.0/src/commitguard/git/hooks.py +527 -0
  249. commitguardian-0.1.0/src/commitguard/git/push.py +93 -0
  250. commitguardian-0.1.0/src/commitguard/git/ranges.py +71 -0
  251. commitguardian-0.1.0/src/commitguard/git/repository.py +447 -0
  252. commitguardian-0.1.0/src/commitguard/github/__init__.py +34 -0
  253. commitguardian-0.1.0/src/commitguard/github/actions.py +163 -0
  254. commitguardian-0.1.0/src/commitguard/github/app.py +935 -0
  255. commitguardian-0.1.0/src/commitguard/github/auth.py +217 -0
  256. commitguardian-0.1.0/src/commitguard/github/check_runs.py +172 -0
  257. commitguardian-0.1.0/src/commitguard/github/checks.py +210 -0
  258. commitguardian-0.1.0/src/commitguard/github/client.py +844 -0
  259. commitguardian-0.1.0/src/commitguard/github/enforcement_status.py +209 -0
  260. commitguardian-0.1.0/src/commitguard/github/errors.py +129 -0
  261. commitguardian-0.1.0/src/commitguard/github/events.py +563 -0
  262. commitguardian-0.1.0/src/commitguard/github/identifiers.py +90 -0
  263. commitguardian-0.1.0/src/commitguard/github/installations.py +566 -0
  264. commitguardian-0.1.0/src/commitguard/github/markdown.py +19 -0
  265. commitguardian-0.1.0/src/commitguard/github/permissions.py +70 -0
  266. commitguardian-0.1.0/src/commitguard/github/pull_requests.py +53 -0
  267. commitguardian-0.1.0/src/commitguard/github/queue.py +47 -0
  268. commitguardian-0.1.0/src/commitguard/github/recovery.py +124 -0
  269. commitguardian-0.1.0/src/commitguard/github/repositories.py +305 -0
  270. commitguardian-0.1.0/src/commitguard/github/server.py +52 -0
  271. commitguardian-0.1.0/src/commitguard/github/settings.py +174 -0
  272. commitguardian-0.1.0/src/commitguard/github/storage.py +2315 -0
  273. commitguardian-0.1.0/src/commitguard/github/webhooks.py +129 -0
  274. commitguardian-0.1.0/src/commitguard/github/worker.py +628 -0
  275. commitguardian-0.1.0/src/commitguard/github/workflow.py +286 -0
  276. commitguardian-0.1.0/src/commitguard/governance/__init__.py +26 -0
  277. commitguardian-0.1.0/src/commitguard/governance/bulk.py +765 -0
  278. commitguardian-0.1.0/src/commitguard/governance/cache.py +88 -0
  279. commitguardian-0.1.0/src/commitguard/governance/common.py +216 -0
  280. commitguardian-0.1.0/src/commitguard/governance/exceptions.py +861 -0
  281. commitguardian-0.1.0/src/commitguard/governance/groups.py +448 -0
  282. commitguardian-0.1.0/src/commitguard/governance/inventory.py +386 -0
  283. commitguardian-0.1.0/src/commitguard/governance/posture.py +1272 -0
  284. commitguardian-0.1.0/src/commitguard/governance/resolver.py +632 -0
  285. commitguardian-0.1.0/src/commitguard/governance/rollouts.py +760 -0
  286. commitguardian-0.1.0/src/commitguard/governance/rules.py +371 -0
  287. commitguardian-0.1.0/src/commitguard/governance/schedules.py +663 -0
  288. commitguardian-0.1.0/src/commitguard/governance/service.py +120 -0
  289. commitguardian-0.1.0/src/commitguard/governance/settings.py +365 -0
  290. commitguardian-0.1.0/src/commitguard/governance/simulation.py +618 -0
  291. commitguardian-0.1.0/src/commitguard/governance/workflow.py +734 -0
  292. commitguardian-0.1.0/src/commitguard/notifications/__init__.py +2 -0
  293. commitguardian-0.1.0/src/commitguard/notifications/channels/__init__.py +1 -0
  294. commitguardian-0.1.0/src/commitguard/notifications/channels/base.py +22 -0
  295. commitguardian-0.1.0/src/commitguard/notifications/channels/email.py +110 -0
  296. commitguardian-0.1.0/src/commitguard/notifications/channels/in_app.py +74 -0
  297. commitguardian-0.1.0/src/commitguard/notifications/channels/sink.py +58 -0
  298. commitguardian-0.1.0/src/commitguard/notifications/channels/webhook.py +233 -0
  299. commitguardian-0.1.0/src/commitguard/notifications/deduplication.py +57 -0
  300. commitguardian-0.1.0/src/commitguard/notifications/dispatcher.py +201 -0
  301. commitguardian-0.1.0/src/commitguard/notifications/models.py +439 -0
  302. commitguardian-0.1.0/src/commitguard/notifications/outbox.py +106 -0
  303. commitguardian-0.1.0/src/commitguard/notifications/preferences.py +224 -0
  304. commitguardian-0.1.0/src/commitguard/notifications/retry.py +282 -0
  305. commitguardian-0.1.0/src/commitguard/notifications/service.py +128 -0
  306. commitguardian-0.1.0/src/commitguard/notifications/settings.py +167 -0
  307. commitguardian-0.1.0/src/commitguard/notifications/templates.py +108 -0
  308. commitguardian-0.1.0/src/commitguard/observability/__init__.py +5 -0
  309. commitguardian-0.1.0/src/commitguard/observability/logging.py +161 -0
  310. commitguardian-0.1.0/src/commitguard/observability/metrics.py +105 -0
  311. commitguardian-0.1.0/src/commitguard/policies/__init__.py +6 -0
  312. commitguardian-0.1.0/src/commitguard/policies/defaults.py +48 -0
  313. commitguardian-0.1.0/src/commitguard/policies/evaluator.py +66 -0
  314. commitguardian-0.1.0/src/commitguard/policies/governance.py +498 -0
  315. commitguardian-0.1.0/src/commitguard/policies/loader.py +23 -0
  316. commitguardian-0.1.0/src/commitguard/policies/mandatory.py +52 -0
  317. commitguardian-0.1.0/src/commitguard/policies/model.py +46 -0
  318. commitguardian-0.1.0/src/commitguard/provenance/__init__.py +9 -0
  319. commitguardian-0.1.0/src/commitguard/provenance/author.py +146 -0
  320. commitguardian-0.1.0/src/commitguard/provenance/committer.py +16 -0
  321. commitguardian-0.1.0/src/commitguard/provenance/normalization.py +158 -0
  322. commitguardian-0.1.0/src/commitguard/provenance/signatures.py +34 -0
  323. commitguardian-0.1.0/src/commitguard/provenance/trailers.py +256 -0
  324. commitguardian-0.1.0/src/commitguard/research/__init__.py +26 -0
  325. commitguardian-0.1.0/src/commitguard/research/compare.py +231 -0
  326. commitguardian-0.1.0/src/commitguard/research/datasets.py +1484 -0
  327. commitguardian-0.1.0/src/commitguard/research/detection.py +183 -0
  328. commitguardian-0.1.0/src/commitguard/research/environment.py +185 -0
  329. commitguardian-0.1.0/src/commitguard/research/gitenv.py +108 -0
  330. commitguardian-0.1.0/src/commitguard/research/hooks.py +247 -0
  331. commitguardian-0.1.0/src/commitguard/research/metrics.py +85 -0
  332. commitguardian-0.1.0/src/commitguard/research/performance.py +194 -0
  333. commitguardian-0.1.0/src/commitguard/research/platform.py +288 -0
  334. commitguardian-0.1.0/src/commitguard/research/report.py +372 -0
  335. commitguardian-0.1.0/src/commitguard/research/repository.py +111 -0
  336. commitguardian-0.1.0/src/commitguard/research/reproduction.py +297 -0
  337. commitguardian-0.1.0/src/commitguard/research/results.py +94 -0
  338. commitguardian-0.1.0/src/commitguard/rules/__init__.py +11 -0
  339. commitguardian-0.1.0/src/commitguard/rules/loader.py +102 -0
  340. commitguardian-0.1.0/src/commitguard/rules/matcher.py +212 -0
  341. commitguardian-0.1.0/src/commitguard/rules/models.py +269 -0
  342. commitguardian-0.1.0/src/commitguard/security/__init__.py +5 -0
  343. commitguardian-0.1.0/src/commitguard/security/hashing.py +30 -0
  344. commitguardian-0.1.0/src/commitguard/security/rate_limit.py +33 -0
  345. commitguardian-0.1.0/src/commitguard/security/safe_yaml.py +69 -0
  346. commitguardian-0.1.0/src/commitguard/security/sanitization.py +85 -0
  347. commitguardian-0.1.0/src/commitguard/security/secrets.py +169 -0
  348. commitguardian-0.1.0/src/commitguard/security/validation.py +89 -0
  349. commitguardian-0.1.0/src/commitguard/services/__init__.py +15 -0
  350. commitguardian-0.1.0/src/commitguard/services/analysis.py +119 -0
  351. commitguardian-0.1.0/src/commitguard/services/audit.py +95 -0
  352. commitguardian-0.1.0/src/commitguard/services/ci.py +383 -0
  353. commitguardian-0.1.0/src/commitguard/services/enforcement.py +102 -0
  354. commitguardian-0.1.0/src/commitguard/services/hooks.py +254 -0
  355. commitguardian-0.1.0/src/commitguard/services/remediation.py +99 -0
  356. commitguardian-0.1.0/src/commitguard/services/reports.py +146 -0
  357. commitguardian-0.1.0/src/commitguard/services/scan.py +172 -0
  358. commitguardian-0.1.0/src/commitguard/utils/__init__.py +1 -0
  359. commitguardian-0.1.0/src/commitguard/utils/filesystem.py +72 -0
  360. commitguardian-0.1.0/src/commitguard/utils/platform.py +35 -0
  361. commitguardian-0.1.0/src/commitguard/utils/subprocess.py +84 -0
  362. commitguardian-0.1.0/tests/conftest.py +366 -0
  363. commitguardian-0.1.0/tests/e2e/dashboard_harness.py +806 -0
  364. commitguardian-0.1.0/tests/fixtures/commits/ai_agent_author.yaml +6 -0
  365. commitguardian-0.1.0/tests/fixtures/commits/ai_wording_only.yaml +9 -0
  366. commitguardian-0.1.0/tests/fixtures/commits/bot_author.yaml +9 -0
  367. commitguardian-0.1.0/tests/fixtures/commits/chatgpt_coauthor.yaml +8 -0
  368. commitguardian-0.1.0/tests/fixtures/commits/claude_coauthor.yaml +8 -0
  369. commitguardian-0.1.0/tests/fixtures/commits/copilot_coauthor.yaml +8 -0
  370. commitguardian-0.1.0/tests/fixtures/commits/generated_with_trailer.yaml +10 -0
  371. commitguardian-0.1.0/tests/fixtures/commits/human_coauthor.yaml +8 -0
  372. commitguardian-0.1.0/tests/fixtures/commits/malformed_trailer.yaml +10 -0
  373. commitguardian-0.1.0/tests/fixtures/commits/malicious_message.yaml +8 -0
  374. commitguardian-0.1.0/tests/fixtures/commits/multiple_coauthors.yaml +10 -0
  375. commitguardian-0.1.0/tests/fixtures/commits/normal_human.yaml +8 -0
  376. commitguardian-0.1.0/tests/fixtures/commits/unknown_ai_agent.yaml +11 -0
  377. commitguardian-0.1.0/tests/fixtures/policies/alias.yaml +5 -0
  378. commitguardian-0.1.0/tests/fixtures/policies/duplicate-keys.yaml +6 -0
  379. commitguardian-0.1.0/tests/fixtures/policies/null-action.yaml +4 -0
  380. commitguardian-0.1.0/tests/fixtures/policies/python-tag.yaml +2 -0
  381. commitguardian-0.1.0/tests/fixtures/policies/string-boolean.yaml +4 -0
  382. commitguardian-0.1.0/tests/fixtures/policies/unknown-key.yaml +4 -0
  383. commitguardian-0.1.0/tests/fixtures/policies/unknown-policy.yaml +4 -0
  384. commitguardian-0.1.0/tests/fixtures/policies/valid-minimal.yaml +1 -0
  385. commitguardian-0.1.0/tests/fixtures/repositories/README.md +9 -0
  386. commitguardian-0.1.0/tests/fixtures/webhooks/README.md +6 -0
  387. commitguardian-0.1.0/tests/fixtures/webhooks/installation.created.json +40 -0
  388. commitguardian-0.1.0/tests/fixtures/webhooks/installation.deleted.json +33 -0
  389. commitguardian-0.1.0/tests/fixtures/webhooks/installation_repositories.added.json +28 -0
  390. commitguardian-0.1.0/tests/fixtures/webhooks/installation_repositories.removed.json +28 -0
  391. commitguardian-0.1.0/tests/fixtures/webhooks/pull_request.closed.json +74 -0
  392. commitguardian-0.1.0/tests/fixtures/webhooks/pull_request.opened.json +74 -0
  393. commitguardian-0.1.0/tests/fixtures/webhooks/pull_request.reopened.json +74 -0
  394. commitguardian-0.1.0/tests/fixtures/webhooks/pull_request.synchronize.json +76 -0
  395. commitguardian-0.1.0/tests/fixtures/webhooks/push.json +49 -0
  396. commitguardian-0.1.0/tests/integration/git/test_cli_commands.py +352 -0
  397. commitguardian-0.1.0/tests/integration/git/test_repository.py +175 -0
  398. commitguardian-0.1.0/tests/integration/github/app/conftest.py +872 -0
  399. commitguardian-0.1.0/tests/integration/github/app/dashboard/conftest.py +532 -0
  400. commitguardian-0.1.0/tests/integration/github/app/dashboard/test_dashboard_api.py +150 -0
  401. commitguardian-0.1.0/tests/integration/github/app/dashboard/test_dashboard_authorization.py +454 -0
  402. commitguardian-0.1.0/tests/integration/github/app/dashboard/test_dashboard_lifecycle.py +256 -0
  403. commitguardian-0.1.0/tests/integration/github/app/dashboard/test_dashboard_notifications.py +499 -0
  404. commitguardian-0.1.0/tests/integration/github/app/dashboard/test_dashboard_performance.py +255 -0
  405. commitguardian-0.1.0/tests/integration/github/app/dashboard/test_dashboard_policies.py +216 -0
  406. commitguardian-0.1.0/tests/integration/github/app/dashboard/test_dashboard_recovery.py +454 -0
  407. commitguardian-0.1.0/tests/integration/github/app/dashboard/test_dashboard_security.py +424 -0
  408. commitguardian-0.1.0/tests/integration/github/app/dashboard/test_governance_end_to_end.py +356 -0
  409. commitguardian-0.1.0/tests/integration/github/app/dashboard/test_governance_isolation.py +212 -0
  410. commitguardian-0.1.0/tests/integration/github/app/dashboard/test_governance_operations.py +318 -0
  411. commitguardian-0.1.0/tests/integration/github/app/dashboard/test_governance_performance.py +183 -0
  412. commitguardian-0.1.0/tests/integration/github/app/dashboard/test_governance_policies.py +289 -0
  413. commitguardian-0.1.0/tests/integration/github/app/dashboard/test_governance_rollouts.py +319 -0
  414. commitguardian-0.1.0/tests/integration/github/app/dashboard/test_governance_workflow.py +428 -0
  415. commitguardian-0.1.0/tests/integration/github/app/security/test_server_enforcement_experiments.py +324 -0
  416. commitguardian-0.1.0/tests/integration/github/app/test_app_action_consistency.py +84 -0
  417. commitguardian-0.1.0/tests/integration/github/app/test_app_cli.py +162 -0
  418. commitguardian-0.1.0/tests/integration/github/app/test_app_concurrency.py +134 -0
  419. commitguardian-0.1.0/tests/integration/github/app/test_app_end_to_end.py +172 -0
  420. commitguardian-0.1.0/tests/integration/github/app/test_app_http.py +160 -0
  421. commitguardian-0.1.0/tests/integration/github/app/test_app_merge_queue_reruns.py +474 -0
  422. commitguardian-0.1.0/tests/integration/github/app/test_app_security.py +405 -0
  423. commitguardian-0.1.0/tests/integration/github/conftest.py +237 -0
  424. commitguardian-0.1.0/tests/integration/github/security/test_bypass_resistance.py +268 -0
  425. commitguardian-0.1.0/tests/integration/github/test_action_scripts.py +105 -0
  426. commitguardian-0.1.0/tests/integration/github/test_ci_github.py +433 -0
  427. commitguardian-0.1.0/tests/integration/github/test_ci_security.py +118 -0
  428. commitguardian-0.1.0/tests/integration/github/test_defense_in_depth.py +159 -0
  429. commitguardian-0.1.0/tests/integration/github/test_github_cli.py +127 -0
  430. commitguardian-0.1.0/tests/integration/github/test_github_placeholder.py +43 -0
  431. commitguardian-0.1.0/tests/integration/hooks/conftest.py +45 -0
  432. commitguardian-0.1.0/tests/integration/hooks/test_commit_hooks.py +316 -0
  433. commitguardian-0.1.0/tests/integration/hooks/test_end_to_end.py +101 -0
  434. commitguardian-0.1.0/tests/integration/hooks/test_hook_templates.py +60 -0
  435. commitguardian-0.1.0/tests/integration/hooks/test_install.py +247 -0
  436. commitguardian-0.1.0/tests/integration/hooks/test_pre_push.py +309 -0
  437. commitguardian-0.1.0/tests/integration/test_examples.py +138 -0
  438. commitguardian-0.1.0/tests/security/conftest.py +73 -0
  439. commitguardian-0.1.0/tests/security/test_fuzz_parsers.py +526 -0
  440. commitguardian-0.1.0/tests/security/test_properties.py +210 -0
  441. commitguardian-0.1.0/tests/security/test_redos.py +209 -0
  442. commitguardian-0.1.0/tests/unit/config/test_config_validation.py +254 -0
  443. commitguardian-0.1.0/tests/unit/controlplane/test_controlplane.py +383 -0
  444. commitguardian-0.1.0/tests/unit/controlplane/test_governance_units.py +300 -0
  445. commitguardian-0.1.0/tests/unit/core/test_decision.py +19 -0
  446. commitguardian-0.1.0/tests/unit/core/test_engine.py +126 -0
  447. commitguardian-0.1.0/tests/unit/core/test_result.py +90 -0
  448. commitguardian-0.1.0/tests/unit/detectors/test_bot.py +64 -0
  449. commitguardian-0.1.0/tests/unit/detectors/test_coauthor.py +214 -0
  450. commitguardian-0.1.0/tests/unit/detectors/test_identity.py +63 -0
  451. commitguardian-0.1.0/tests/unit/detectors/test_registry.py +72 -0
  452. commitguardian-0.1.0/tests/unit/detectors/test_trailer.py +113 -0
  453. commitguardian-0.1.0/tests/unit/git/test_hook_rendering.py +80 -0
  454. commitguardian-0.1.0/tests/unit/git/test_push_parsing.py +61 -0
  455. commitguardian-0.1.0/tests/unit/github/app/conftest.py +27 -0
  456. commitguardian-0.1.0/tests/unit/github/app/test_auth.py +280 -0
  457. commitguardian-0.1.0/tests/unit/github/app/test_client.py +283 -0
  458. commitguardian-0.1.0/tests/unit/github/app/test_phase7_events_and_storage.py +326 -0
  459. commitguardian-0.1.0/tests/unit/github/app/test_policy_and_checks.py +301 -0
  460. commitguardian-0.1.0/tests/unit/github/app/test_secrets_and_logging.py +122 -0
  461. commitguardian-0.1.0/tests/unit/github/app/test_service_entry_points.py +54 -0
  462. commitguardian-0.1.0/tests/unit/github/app/test_storage.py +357 -0
  463. commitguardian-0.1.0/tests/unit/github/app/test_webhook_events.py +242 -0
  464. commitguardian-0.1.0/tests/unit/github/app/test_webhooks.py +171 -0
  465. commitguardian-0.1.0/tests/unit/github/test_events_and_output.py +175 -0
  466. commitguardian-0.1.0/tests/unit/github/test_workflows_static.py +247 -0
  467. commitguardian-0.1.0/tests/unit/notifications/test_notification_units.py +364 -0
  468. commitguardian-0.1.0/tests/unit/policies/test_evaluator.py +113 -0
  469. commitguardian-0.1.0/tests/unit/policies/test_governance_resolution.py +304 -0
  470. commitguardian-0.1.0/tests/unit/policies/test_policy_loader.py +44 -0
  471. commitguardian-0.1.0/tests/unit/provenance/test_identity_parsing.py +84 -0
  472. commitguardian-0.1.0/tests/unit/provenance/test_models.py +54 -0
  473. commitguardian-0.1.0/tests/unit/provenance/test_trailers.py +248 -0
  474. commitguardian-0.1.0/tests/unit/research/test_compare.py +98 -0
  475. commitguardian-0.1.0/tests/unit/rules/test_matcher.py +109 -0
  476. commitguardian-0.1.0/tests/unit/rules/test_rules_loader.py +74 -0
  477. commitguardian-0.1.0/tests/unit/security/test_safe_subprocess.py +49 -0
  478. commitguardian-0.1.0/tests/unit/security/test_sanitization.py +73 -0
  479. commitguardian-0.1.0/tests/unit/security/test_validation.py +55 -0
  480. commitguardian-0.1.0/tests/unit/services/test_analyzer.py +100 -0
  481. commitguardian-0.1.0/tests/unit/services/test_remediation.py +139 -0
  482. commitguardian-0.1.0/tests/unit/test_architecture.py +358 -0
  483. commitguardian-0.1.0/tests/unit/test_documented_commands.py +73 -0
  484. commitguardian-0.1.0/tests/unit/test_env_example.py +55 -0
@@ -0,0 +1,44 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.so
5
+ *.egg-info/
6
+ build/
7
+ dist/
8
+
9
+ # Virtual environments
10
+ .venv/
11
+ venv/
12
+
13
+ # Tooling caches
14
+ .pytest_cache/
15
+ .mypy_cache/
16
+ .ruff_cache/
17
+ .coverage
18
+ htmlcov/
19
+
20
+ # Environment files (never commit real secrets)
21
+ .env
22
+ .env.*
23
+ !.env.example
24
+
25
+ # Local audit storage (future, opt-in)
26
+ *.sqlite
27
+ *.sqlite3
28
+ *.db
29
+
30
+ # Editors / OS
31
+ .idea/
32
+ .vscode/
33
+ .DS_Store
34
+
35
+ node_modules
36
+ */node_modules
37
+ dist/
38
+ */dist/
39
+
40
+ # Dashboard (web/)
41
+ web/test-results/
42
+ web/test-results-screenshots/
43
+ web/playwright-report/
44
+ web/node_modules/.tmp/
@@ -0,0 +1,515 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses
5
+ [Semantic Versioning](https://semver.org/).
6
+
7
+ ## [0.1.0] - 2026-09-18
8
+
9
+ ### Packaging
10
+
11
+ - **Published to PyPI as `commitguardian`** (`pipx install commitguardian`). The
12
+ product, import package and console script are all still `commitguard`; the
13
+ distribution name differs because `commitguard` and `commitguard-cli` on PyPI
14
+ belong to two unrelated projects by other authors. See
15
+ [ADR-009](docs/adr/009-published-to-pypi-as-commitguardian.md), which
16
+ supersedes ADR-008.
17
+ - Releases are published with **PyPI Trusted Publishing** (OIDC from the tagged
18
+ release workflow). No API token is created, stored or rotated.
19
+ - **The sdist is now built from an allowlist.** The default configuration
20
+ produced an 8.4 MB sdist containing an editor's scratch worktree under
21
+ `.kilo/` (a second copy of the repository), the `.hypothesis/` cache and 22 MB
22
+ of generated benchmark datasets. It is now 988 KB of source, tests, docs and
23
+ metadata, and the release workflow fails if a local directory reappears.
24
+ - Version `0.1.0.dev0` -> `0.1.0`, so `pip install commitguardian` resolves it
25
+ without `--pre`.
26
+ - Added `project.urls` (homepage, repository, documentation, changelog, issues)
27
+ for the PyPI project page.
28
+ - **Releases publish automatically.** A final tag `vX.Y.Z` now validates,
29
+ builds, smoke-tests on Linux, macOS and Windows, publishes the GitHub release
30
+ and publishes to PyPI with no further action. A release candidate (`rcN`)
31
+ stops at a draft prerelease and is never published to PyPI.
32
+ - The GitHub Marketplace listing stays manual, because GitHub provides no API
33
+ for it: `gh release create` has no marketplace flag and the release object has
34
+ no marketplace field. The release job instead **fails** if `action.yml` or the
35
+ README would stop the listing checkbox appearing, and writes the link and the
36
+ exact category values into the workflow run summary.
37
+
38
+ ### Added
39
+
40
+ - **`remediation.auto_remove`** (opt-in, off by default): the `commit-msg` hook
41
+ deletes prohibited AI, bot or agent attribution from the pending commit
42
+ message instead of refusing the commit, reports every line it removed, and
43
+ lets the commit through. It rewrites no history - `commit-msg` runs before Git
44
+ creates the commit object. It refuses whatever it cannot provably fix:
45
+ attribution in the author or committer identity, a message that would be left
46
+ empty, or a detector failure. The stripped message is re-analysed and the
47
+ commit proceeds only if it is then clean. `pre-push` never removes anything,
48
+ and a mandatory organization policy cannot switch it on.
49
+ See [docs/configuration.md](docs/configuration.md#remediation).
50
+
51
+ ### Fixed (Phase 10 verification pass)
52
+
53
+ - The Git hook's fail-closed message escaped newlines, so a multi-line reason
54
+ (an invalid `.commitguard.yaml` listing several fields) printed as one
55
+ unreadable `\x0a` run. Reason blocks now keep their newlines and indent every
56
+ continuation line, so text from a configuration file cannot start a line at
57
+ column 0 and impersonate a CommitGuard status line.
58
+ - GitHub App state: `installation_repositories`, `known_repositories` and
59
+ `installation_sync_status` were never deleted when an installation was purged,
60
+ so an organization's repository names stayed in the database indefinitely,
61
+ contradicting the documented retention behaviour.
62
+ - The repository's own enforcement workflow fell back to installing CommitGuard
63
+ from `$GITHUB_WORKSPACE` - the change under review - when the trusted commit
64
+ predated CI support. The check now fails instead.
65
+ - `.env.example` claimed CommitGuard reads no environment variables; it reads 30.
66
+ It now lists them all, and a test keeps it in sync with the source.
67
+ - Removed pictographic characters from CommitGuard's own output (Check Run
68
+ markdown, GitHub Actions summaries, CLI status lines) and documentation prose.
69
+ They remain only in detection *inputs* (the adversarial dataset and fixtures).
70
+
71
+ ### Security (Phase 10 — three detection bypasses and two ReDoS defects, found by this project's own testing)
72
+
73
+ - **Detection bypass**: a Unicode letter or number before a trailer key
74
+ (`\u32acCo-authored-by:`, `\u2460Co-authored-by:`) hid AI attribution. The
75
+ leading-character rule used Unicode-aware `isalnum()` and ran after NFKC, so
76
+ such characters joined the key. Trailer keys are ASCII, so the prefix is now
77
+ whatever precedes the first ASCII letter or digit, judged both before and after
78
+ NFKC, with the shortest reading winning; Latin look-alikes remain part of the
79
+ key. Found by property-based fuzzing; dataset 1.2.0; regression tests in
80
+ `tests/unit/provenance/test_trailers.py`.
81
+ - **Detection bypass**: Unicode default-ignorable code points that are neither
82
+ control nor format characters (variation selectors, U+034F, Hangul fillers)
83
+ hid a trailer key or an agent alias — `Co-authored\ufe0f-by:` and
84
+ `Clau\u034fde Code` were allowed. `normalize_text` now removes every
85
+ default-ignorable code point (checked against the Unicode 18.0.0 data file).
86
+ Found by property-based fuzzing; dataset 1.3.0.
87
+ - **ReDoS**: the JWT secret-redaction pattern was quadratic (4.6 s on 80 KB of
88
+ `eyJ-eyJ-…`), and redaction runs on untrusted text before truncation. Replaced
89
+ with a linear scan; equivalence checked over 300,000 random strings.
90
+ - **ReDoS**: the workflow `secrets.` check was quadratic (2.7 s on 60 KB of
91
+ `${{${{…`), and the App inspects workflow files fetched from monitored
92
+ repositories. Replaced with two linear steps.
93
+ - **Notification delivery**: `commitguard github serve` never loaded the
94
+ notification settings, so e-mail and webhook notifications were silently never
95
+ delivered. Both entry points now build the service through one factory.
96
+ - **Documentation-driven dependency confusion**: several pages instructed
97
+ `pip install 'commitguard[app]'`, which resolves to an unrelated PyPI project.
98
+ Corrected everywhere; a test now fails if any documentation reintroduces it.
99
+
100
+ ### Added (Phase 10 — external adoption, reproducibility and open source readiness)
101
+
102
+ - `commitguard reproduce all|security|benchmark|integration|github`: re-runs the
103
+ published evidence with PASS / FAIL / SKIPPED / NOT RUN statuses. A skipped step
104
+ is never reported as a pass.
105
+ - `commitguard report security`: assembles `reports/security-report.{json,md}`
106
+ and `benchmark-report.md` from recorded results and test evidence, labelling
107
+ every statement Measured, Tested, Observed, Expected or Not tested.
108
+ - Security test suite (`tests/security/`): property-based fuzzing of every parser
109
+ that handles untrusted input, a ReDoS suite covering all 33 regular expressions
110
+ in the source, and invariant tests (determinism, detector-order independence,
111
+ fail-closed behaviour, the mandatory-policy floor). 350 tests now carry the
112
+ `security` marker; `hypothesis` added to the development dependencies.
113
+ - Dataset versions 1.2.0 (9,157 cases) and 1.3.0 (9,174 cases), written before the
114
+ runs that exposed the corresponding bypasses.
115
+ - `examples/`: basic, github-actions, github-app, organization-policy, exceptions
116
+ and policy-rollout, each with expected results — verified by
117
+ `tests/integration/test_examples.py` against the real engine.
118
+ - `commitguard doctor`: PASS / WARNING / FAIL / NOT CONFIGURED / INFO statuses,
119
+ runtime dependency and GitHub App configuration checks, and `--json`.
120
+ - `commitguard init`: interactive setup when run by a person, `--install-hooks`,
121
+ and `--non-interactive` for scripts and CI.
122
+ - Release engineering: `.github/workflows/release.yml` (validation gate, one
123
+ build, install and smoke test on three operating systems, `SHA256SUMS`, SBOM,
124
+ draft release) and CI jobs for the security suite, cross-platform validation and
125
+ package installation.
126
+ - Documentation: `docs/getting-started/quickstart.md`, `docs/cli/`, `docs/api/`,
127
+ `docs/deployment/`, `docs/operations/runbook.md`, `docs/security/` (threat
128
+ model, boundaries, authorization matrix, review guide, vulnerability and
129
+ incident response, supply chain, CI pipeline review), `docs/research/` (18
130
+ documents), `docs/adr/` (8 records), `docs/maintainers/`, `docs/community/`,
131
+ `docs/support/`, `docs/evidence/`, `evidence/`, `award-evidence/`, `ROADMAP.md`,
132
+ `CITATION.cff`, issue forms, pull request template and `CODEOWNERS`.
133
+
134
+ ### Changed (Phase 10)
135
+
136
+ - `SECURITY.md`: response targets, disclosure policy, safe harbour and the list of
137
+ fixes to date.
138
+ - The workflow policy test now allows write permissions only in a job of a
139
+ workflow that no pull request can trigger, instead of banning them outright.
140
+ - README: an installation section (with the PyPI name-collision warning), the
141
+ reproduction commands and the new documentation index.
142
+
143
+ ### Added (Phase 8 — organization governance, central policy and enterprise security)
144
+
145
+ - Organization governance package (`commitguard.governance`) with 65 `/api/v1`
146
+ routes (`commitguard.api.governance`), documented in `docs/dashboard.md`.
147
+ - Permissions `organization:read/manage`, `security:read/manage`,
148
+ `exceptions:read/create/approve/revoke`, `policies:publish/approve/emergency`
149
+ and `rules:manage`, assigned to the existing roles.
150
+ - Organization security settings (versioned, optimistic concurrency): security
151
+ baseline, policy approval and separation of duties, exception limits and
152
+ approval threshold, onboarding defaults, rollout thresholds, alert
153
+ aggregation, time zone. Relaxing a control needs confirmation, a reason and a
154
+ recent sign-in, and is audited and notified.
155
+ - Repository inventory with separate dimensions (connection, archived,
156
+ onboarding, mode, enforcement, policy propagation); discovery from
157
+ installation events and synchronisation; `enforce` and `monitor` modes;
158
+ installation synchronisation health.
159
+ - Repository groups (archived, never deleted) and background bulk operations
160
+ (group membership, onboarding, mode, monitoring, scans) that are bounded,
161
+ idempotent, retryable, cancellable and audited.
162
+ - Policy targets for organization, repository groups and repositories, with
163
+ **mandatory** (floor) and **default** entries; pure per-rule resolver
164
+ (`commitguard.policies.governance`) with provenance, conflicts, exceptions and
165
+ monitor mode; effective policy cache with same-transaction invalidation,
166
+ background propagation and propagation status; governance versions and
167
+ provenance recorded with every scan.
168
+ - Policy workflow: drafts, submission, approval bound to the document
169
+ fingerprint, rejection, publication against the base version, emergency
170
+ publication (owners, critical audit and notification).
171
+ - Read-only policy simulation of drafts against recorded scans and findings
172
+ with the real policy evaluator, queued with leases and bounded.
173
+ - Staged policy rollouts (pilot repositories, cumulative percentages),
174
+ pause/resume, automatic pause on error or block thresholds, optional
175
+ automatic rollback through the Phase 7 rollback path.
176
+ - Policy exceptions scoped to a repository, group or organization, lowering one
177
+ rule to `warn` or `allow` until expiry; approval rules, separation of duties,
178
+ revocation, expiry worker, expiry warnings and notifications.
179
+ - Organization rules: versioned identity data (AI agents and bots) compiled into
180
+ the trusted rule set without patterns or code; rules version recorded per scan.
181
+ - Scheduled scans of default branches (daily/weekly, time zones) through the
182
+ normal worker, skipping unchanged heads, with per-run records.
183
+ - Security posture with explicit states and reasons, compliance fraction,
184
+ repository security matrix with drift, trends from history and daily
185
+ snapshots, security events with acknowledgement, organization search,
186
+ JSON/CSV compliance reports that state they are not certifications.
187
+ - Notification types `violation_digest`, `policy_approval_requested`,
188
+ `policy_emergency_published`, `policy_rollout_failed`,
189
+ `policy_propagation_failed`, `exception_requested`, `exception_approved`,
190
+ `exception_expiring`, `exception_ended`, `repository_unprotected`,
191
+ `organization_settings_changed`; optional hourly violation digests for
192
+ e-mail and webhooks.
193
+ - Dashboard pages under `/organization` and `/settings/organization`.
194
+ - Documentation: organization governance, policy inheritance, simulation,
195
+ exceptions, rollouts, repository management, security posture and compliance
196
+ reporting; architecture, threat model, deployment, policy management,
197
+ notifications and dashboard updated.
198
+ - Tests: resolver and governance unit tests; integration tests for policies,
199
+ workflow, rollouts, operations, cross-tenant and role sweeps over every
200
+ governance route, a 39-step end-to-end scenario and performance budgets with
201
+ 1,000 repositories; `scripts/benchmark_governance.py` for 10,000 repositories,
202
+ 100,000 scans and 1,000,000 findings.
203
+
204
+ ### Changed (Phase 8)
205
+
206
+ - Database schema 4 (automatic migration; existing repositories become
207
+ `onboarded` in `enforce` mode, so enforcement is unchanged).
208
+ - Audit events are immutable (update trigger); retention purging also removes
209
+ finished simulations, bulk operations and scheduled scan runs.
210
+ - Removing a member's last membership ends their sessions immediately.
211
+ - With `require_policy_approval`, the direct organization policy save returns
212
+ `APPROVAL_REQUIRED`.
213
+ - Policy drafts can be rebased on the current version, accept a publication
214
+ reason, link the rollout they started, keep the diff they published, and
215
+ expose `can_cancel`/`can_emergency_publish`; relaxed settings are listed in
216
+ `error.details.changes`; security events reference their resource.
217
+ - `policy_source` lists the governance layers applied (for example
218
+ `+ group Backend policy v2 + 1 exception(s)`).
219
+
220
+ ### Added (Phase 7 — notifications, merge queue, check re-runs and policy recovery)
221
+
222
+ - Notification subsystem (`commitguard.notifications`): typed notification
223
+ events written to a transactional outbox in the same database transaction as
224
+ the change that caused them; a dispatcher that fans out to per-user in-app
225
+ inbox rows and e-mail/webhook delivery records; a delivery worker with leases,
226
+ bounded retries (1 m, 5 m, 30 m, 2 h; 5 attempts), idempotency keys and
227
+ delivery audit events.
228
+ - Notification types: `critical_violation`, `high_violation` (newly blocked
229
+ violations, one per rule per pull request/branch/merge group per hour),
230
+ `policy_changed`, `policy_rolled_back`, `installation_disconnected`,
231
+ `installation_reconnected` (state transitions only), `merge_queue_failure`,
232
+ `check_rerun_failed`.
233
+ - Channels: in-app notification center (`/notifications`, bell with bounded
234
+ unread counts), SMTP e-mail (`EmailProvider` interface, plain text), and
235
+ HMAC-SHA256 signed webhooks with timestamps, per-endpoint derived secrets
236
+ shown once, public-address checks with pinned connections, and no redirects.
237
+ `COMMITGUARD_NOTIFICATIONS_MODE=test` records deliveries without sending.
238
+ - Preferences: versioned organization settings (`notifications:manage`,
239
+ confirmation to turn deliveries off), organization e-mail recipients and
240
+ webhooks, personal in-app mutes for non-mandatory types; delivery log.
241
+ - GitHub App merge queue support: `merge_group` `checks_requested` scans
242
+ `base_sha..head_sha` and publishes `commitguard-app` on the merge group
243
+ commit; `destroyed` cancels queued scans and ends exposures; refs and head
244
+ commit validated; out-of-order and duplicate events handled; merge queue
245
+ status (`enabled`/`not_enabled`/`unknown`) from rulesets; repository merge
246
+ queue view and `GET /api/v1/repositories/{id}/merge-queue`.
247
+ - Check re-runs: `check_run` and `check_suite` `rerequested` create a new
248
+ execution of the stored scan (matched by `external_id`, installation,
249
+ repository, SHA and check name; other Apps ignored); stale re-runs of
250
+ outdated commits refused and audited; duplicates collapse.
251
+ - Scan executions: `scan_key`, execution number, trigger (`push`,
252
+ `pull_request`, `merge_group`, `manual`, `rerun`, `retry`) and previous
253
+ execution on every job; `GET /api/v1/scans/{id}/executions`; scan detail
254
+ shows execution history and flags differing policy or rules versions.
255
+ - Organization policy rollback (`POST /api/v1/policies/{id}/rollback`,
256
+ `policies:rollback`): a new immutable version restoring an earlier document,
257
+ with reason, confirmation, recent sign-in for weakening rollbacks, optimistic
258
+ concurrency, integrity check, audit event and notification in one
259
+ transaction; `GET /api/v1/policies/{id}/diff`; version history with status,
260
+ lineage, change summaries, compare and rollback dialog in the dashboard.
261
+ - Event records: webhook deliveries store provider, action, processing status,
262
+ attempts and tenant IDs; a failed or abandoned delivery is processed again
263
+ on redelivery.
264
+ - Recovery service: marks abandoned event processing failed and schedules up
265
+ to two automatic retry executions for infrastructure failures; jobs that
266
+ exhaust their attempts are audited and fail their check.
267
+ - Metrics: `github_events_received`, `github_events_failed`,
268
+ `github_events_replayed`, `check_reruns`, `scan_retries`,
269
+ `merge_groups_scanned`, `merge_groups_failed`, `policy_rollbacks`,
270
+ `policy_rollback_failures`, `notifications_created`, `notifications_sent`,
271
+ `notifications_failed`, `notification_retries`.
272
+ - Audit events for scan starts and retries, re-run requests and rejections,
273
+ merge groups, policy rollbacks, notification creation, delivery, failure,
274
+ reads, settings, preferences and webhooks; audit events carry the API
275
+ `request_id`.
276
+ - Documentation: `docs/notifications.md`, `docs/merge-queue.md`,
277
+ `docs/policy-management.md`, `docs/recovery.md`.
278
+ - Tests: notification units, event normalisation, storage and migration,
279
+ merge queue and re-run integration, notification and recovery API tests, the
280
+ Phase 7 lifecycle scenario, Phase 7 performance volumes (100,000
281
+ notifications, 100,000 event records, 10,000 policy versions), frontend
282
+ tests and a browser scenario.
283
+
284
+ ### Changed (Phase 7)
285
+
286
+ - State database schema 3, migrated automatically: scan executions (existing
287
+ re-scans backfilled as manual executions), event processing status, merge
288
+ groups, policy version kind and rollback lineage with triggers that refuse
289
+ updates and deletes of published versions, notification tables.
290
+ - Repositories whose GitHub App installation is suspended or removed, or that
291
+ are no longer granted, are `at_risk` instead of `unprotected`; the overview
292
+ warns that GitHub enforcement is at risk.
293
+ - Superseded scans are shown with the result `stale` instead of `cancelled`.
294
+ - Dashboard **Scan again** creates a new execution of the same scan and is
295
+ refused while one is already queued or running.
296
+ - A late `suspend`, `unsuspend` or `new_permissions_accepted` event no longer
297
+ revives a deleted installation.
298
+ - The optional `merge_queues: read` permission and `check_run`, `check_suite`
299
+ and `merge_group` subscriptions are reported by `commitguard github validate`
300
+ as warnings when missing; installation tokens remain down-scoped to the
301
+ required permissions.
302
+ - Policy page success messages survive the editor remounting after a save.
303
+
304
+ ### Added (Phase 6 — security dashboard and control plane)
305
+
306
+ - Web dashboard (`web/`, React 19 + TypeScript + Vite) served by the App
307
+ service from the same origin: landing page, sign-in, overview, repositories
308
+ and repository detail, scans and scan detail, violations and violation
309
+ detail, policies, rules and rule detail, audit log, GitHub installations and
310
+ installation detail, settings, and a 404 page. Loading, empty, success and
311
+ error states on every page; responsive layouts with a navigation drawer and
312
+ stacked table cards; light and dark themes; WCAG 2.2 AA checks.
313
+ - Dashboard API `/api/v1` (framework-free WSGI, `commitguard.api`):
314
+ consistent `data`/`meta` and `error` envelopes, cursor pagination,
315
+ server-side filtering, allow-listed sorting and search, security headers,
316
+ CORS allow-list, per-user rate limits, request IDs and structured request logs.
317
+ - Sign-in with the GitHub App's user authorization (state bound to the
318
+ browser, PKCE); server-side sessions with hashed tokens, absolute and idle
319
+ expiry, revocation; session-derived CSRF tokens; re-authentication for
320
+ weakening changes.
321
+ - Roles (viewer, security manager, admin, owner) with explicit permissions;
322
+ tenant isolation by GitHub account plus the installations and repositories
323
+ GitHub reports for the user; `commitguard dashboard members list|grant|revoke`.
324
+ - Control plane (`commitguard.controlplane`): scan result recording with
325
+ findings, evidence and commit identities; violation lifecycle (open,
326
+ acknowledged, resolved) driven by pull request and branch exposures;
327
+ versioned organization policy floors with optimistic concurrency, applied to
328
+ App scans through the mandatory-policy floor; reproducibility metadata per
329
+ scan (organization policy version, effective policy, rules and CommitGuard
330
+ versions); scan comparison; re-scans; repository monitoring pause/resume;
331
+ enforcement evidence (Actions workflow detection, required check from
332
+ rulesets and branch protection); installation repository sync; rule catalogue.
333
+ - Audit events with actors and organization scope for sign-in, sessions,
334
+ members, policy changes, violation lifecycle, monitoring, sync, enforcement
335
+ checks and re-scans; `SECURITY_ALERT_TYPES` for future notifications.
336
+ - Tests: two-tenant authorization and IDOR tests for every route, security
337
+ tests (CSRF, CORS, injection, XSS, traversal, secrets in responses and logs,
338
+ rate limits, headers), policy, lifecycle and end-to-end API tests, a
339
+ performance test (100 repositories, 10k scans, 50k findings, 100k audit
340
+ events), Vitest component and page tests, and Playwright browser tests
341
+ (primary scenario, responsive, axe accessibility, CSP, cookies).
342
+ - Docs: `dashboard.md`; deployment, architecture, GitHub App, GitHub
343
+ enforcement, configuration, threat model, README and SECURITY updated.
344
+
345
+ ### Changed (Phase 6)
346
+
347
+ - The GitHub Action is listed as **CommitGuard AI Attribution Check** (the
348
+ name "CommitGuard" is taken on GitHub Marketplace) and declares Marketplace
349
+ branding (`shield`, `gray-dark`). The `uses:` reference is unchanged.
350
+ - State database schema 2 with ordered, transactional migrations; Phase 5
351
+ databases are upgraded in place.
352
+ - The worker records results through `ScanResultRecorder` and evaluates each
353
+ installation with its organization's policy floor.
354
+ - `CIRun` and `ScanResult` carry the effective policies; `Repository.is_ancestor`.
355
+ - Audit events gain `actor_type`, `actor_id`, `actor_login` and `account_id`;
356
+ audit storage fills the account from the installation.
357
+ - Findings now store the author and committer of commits with findings
358
+ (previously no identities were stored); commit messages are still never stored.
359
+ - `RequestRateLimiter` moved to `commitguard.security.rate_limit`.
360
+ - `commitguard github serve` and `wsgi_app_from_environment` serve the dashboard
361
+ when `COMMITGUARD_DASHBOARD_URL` is set.
362
+
363
+ ### Added (Phase 5 — GitHub App and centralised enforcement)
364
+
365
+ - GitHub App service (`commitguard github serve`, optional `app` extra):
366
+ - WSGI webhook endpoint `POST /webhooks/github` with `GET /health` and `GET /ready`;
367
+ - HMAC-SHA256 signature verification, delivery-ID replay protection, size,
368
+ content-type, JSON (duplicate keys, depth) and per-client rate limits;
369
+ - typed events for `installation`, `installation_repositories`, `push` and `pull_request`.
370
+ - App authentication: RS256 JWTs from the App ID and private key (fails closed
371
+ on bad keys); installation tokens down-scoped to one repository and least
372
+ privilege, cached in memory only.
373
+ - Small GitHub REST client:
374
+ - HTTPS only, no redirects, same-origin pagination;
375
+ - normalised errors (401/403/404/409/422/429/5xx/timeouts);
376
+ - bounded retries and rate-limit backoff.
377
+ - Installation lifecycle and authorization: install, uninstall, suspend,
378
+ repositories added and removed, and authorization by repository ID before
379
+ every scan.
380
+ - Metadata-only partial Git mirrors: no checkout, hooks or blobs, and no lazy
381
+ fetch during analysis. Requires Git 2.45+.
382
+ - `ScanService` (`ScanRequest` → `ScanResult` with statistics and a
383
+ deterministic scan ID) and `EnforcementService` (exit codes and check
384
+ conclusions). `commitguard ci github` now uses them.
385
+ - Check Runs `commitguard-app` (pull requests) and `commitguard-app/push`:
386
+ - queued → in_progress → completed lifecycle, with bounded Markdown output;
387
+ - ownership-guarded writes, so a stale scan never overwrites a newer result;
388
+ - the exact scanned SHA, verified before publishing.
389
+ - SQLite state store for deliveries, installations, jobs, check ownership and
390
+ audit events: tenant-scoped reads and configurable retention.
391
+ - Event queue abstraction with an in-process implementation, durable job recovery.
392
+ - Audit events (`audit.models`, `services.audit`); structured JSON logs with
393
+ correlation IDs and secret redaction (`observability`); in-memory metrics.
394
+ - Mandatory policy floor (`policies.mandatory`,
395
+ `COMMITGUARD_APP_MANDATORY_POLICY_FILE`) that repository configuration cannot weaken.
396
+ - Policy weakening detection: CI reports and Check Runs flag commits that would
397
+ disable or relax a trusted policy.
398
+ - `commitguard github validate` (configuration, Git version, authentication,
399
+ permissions, events, installation access) and `commitguard github webhook-test`.
400
+ - Docs: `github-app.md`, `deployment.md`; threat model, configuration,
401
+ architecture and enforcement docs updated.
402
+
403
+ ### Changed (Phase 5)
404
+
405
+ - `services.ci` split into `plan_ci` and `execute_ci_plan`. Commits are
406
+ analysed in batches (`Repository.iter_commits`).
407
+ - `run_git` accepts additional (never overriding) environment variables;
408
+ `Repository` can carry a per-repository Git environment.
409
+ - `CIReport` gains `policy_weakenings`; reports may list a `mandatory:` config source.
410
+ - Roadmap: security intelligence (signatures, secret detection) moves after the dashboard.
411
+
412
+ ### Added (Phase 4 — GitHub server-side enforcement)
413
+
414
+ - `commitguard ci github`: analyses commits introduced by `pull_request`
415
+ (`head ^base`), `merge_group` and `push` events (new branches, deletions,
416
+ annotated tags, force pushes), fails closed (exit 2) on any error, supports
417
+ `--config`, `--fail-on block|warn`, `--max-commits`, `--format json`,
418
+ `--report-file`; writes annotations, job summary and step outputs in Actions.
419
+ - Trusted policy source: CI reads `.commitguard.yaml` from the base / before /
420
+ default-branch commit, never from the change; config changes are reported.
421
+ - `CIContext` (provider-neutral), `GitHubPullRequestContext`,
422
+ `GitHubPushContext`, `GitHubMergeGroupContext`, `CommitRange`, `PolicySource`.
423
+ - Composite `action.yml` (setup-python pinned, hash-pinned dependencies,
424
+ install from the Action's own source) and `requirements/ci.txt`.
425
+ - `.github/workflows/commitguard.yml` now enforces on this repository,
426
+ installing CommitGuard from a trusted commit via `git worktree`.
427
+ - `commitguard init --github` (pinned Action required, never overwrites) and
428
+ `commitguard github setup` (read-only guidance).
429
+ - `commitguard doctor`: rules provenance, GitHub workflow inspection
430
+ (triggers, permissions, pinning, fetch-depth, secrets, cancel-in-progress)
431
+ and an enforcement summary that never claims branch protection.
432
+
433
+ ### Changed
434
+
435
+ - All workflows pin third-party actions to commit SHAs.
436
+ - `Repository.read_blob_at`, `ref_commit`, `object_exists`; pre-push planning
437
+ uses `CommitRange`.
438
+ - Reports gain an optional `ci` section.
439
+
440
+ ### Added (Phase 3 — Git hook enforcement)
441
+
442
+ - `commitguard install` / `uninstall`: managed hooks with `# BEGIN/END COMMITGUARD`
443
+ markers and checksums; existing hooks preserved as `<hook>.pre-commitguard`
444
+ and chained (CommitGuard first, then the original hook with the same stdin);
445
+ refuses shared `core.hooksPath` unless `--allow-shared-hooks-path`.
446
+ - `--global` installation through a Git template directory (`init.templateDir`
447
+ set only when unset; `core.hooksPath` never touched).
448
+ - `commitguard hook pre-commit | commit-msg <file> | pre-push [remote] [url]`,
449
+ all fail closed (exit 2 on any error).
450
+ - pre-push outgoing commit planning: multiple refs, new branches, deletions,
451
+ annotated tags, tags to non-commits, force pushes, merges, detached HEAD,
452
+ pushes to URLs, SHA deduplication, `max_push_commits` bound.
453
+ - commit-msg message cleanup honouring `commit.cleanup` and scissors lines.
454
+ - `enforcement:` configuration section (per-hook switches, push commit limit).
455
+ - `commitguard doctor` rewritten: sections, hook presence/integrity/
456
+ executability/interpreter checks, engine self-test, HEALTHY/DEGRADED/UNHEALTHY.
457
+ - `commitguard check --verbose`; commit subjects in reports.
458
+ - CI matrix on Ubuntu, macOS and Windows; bandit in the security workflow.
459
+ - `.gitattributes` keeping hooks and shell scripts LF.
460
+
461
+ ### Security (Phase 3)
462
+
463
+ - Hooks run `python -P` so a `commitguard/` directory in the repository cannot
464
+ shadow the installed package.
465
+ - Hook reference copies in `hooks/` are generated and verified by tests.
466
+
467
+ ### Added (Phase 2 — AI attribution detection)
468
+
469
+ - Commit model with derived trailers, pending commits and reserved signature field.
470
+ - Lenient, bounded trailer and identity parser recording malformed and evasive
471
+ variants (missing separators, odd key spellings, invisible characters,
472
+ Unicode line separators, trailing escape codes).
473
+ - Rule files as data (`rules/*.yaml`) with strict schemas, cross-validation and
474
+ packaging into the wheel; deterministic identity matcher with confidence levels.
475
+ - Detectors: `coauthor` (`ai_coauthor`), `identity` (`ai_identity`), `trailer`
476
+ (`ai_trailer`, `malformed_trailer`), `bot` (`bot_identity`).
477
+ - Engine skips detectors with no enabled rules and validates finding commit SHAs.
478
+ - Layered configuration: built-in → global → repository → `--config`.
479
+ - Working `commitguard scan` and `commitguard check` (revision ranges,
480
+ `--message-file`, `--format json`, `--quiet`, `--max-commits`).
481
+ - Shared analysis service and JSON/audit-ready report models.
482
+
483
+ ### Changed
484
+
485
+ - Exit codes: `0` allowed, `1` blocked, `2` any error (previously 3/4/5/70).
486
+ - `Finding.rule` renamed to `rule_id`; findings gain `title` and `confidence`;
487
+ `ScanContext` → `CommitContext`, `ScanResult` → `DetectionResult`.
488
+ - Unknown agents are no longer expected to be inferred from name wording.
489
+ - `commit-msg` hook template now calls `commitguard check --quiet --message-file`.
490
+
491
+ ### Security
492
+
493
+ - Invisible and look-alike characters in source files replaced with code points.
494
+ - Unexpected CLI exceptions map to exit code 2 without tracebacks.
495
+
496
+ ## [0.1.0.dev0] - Phase 1
497
+
498
+ ### Added
499
+
500
+ - Phase 1 foundation: project structure, packaging (`pyproject.toml`), CI,
501
+ security and placeholder CommitGuard workflows.
502
+ - CLI skeleton (Typer): `init`, `policy list` and `doctor` are functional;
503
+ `install`, `uninstall`, `scan` and `check` expose their interfaces and exit
504
+ with a "not implemented" status.
505
+ - Strict configuration schema and loader (`.commitguard.yaml`), rejecting
506
+ unknown keys/policies, wrong types, duplicate keys and YAML aliases.
507
+ - Built-in policy defaults and fail-closed policy evaluator.
508
+ - Core models (`Commit`, `Finding`, `Evidence`, `ScanResult`, `Decision`),
509
+ detector interface, explicit detector registry and detection engine.
510
+ - Hardened, read-only Git wrapper: repository discovery and commit reading.
511
+ - Terminal output sanitisation, input validation and hashing helpers.
512
+ - Stub detectors (`coauthor`, `identity`, `trailer`, `bot`), rule data files,
513
+ hook templates, and xfail specifications for Phase 2 and Phase 3.
514
+ - Documentation: architecture, detection engine, policy engine,
515
+ configuration, Git hooks, GitHub enforcement and threat model.
@@ -0,0 +1,26 @@
1
+ cff-version: 1.2.0
2
+ title: "CommitGuard: Git commit provenance and contribution policy enforcement"
3
+ message: "If you reference this project, please cite it as below."
4
+ type: software
5
+ authors:
6
+ - family-names: Oyinlola
7
+ given-names: Oluwayemi
8
+ repository-code: "https://github.com/oyinlola-tech/commitguard"
9
+ url: "https://github.com/oyinlola-tech/commitguard"
10
+ abstract: >-
11
+ CommitGuard is a defence-in-depth security system for enforcing configurable Git
12
+ contribution policies across developer machines, GitHub repositories and
13
+ organizations, with centralised policy governance, auditable security decisions
14
+ and reproducible security validation. Its detection accuracy is measured against
15
+ a versioned labelled dataset, and its benchmark results, including failing runs,
16
+ are published immutably.
17
+ keywords:
18
+ - git
19
+ - security
20
+ - provenance
21
+ - policy-enforcement
22
+ - ai-attribution
23
+ - software-supply-chain
24
+ license: MIT
25
+ version: 0.1.0.dev0
26
+ date-released: "2026-09-17"
@@ -0,0 +1,39 @@
1
+ # Code of Conduct
2
+
3
+ This project adopts the
4
+ [Contributor Covenant, version 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).
5
+
6
+ ## Summary
7
+
8
+ We want CommitGuard to be a welcoming, harassment-free project for everyone,
9
+ regardless of age, body size, visible or invisible disability, ethnicity, sex
10
+ characteristics, gender identity and expression, level of experience,
11
+ education, socio-economic status, nationality, personal appearance, race,
12
+ caste, color, religion, or sexual identity and orientation.
13
+
14
+ Expected behaviour includes empathy and kindness, respect for differing
15
+ opinions, giving and gracefully accepting constructive feedback, and taking
16
+ responsibility for mistakes.
17
+
18
+ Unacceptable behaviour includes sexualised language or imagery, trolling,
19
+ insulting or derogatory comments, personal or political attacks, public or
20
+ private harassment, publishing others' private information without explicit
21
+ permission, and other conduct that could reasonably be considered
22
+ inappropriate in a professional setting.
23
+
24
+ Note that discussions about AI-assisted development can be contentious. Debate
25
+ policies and ideas; do not attack people for how they choose to work.
26
+
27
+ ## Enforcement
28
+
29
+ Project maintainers are responsible for clarifying and enforcing these
30
+ standards and may remove, edit, or reject contributions that do not align
31
+ with them, and may temporarily or permanently ban contributors for behaviour
32
+ they deem harmful.
33
+
34
+ Report incidents privately to the project maintainers.
35
+ <!-- TODO: add a dedicated conduct contact address. -->
36
+
37
+ All complaints will be reviewed and investigated promptly and fairly, and the
38
+ privacy of the reporter will be respected. The full enforcement guidelines are
39
+ those of the Contributor Covenant 2.1 linked above.