Skip to content

Commit 4255053

Browse files
authored
release: v1.95.0 — smoke/selftest split + G20 CI gate (#455)
release: v1.95.0 — smoke/selftest split + G20 CI gate
2 parents 0aad6a8 + 8317ed2 commit 4255053

22 files changed

Lines changed: 1587 additions & 1023 deletions

.github/workflows/ci-architecture.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ jobs:
357357
# G8-1/G8-2/G8-3 run as Go tests (already in ci-go.yml via go test ./...)
358358
# G8-4 is a runtime smoke test — skips gracefully in CI (no validator binary)
359359
- name: Module smoke test (G8-4)
360-
run: bash cli/lib/nftban/tests/test_module_smoke.sh
360+
run: bash cli/lib/nftban/tests/test_module_selftest.sh
361361

362362
# =====================================================================
363363
# v1.86 B86-4: Contract Enforcement — Legacy Regression Blockers

.github/workflows/ci-smoke.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,29 @@ jobs:
9898
9999
- name: Smoke test — fhs verify
100100
run: nftban fhs verify 2>&1 | head -20 || true
101+
102+
- name: "G20 Smoke Gate — registry-driven smoke"
103+
run: |
104+
# Run Go registry-driven smoke. CI environment will SKIP daemon/module
105+
# checks (no systemd, no live daemon) — that's correct behavior.
106+
# FAIL on: runtime errors, contract violations, malformed output.
107+
SMOKE_OUTPUT=$(bin/nftban-core smoke --json 2>&1) || true
108+
echo "$SMOKE_OUTPUT"
109+
110+
# Validate JSON parseable
111+
if ! echo "$SMOKE_OUTPUT" | jq empty 2>/dev/null; then
112+
echo "::error::G20 Smoke Gate: smoke --json output is not valid JSON"
113+
exit 1
114+
fi
115+
116+
# Check for FAIL or INTERNAL_ERROR
117+
FAIL_COUNT=$(echo "$SMOKE_OUTPUT" | jq -r '.summary.fail // 0')
118+
if [ "$FAIL_COUNT" != "0" ]; then
119+
echo "::error::G20 Smoke Gate: $FAIL_COUNT test(s) FAILED"
120+
echo "$SMOKE_OUTPUT" | jq '.tests[] | select(.status == "FAIL")'
121+
exit 1
122+
fi
123+
124+
PASS_COUNT=$(echo "$SMOKE_OUTPUT" | jq -r '.summary.pass // 0')
125+
SKIP_COUNT=$(echo "$SMOKE_OUTPUT" | jq -r '.summary.skip // 0')
126+
echo "G20 Smoke Gate: PASS ($PASS_COUNT pass, $SKIP_COUNT skip, 0 fail)"

.github/workflows/secure-go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
run: go install github.com/securego/gosec/v2/cmd/gosec@v2.22.0
9696

9797
- name: Run gosec (SARIF)
98-
run: $(go env GOPATH)/bin/gosec -fmt sarif -out gosec.sarif ./... || true
98+
run: $(go env GOPATH)/bin/gosec -nosec -fmt sarif -out gosec.sarif ./... || true
9999

100100
- name: Fix gosec SARIF relationships
101101
run: |

CONTRIBUTING.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Please read our [Code of Conduct](.github/CODE_OF_CONDUCT.md) before contributin
6666
1. Fork the repository
6767
2. Create a feature branch: `git checkout -b feature/your-feature`
6868
3. Make your changes
69-
4. Run tests: `nftban smoke`
69+
4. Run smoke tests: `nftban smoke` (non-destructive) or `nftban selftest` (lab/deep validation)
7070
5. Commit with clear messages
7171
6. Push and create a PR
7272

@@ -312,9 +312,12 @@ wip
312312
### Running Tests
313313

314314
```bash
315-
# Quick smoke test
315+
# Non-destructive smoke (safe for CI, routine checks)
316316
nftban smoke
317317

318+
# Extended system validation (includes controlled state changes — ban/unban lifecycle, whitelist tests)
319+
nftban selftest
320+
318321
# Full test suite
319322
./tests/test_all_commands.sh
320323

@@ -327,7 +330,7 @@ go test ./...
327330

328331
### Test Before PR
329332

330-
1. All commands work: `nftban smoke`
333+
1. Smoke tests pass: `nftban smoke` (non-destructive, CI-safe)
331334
2. ShellCheck passes (warnings OK)
332335
3. Go builds without errors
333336
4. No regressions in existing functionality

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
**Linux Intrusion Prevention System & nftables Firewall Manager**
44

5-
[![Version](https://img.shields.io/badge/version-1.83.1-blue)](https://github.com/itcmsgr/nftban/releases)
5+
[![Version](https://img.shields.io/badge/version-1.95.0-blue)](https://github.com/itcmsgr/nftban/releases)
66
[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)
7-
[![Go](https://img.shields.io/badge/Go-1.24-00ADD8.svg)](https://go.dev/)
7+
[![Go](https://img.shields.io/badge/Go-1.25-00ADD8.svg)](https://go.dev/)
88
[![FHS Compliant](https://img.shields.io/badge/FHS-Compliant-success)]()
99

1010
### CI/CD Status

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.94.0
1+
1.95.0

0 commit comments

Comments
 (0)