|
| 1 | +# SECURITY BOUNDARIES — READ THIS BEFORE EVERY COMMIT |
| 2 | + |
| 3 | +## Classification: What is PUBLIC vs PRIVATE |
| 4 | + |
| 5 | +This project has a hard boundary between open-source tooling and private research infrastructure. Violating this boundary burns disclosure credibility and hands adversaries our methodology. |
| 6 | + |
| 7 | +### PUBLIC (safe to commit to north-echo/fluxgate) |
| 8 | + |
| 9 | +- Detection rules (rules.go, all FG-/GL-/AZ- rule logic) |
| 10 | +- YAML parsers (workflow.go, gitlab.go, azure.go) |
| 11 | +- CLI and command structure (cmd/) |
| 12 | +- Report output formats (JSON, SARIF, table, markdown) |
| 13 | +- Test fixtures (test/fixtures/) — synthetic only, never real workflow files from scanned repos |
| 14 | +- Scanner architecture (scanner.go, finding.go) |
| 15 | +- GitHub API client and batch scanning logic |
| 16 | +- Containerfile, go.mod, go.sum, CI workflows |
| 17 | +- README, CONTRIBUTING, LICENSE, SECURITY, DISCLOSURE |
| 18 | +- .goreleaser.yaml |
| 19 | + |
| 20 | +### PRIVATE (never commit to any public repository) |
| 21 | + |
| 22 | +- **Triage agent prompts** (sonnet-triage.txt, haiku-filter.txt, any prompt files) — these encode exact triage methodology and mitigating factor weights. Publishing them teaches attackers how to evade our assessment. |
| 23 | +- **BigQuery queries** (fg001-candidates.sql, risky-triggers.sql, any .sql files for target discovery) — these are target acquisition logic. |
| 24 | +- **Scan databases** (*.db, *.db-wal, *.db-shm) — contain unpublished findings and repo-specific data. |
| 25 | +- **Triage briefs and disclosure drafts** — any file containing repo-specific vulnerability details, advisory text, or disclosure tracking. |
| 26 | +- **MEMORY.md and session state files** — contain disclosure status, maintainer contact info, and tracking IDs. |
| 27 | +- **API keys, tokens, .env files** — obvious but stated for completeness. |
| 28 | +- **GH Archive hit databases** — contain unpublished monitoring results. |
| 29 | +- **Scan result JSON/SARIF from real repos** — any output from scanning real repositories, as opposed to test fixtures. |
| 30 | + |
| 31 | +### RULES |
| 32 | + |
| 33 | +1. **Never commit prompt files to a public repo.** The triage agent loads prompts from a mounted volume or a private repo. The Containerfile should COPY from a local path, but the prompts directory must be in .gitignore if the repo is public. |
| 34 | + |
| 35 | +2. **Never commit .sql query files to a public repo.** BigQuery discovery queries go in a private repo or stay on the research station only. |
| 36 | + |
| 37 | +3. **Never commit real scan output to a public repo.** Test fixtures are synthetic. If you need a regression test based on a real workflow, anonymize it — change the repo name, strip identifying details, keep only the structural pattern. |
| 38 | + |
| 39 | +4. **Never reference specific unpatched repos by name in commit messages, comments, or documentation.** Use aggregate stats only ("20 confirmed criticals across 16 repos") until the disclosure window closes. |
| 40 | + |
| 41 | +5. **Never embed disclosure tracking IDs (GHSA-*, VULN-*, HackerOne report numbers) in public code or commits.** These go in private tracking only. |
| 42 | + |
| 43 | +6. **The .gitignore must exclude:** `*.db`, `*.db-wal`, `*.db-shm`, `.env`, `prompts/`, `queries/`, `scans/`, `findings/`, `reports/`, `MEMORY.md`, and any directory containing triage output. |
| 44 | + |
| 45 | +7. **Before every push, ask:** "Does this commit contain anything that helps an attacker evade detection or identifies an unpatched target?" If yes, do not push. |
| 46 | + |
| 47 | +8. **When in doubt, keep it private.** Moving something from private to public is easy. Moving it back is impossible. |
0 commit comments