Spaces:
Sleeping
Promote dev to main: restore CODEOWNERS + security-posture doc (#15)
Browse files* ci: add CODEOWNERS for restructure
* docs: add github-security-posture per decode-ai-standards
* Refresh CODEOWNERS + posture doc to match current branch-protection model (#6)
* Refresh .github/CODEOWNERS to match current branch-protection model
* Refresh docs/github-security-posture.md to match current branch-protection model
* [ai-standards][slice-2] structure and dependency reproducibility (#8)
* [ai-standards][slice-1] orientation and deploy boundary (#7)
Adds docs-only governance artifacts per the shrunken slice-1 plan
(post hardening commits 1878a50..c7599a7). No changes to app code,
requirements, devcontainer, .streamlit, existing workflows, existing
.claude/.githooks, or CLAUDE.md. README.md changes are additive only.
Artifacts:
- AGENTS.md (thin entrypoint -> CLAUDE.md + docs/INDEX.md)
- SECURITY.md (HF_TOKEN handling, deploy boundary)
- docs/ (INDEX, architecture, reference, guides, progress)
- .github/pull_request_template.md (deploy-boundary checklist)
- scripts/repo_validate.py (py_compile sweep + requirements parse)
- .github/workflows/repo_validate.yml (PR-only, parallel to gate.yml)
- README.md: additive Verification + Branch & Deploy + Architecture sections
Refs decode-ai-standards@81c3f17.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [ai-standards][slice-2] structure and dependency reproducibility
Adds dependency reproducibility artifacts and policy/runbook documentation
per the shrunken slice-2 plan (workflow hardening deferred to a later slice
on user instruction to keep deploy risk at zero for this slice).
Artifacts:
- pyproject.toml (PEP 621 metadata; no [project.dependencies] to avoid
drift; requirements.txt remains the source of truth consumed by HF Spaces)
- requirements.lock (47 packages, autogenerated by
`uv pip compile --python-version=3.12 requirements.txt`)
- .python-version (3.12; matches runtime.txt and HF Spaces)
- .env.example (comment-only; declares no local env vars; documents
HF_TOKEN as a GitHub Actions secret consumed only by main.yml)
- docs/policies/naming-conventions.md (tab<N>.py rule, helper.py role,
what we explicitly do NOT do)
- docs/policies/root-artifact-policy.md (what is tracked at root, what is
gitignored, what is tolerated locally)
- docs/runbooks/local-setup.md (Windows / macOS / Linux setup walkthrough,
troubleshooting table)
- docs/INDEX.md (link the three new docs under new ## policies and
## runbooks sections; remove their entries from the "planned" stub)
Out of scope (deferred):
- Workflow SHA pinning + permissions blocks on main.yml, gate.yml,
check-file-size.yml β deferred to a later slice because main.yml is the
HF deploy pipeline and deserves its own focused PR + verification cycle
- .gitignore additions for .ruff_cache/, .venv/, .pytest_cache/ β deferred
No changes to app code (app.py, helper.py, tab1.py-tab8.py), requirements.txt,
runtime.txt, .streamlit/, .devcontainer/, existing workflows, existing
.githooks/, existing .claude/, CLAUDE.md, or .gitignore. HF Spaces deploy
is a no-op for this slice because no runtime file is touched.
Refs decode-ai-standards@81c3f17.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: FloWeinert <weinert@decodemarketing.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- .github/CODEOWNERS +8 -0
- docs/github-security-posture.md +60 -0
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CODEOWNERS for icat_app
|
| 2 |
+
# Default reviewers for any change. Branch protection requires their
|
| 3 |
+
# approval for developer PRs; they bypass it for their own self-merges.
|
| 4 |
+
* @matussekatdecode
|
| 5 |
+
|
| 6 |
+
# Lock down the CODEOWNERS file itself β changes require approval from
|
| 7 |
+
# named admins or existing code reviewers (prevents silent edits).
|
| 8 |
+
.github/CODEOWNERS @FloWeinert @matussekatdecode
|
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# GitHub Security Posture β `icat_app`
|
| 2 |
+
|
| 3 |
+
Per [decode-ai-standards](https://github.com/implicitdiagnosticsandsolutions/decode-ai-standards) C11 + C36. This file documents what's enabled, what isn't, and the branch mapping for this repo.
|
| 4 |
+
|
| 5 |
+
## Branch model
|
| 6 |
+
|
| 7 |
+
| Role | Branch name | Notes |
|
| 8 |
+
|---|---|---|
|
| 9 |
+
| **Production** | `main` | Protected. Push restricted to code reviewers. |
|
| 10 |
+
| **Staging** | `staging` | Protected. Push restricted to code reviewers. |
|
| 11 |
+
| **Working** (dev) | `dev` | Protected. Default branch. Devs PR feature branches here. |
|
| 12 |
+
|
| 13 |
+
Per decode-ai-standards, the mapping is: `dev β dev`, `staging β staging`, `main β prod`.
|
| 14 |
+
|
| 15 |
+
## Admins
|
| 16 |
+
|
| 17 |
+
| Role | User |
|
| 18 |
+
|---|---|
|
| 19 |
+
| Primary admin | `@FloWeinert` |
|
| 20 |
+
| Backup admin | `@matussekatdecode` |
|
| 21 |
+
| Additional admins | (none) |
|
| 22 |
+
|
| 23 |
+
Admins configure branch protection, secrets, and webhooks. **Admins are NOT in the push-restriction list** and "Do not allow bypassing" is enabled β admin merges go through the same PR + review flow as everyone else. Emergency bypass requires deliberate rule-edit (audited org-wide).
|
| 24 |
+
|
| 25 |
+
## Code reviewers (listed in `.github/CODEOWNERS`)
|
| 26 |
+
|
| 27 |
+
For developer PRs: their approval is required (`require_code_owner_reviews: true` + `required_approving_review_count: 1`). For their own PRs: they bypass the approval requirement via `bypass_pull_request_allowances` and self-merge (since GitHub blocks self-approval). They're also the only ones who can click Merge on protected branches (push restriction).
|
| 28 |
+
|
| 29 |
+
- `@matussekatdecode`
|
| 30 |
+
|
| 31 |
+
## Outside collaborators
|
| 32 |
+
|
| 33 |
+
| Login | Permission | Notes |
|
| 34 |
+
|---|---|---|
|
| 35 |
+
| β | β | None on this repo |
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
## Branch protection rules summary
|
| 39 |
+
|
| 40 |
+
All three protected branches (`main`, `staging`, `dev`):
|
| 41 |
+
- β Require pull request before merging (audit trail)
|
| 42 |
+
- β Require 1 CODEOWNER approval (`required_approving_review_count: 1` + `require_code_owner_reviews: true`) β UI nudge for codeowners to actually review developer PRs
|
| 43 |
+
- β Codeowners in `bypass_pull_request_allowances` β they can merge their own PRs without needing self-approval (which GitHub blocks)
|
| 44 |
+
- β Do not allow bypassing the above settings (admins NOT in the bypass list β emergencies use the 4-step deliberate procedure)
|
| 45 |
+
- β Restrict who can push: code reviewers only
|
| 46 |
+
- β Block force-push
|
| 47 |
+
- β Block branch deletion
|
| 48 |
+
|
| 49 |
+
On `main` and `staging` only:
|
| 50 |
+
- β Require linear history
|
| 51 |
+
|
| 52 |
+
## Change log
|
| 53 |
+
|
| 54 |
+
| Date | Change | By |
|
| 55 |
+
|---|---|---|
|
| 56 |
+
| 2026-MM-DD | Initial posture created during org restructure | FloWeinert (applied via `scripts/apply-per-repo.py`) |
|
| 57 |
+
|
| 58 |
+
---
|
| 59 |
+
|
| 60 |
+
*This file is checked into the repo so any change requires a PR β the protection model is self-protecting via the `.github/CODEOWNERS` lockdown rule on this file.*
|