|
| 1 | +# NFTBan — Integrity & Build Status |
| 2 | + |
| 3 | +> **Policy:** Main branch is always green. Failed CI blocks merge. |
| 4 | +> No exceptions, no manual overrides for truth-critical checks. |
| 5 | +
|
| 6 | +**Current version:** v1.88.0 |
| 7 | +**Last audit:** 2026-04-16 |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +## Build & Test |
| 12 | + |
| 13 | +| Workflow | What it verifies | Frequency | Status | |
| 14 | +|----------|-----------------|-----------|--------| |
| 15 | +| [Go Build & Test](https://github.com/itcmsgr/nftban/actions/workflows/ci-go.yml) | Go compilation, unit tests (race detector), module completeness (G8-1/G8-2/G8-3), schema version lock | Every PR + push | [](https://github.com/itcmsgr/nftban/actions/workflows/ci-go.yml) | |
| 16 | +| [Bash Validation](https://github.com/itcmsgr/nftban/actions/workflows/ci-bash.yml) | Shell syntax, strict mode compliance, header spec | Every PR + push | [](https://github.com/itcmsgr/nftban/actions/workflows/ci-bash.yml) | |
| 17 | +| [ShellCheck](https://github.com/itcmsgr/nftban/actions/workflows/shellcheck.yml) | Static analysis of all shell scripts | Every PR + push | [](https://github.com/itcmsgr/nftban/actions/workflows/shellcheck.yml) | |
| 18 | +| [Build Packages](https://github.com/itcmsgr/nftban/actions/workflows/build-packages.yml) | RPM (el9/el10) + DEB (debian12/13, ubuntu22/24) build + install test | Every PR + push | [](https://github.com/itcmsgr/nftban/actions/workflows/build-packages.yml) | |
| 19 | +| [Docker](https://github.com/itcmsgr/nftban/actions/workflows/docker.yml) | Container image build | Every PR + push | [](https://github.com/itcmsgr/nftban/actions/workflows/docker.yml) | |
| 20 | +| [Smoke Test](https://github.com/itcmsgr/nftban/actions/workflows/ci-smoke.yml) | CLI command execution, runtime anomaly checks | Every PR + push | [](https://github.com/itcmsgr/nftban/actions/workflows/ci-smoke.yml) | |
| 21 | + |
| 22 | +## Architecture & Contract Enforcement |
| 23 | + |
| 24 | +| Workflow | What it verifies | Frequency | Status | |
| 25 | +|----------|-----------------|-----------|--------| |
| 26 | +| [Architecture Policy](https://github.com/itcmsgr/nftban/actions/workflows/ci-architecture.yml) | FHS spec drift, schema codegen sync, vocabulary (G1-1), schema version (G2-3), module smoke (G8-4), legacy regression blockers (B86-1/M84-2 guards) | Every PR + push | [](https://github.com/itcmsgr/nftban/actions/workflows/ci-architecture.yml) | |
| 27 | +| [Documentation Validation](https://github.com/itcmsgr/nftban/actions/workflows/ci-docs.yml) | Markdown lint, link validation, doc completeness | Every PR + push | [](https://github.com/itcmsgr/nftban/actions/workflows/ci-docs.yml) | |
| 28 | +| [Project Health](https://github.com/itcmsgr/nftban/actions/workflows/project-health.yml) | Repository health metrics, stale issues, PR hygiene | Scheduled | [](https://github.com/itcmsgr/nftban/actions/workflows/project-health.yml) | |
| 29 | + |
| 30 | +## Security (SAST + SCA + Secrets) |
| 31 | + |
| 32 | +| Workflow | What it verifies | Frequency | Status | |
| 33 | +|----------|-----------------|-----------|--------| |
| 34 | +| [CodeQL](https://github.com/itcmsgr/nftban/actions/workflows/codeql.yml) | Go semantic code analysis (GitHub Advanced Security) | Every PR + push | [](https://github.com/itcmsgr/nftban/actions/workflows/codeql.yml) | |
| 35 | +| [Semgrep](https://github.com/itcmsgr/nftban/actions/workflows/semgrep.yml) | Pattern-based security rules (Go + Shell) | Every PR + push | [](https://github.com/itcmsgr/nftban/actions/workflows/semgrep.yml) | |
| 36 | +| [Secure Go](https://github.com/itcmsgr/nftban/actions/workflows/secure-go.yml) | gosec + staticcheck + govulncheck + Trivy | Every PR + push | [](https://github.com/itcmsgr/nftban/actions/workflows/secure-go.yml) | |
| 37 | +| [OSV-Scanner](https://github.com/itcmsgr/nftban/actions/workflows/osv-scanner.yml) | Google OSV vulnerability database scan | Every PR + weekly | [](https://github.com/itcmsgr/nftban/actions/workflows/osv-scanner.yml) | |
| 38 | +| [Gitleaks](https://github.com/itcmsgr/nftban/actions/workflows/gitleaks.yml) | Secret/credential detection in commits | Every PR + push | [](https://github.com/itcmsgr/nftban/actions/workflows/gitleaks.yml) | |
| 39 | +| [Fuzz Tests](https://github.com/itcmsgr/nftban/actions/workflows/fuzz.yml) | Automated fuzz testing for parser robustness | Nightly | [](https://github.com/itcmsgr/nftban/actions/workflows/fuzz.yml) | |
| 40 | +| [Dependency Review](https://github.com/itcmsgr/nftban/actions/workflows/dependency-review.yml) | PR-level dependency diff analysis | Every PR | [](https://github.com/itcmsgr/nftban/actions/workflows/dependency-review.yml) | |
| 41 | +| [Socket Supply Chain](https://github.com/itcmsgr/nftban/actions/workflows/socket-supplychain.yml) | Typosquatting and malicious package detection | Every PR | [](https://github.com/itcmsgr/nftban/actions/workflows/socket-supplychain.yml) | |
| 42 | + |
| 43 | +## Compliance & Supply Chain |
| 44 | + |
| 45 | +| Workflow | What it verifies | Frequency | Status | |
| 46 | +|----------|-----------------|-----------|--------| |
| 47 | +| [OSSRA Remediation](https://github.com/itcmsgr/nftban/actions/workflows/ossra-remediation.yml) | License compliance (go-licenses), SPDX headers, dependency freshness (libyear), URL validation (Lychee) | Every PR + push | [](https://github.com/itcmsgr/nftban/actions/workflows/ossra-remediation.yml) | |
| 48 | +| [OpenSSF Scorecard](https://github.com/itcmsgr/nftban/actions/workflows/scorecard.yml) | OpenSSF security health score | Scheduled | [](https://github.com/itcmsgr/nftban/actions/workflows/scorecard.yml) | |
| 49 | +| [SLSA Go Releaser](https://github.com/itcmsgr/nftban/actions/workflows/slsa-go-releaser.yml) | SLSA Level 3 provenance attestation | On release | — | |
| 50 | + |
| 51 | +--- |
| 52 | + |
| 53 | +## Contract Gates (v1.84+) |
| 54 | + |
| 55 | +These are **blocking** — a PR cannot merge if any gate fails. |
| 56 | + |
| 57 | +| Gate | What it enforces | Since | Workflow | |
| 58 | +|------|-----------------|-------|----------| |
| 59 | +| G1-1 | No banned terms in CLI output (vocabulary discipline) | v1.84 | ci-architecture.yml | |
| 60 | +| G2-3 | Schema version: Go source = CLI expectation | v1.84 | ci-architecture.yml | |
| 61 | +| G8-1 | Every CORE module in ModuleHealthMap + JSON | v1.85 | ci-go.yml (Go tests) | |
| 62 | +| G8-2 | Every config directory has a classification | v1.85 | ci-go.yml (Go tests) | |
| 63 | +| G8-3 | IPv6 parity: no IPv4-only evaluator checks | v1.85 | ci-go.yml (Go tests) | |
| 64 | +| G8-4 | Cross-surface module consistency (validator = health) | v1.85 | ci-architecture.yml | |
| 65 | +| B86-1 | No ModuleTruth reintroduction | v1.86 | ci-architecture.yml | |
| 66 | +| M84-2 | No legacy fallback reintroduction | v1.86 | ci-architecture.yml | |
| 67 | +| M87-1 | Evidence schema version lock (1.88.0) | v1.87 | ci-go.yml (Go tests) | |
| 68 | +| M87-2 | Correlation enum restricted to allowed values | v1.87 | ci-go.yml (Go tests) | |
| 69 | +| M87-3 | EvidenceSnapshot golden JSON must not drift | v1.87 | ci-go.yml (Go tests) | |
| 70 | +| M88-1 | Journal evidence must not affect truth authority | v1.88 | ci-go.yml (Go tests) | |
| 71 | + |
| 72 | +## Host Runtime Gate (pre-release) |
| 73 | + |
| 74 | +| Test | What it verifies | File | |
| 75 | +|------|-----------------|------| |
| 76 | +| CLI runtime smoke | 27 CLI commands execute without bash errors | test_cli_runtime.sh | |
| 77 | + |
| 78 | +This gate runs on deployed hosts before release tagging. |
| 79 | +It catches runtime failures (bad array subscript, unbound variable, syntax error) |
| 80 | +that cannot be detected in CI containers without nftables/systemd. |
| 81 | + |
| 82 | +## Runtime Tests (host-deployed) |
| 83 | + |
| 84 | +These require a deployed system and are not part of PR CI: |
| 85 | + |
| 86 | +| Test | What it verifies | File | |
| 87 | +|------|-----------------|------| |
| 88 | +| G2-1 | Truth consistency: validator status = health status | test_truth_consistency.sh | |
| 89 | +| G7-3 | Exit code contract: 0=PROTECTED, 1=DEGRADED, 2=DOWN | test_exit_code_consistency.sh | |
| 90 | +| G8-4 | Module list: validator JSON = health JSON | test_module_smoke.sh | |
| 91 | + |
| 92 | +--- |
| 93 | + |
| 94 | +## Known Issues |
| 95 | + |
| 96 | +| Issue | Severity | Status | |
| 97 | +|-------|----------|--------| |
| 98 | +| gosec SARIF alerts on installer G104 | LOW | Dismissed as false positive (pre-existing, not PR-related) | |
| 99 | + |
| 100 | +--- |
| 101 | + |
| 102 | +## Health Policy |
| 103 | + |
| 104 | +- **Main is always green.** Failed CI blocks merge. |
| 105 | +- **No manual overrides** for truth-critical checks (G1-1, G2-3, G8-*). |
| 106 | +- **Failing badge = working system.** It proves CI is active and catching issues. |
| 107 | +- **Every release is CI-gated.** No tag without green pipeline. |
| 108 | +- **Evidence over claims.** Click any badge to see full run logs. |
| 109 | + |
| 110 | +--- |
| 111 | + |
| 112 | +## How to Verify |
| 113 | + |
| 114 | +```bash |
| 115 | +# On any deployed host: |
| 116 | +nftban-validate --json | jq '.status' # Kernel truth |
| 117 | +nftban health --json | jq '.status' # CLI agrees |
| 118 | +nftban metrics evidence # Evidence snapshot |
| 119 | +nftban metrics evidence-json | jq '.correlation' # Correlation diagnostic |
| 120 | +``` |
| 121 | + |
| 122 | +All outputs are verifiable against the [contract rules](docs/CONTRACT_RULES.md). |
0 commit comments