Skip to content

Commit cc4cf10

Browse files
itcmsgrclaude
andauthored
chore(v1.100.1b.D2): GOTH docs/repo cleanup — closes the removal track (#503)
* chore(v1.100.1b.D2): cli/lib core — drop GOTH UI health checks + FHS entry Removes the UI/auth health check + FHS spec entries that became orphan after 1.100.1b.A retired the Web GUI surface. cli/lib/nftban/core/nftban_health.sh: - drop nftban_health_check_gui call site from main check loop - drop matching export - drop nftban-ui.service from optional_services[] - drop /usr/lib/nftban/bin/nftban-ui + nftban-ui-auth from optional_binaries[] (now empty array) - drop nftban-ui from optional_bins[] cli/lib/nftban/core/nftban_health_checks_integrations.sh: - delete nftban_health_check_gui() function in full (199 lines) The function inspected /usr/sbin/nftban-ui binary, GUI service state, /run/nftban-ui auth socket dir, /run/nftban-ui/auth.sock, nftban-ui-auth.service — every target deleted in earlier C2 work. - drop matching export - update header purpose comment (drop "gui" from list) cli/lib/nftban/core/nftban_health_checks_security.sh: - drop nftban-ui.service from systemd-analyze key_services list cli/lib/nftban/core/nftban_fhs_spec.sh: - drop /run/nftban-ui from NFTBAN_FHS_DIRECTORIES (was the auth socket directory; no longer created by tmpfiles after C2 removed the staging entry). cli/lib/nftban/exporters/: - delete nftban_exporter_gui_cache.sh in full — generated UI-only cache files (traffic_history.json, dropped_by_country.json, dropped_by_port.json) that the retired Web GUI consumed. - drop the matching source + generate_gui_cache_files call from nftban_unified_exporter_collect.sh (the only sourcing site). Verified on lab2: go build ./... clean, go test ./internal/... all pass with etc/ shipped, go mod tidy no-op, bash -n clean on all edited shell files. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore(v1.100.1b.D2): cli/lib JSON registries — drop UI surface entries Removes registry entries that referenced the retired Web GUI surface. cli/lib/nftban/data/fhs_directories.json: - drop /run/nftban-ui directory entry (the GUI/API runtime socket directory; no longer created by any installer/tmpfiles path). cli/lib/nftban/data/config-schema.json: - drop NFTBAN_UI_BIN property - drop NFTBAN_AUTH_BIN property - drop NFTBAN_SERVICE_UI property cli/lib/nftban/data/reports-registry.json: - drop the "api" channel entry (depended on nftban-ui.service for its base_endpoint /api/v1/; no daemon serves this endpoint anymore after the Web GUI retirement). Verified: all 3 JSON files parse clean (json.load). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore(v1.100.1b.D2): CI workflows — drop obsolete templ + libpam steps After 1.100.1b.B/C1/C2 deleted all .templ files, _templ.go generated files, msteinert/pam/v2 imports, and PAM-using packages, the templ-install + libpam0g-dev apt-install steps in CI workflows are pure dead steps. Verified: zero .templ / _templ.go / "C" / msteinert/pam references remain in tree (across cmd/, internal/, pkg/). Removed steps: - ci-go.yml: templ install/generate/verify + libpam0g-dev install - build-packages.yml: templ install + libpam0g-dev install - ci-smoke.yml: templ install/generate + libpam0g-dev (kept nftables, jq) - codeql.yml: templ install/generate + libpam0g-dev install - secure-go.yml: templ install/generate + libpam0g-dev install - osv-scanner.yml: libpam0g-dev install + matching comment - project-health.yml: templ install/generate + libpam0g-dev (kept shellcheck/shfmt/yamllint/jq/devscripts/nftables) - release.yml: libpam0g-dev install + 2 decommission comments - slsa-go-releaser.yml: 3 decommission comments - ci-runtime-truth.yml: refresh templ-stub comments to reflect CGO-required (not templ-required) reasoning CGO build flags preserved (still required transitively by nftban-core + nftband; verified by go build ./... on lab2). Also: CHANGELOG entry under [Unreleased] documenting D as the closing phase of the GOTH/UI removal track. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore(v1.100.1b.D2): FHS YAML + tmpfiles — close the regenerator gap CI Policy Gates fired on PR #503 because: - build/fhs-spec.yaml is the source-of-truth that drives build/generate-fhs-outputs.sh - I had manually pre-edited the generated outputs (fhs_directories.json and nftban_fhs_spec.sh) to drop /run/nftban-ui, but missed the YAML source — so the regenerator was emitting the entry back. - This commit removes /run/nftban-ui from the YAML and runs the regenerator, which also drops the matching tmpfiles directive (d /run/nftban-ui 0755 root nftban -). Net mechanical fallout of 1.100.1b.D2 (parallel to the go mod tidy convergence fixes on PRs #500 / #501). After this commit, regenerator output matches committed state (verified locally: ./build/generate-fhs-outputs.sh is a no-op). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7a731be commit cc4cf10

22 files changed

Lines changed: 66 additions & 753 deletions

.github/workflows/build-packages.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,6 @@ jobs:
9393
with:
9494
go-version: '1.25'
9595

96-
- name: Install build dependencies
97-
run: |
98-
sudo apt-get update
99-
sudo apt-get install -y libpam0g-dev
100-
101-
- name: Install templ code generator
102-
run: go install github.com/a-h/templ/cmd/templ@v0.3.977
103-
10496
- name: Build binaries
10597
run: |
10698
chmod +x build.sh

.github/workflows/ci-go.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,12 @@
55
# Purpose: Go code validation, build verification, and test execution
66
#
77
# Checks:
8-
# - templ code generation (up to date)
98
# - go mod tidy (dependencies clean)
109
# - go vet (semantic analysis)
1110
# - go build (all packages + named binaries)
1211
# - go test -race (unit + integration tests with race detector)
1312
# - Binary verification (ELF type, minimum size)
1413
# - CLI structure validation
15-
#
16-
# Note: This merges the former go-check + build-verify jobs into one,
17-
# eliminating duplicate Go/templ/libpam setup (~1 min saved).
1814
# =============================================================================
1915

2016
name: Go Build & Test
@@ -43,9 +39,6 @@ jobs:
4339
with:
4440
go-version: '1.25'
4541

46-
- name: Install build dependencies
47-
run: sudo apt-get update && sudo apt-get install -y libpam0g-dev
48-
4942
- name: Cache Go modules
5043
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.3.0
5144
with:
@@ -55,19 +48,6 @@ jobs:
5548
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
5649
restore-keys: ${{ runner.os }}-go-
5750

58-
- name: Install templ
59-
run: go install github.com/a-h/templ/cmd/templ@v0.3.977
60-
61-
- name: Generate templ files
62-
run: $(go env GOPATH)/bin/templ generate
63-
64-
- name: Verify templ generated files are committed
65-
run: |
66-
git diff --exit-code -- '*_templ.go' || {
67-
echo "::error::Generated *_templ.go files are out of date. Run 'templ generate' and commit."
68-
exit 1
69-
}
70-
7151
# B80-8: Schema drift gate. Regenerate Go schema from canonical shell
7252
# source and fail if the committed schema_generated.go differs.
7353
- name: Verify Go schema matches canonical shell schema
@@ -103,9 +83,6 @@ jobs:
10383
run: |
10484
mkdir -p bin
10585
go build -trimpath -o bin/nftban-core ./cmd/nftban-core
106-
# nftban-ui + nftban-ui-auth: removed from shipped binary list per
107-
# v1.100.1b.A (GOTH PR-D4 stage 1 — stop shipping). Source trees
108-
# remain in repo and are still compiled by `go build ./...` above.
10986
go build -trimpath -o bin/nftband ./cmd/nftband
11087
go build -trimpath -o bin/nftban-validate ./cmd/nftban-validate
11188

.github/workflows/ci-runtime-truth.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ jobs:
8787
run: |
8888
set -Eeuo pipefail
8989
mkdir -p bin
90-
# templ generation is required for nftban-core but not for validate/installer.
91-
# For this gate we only need the binaries on the critical path.
90+
# For this gate we only need the binaries on the critical path
91+
# (validator + installer). nftban-core/nftband are stubbed below
92+
# to keep this job CGO-free.
9293
go build -trimpath -o bin/nftban-validate ./cmd/nftban-validate/
9394
go build -trimpath -o bin/nftban-installer ./cmd/nftban-installer/
94-
# Minimal nftban-core stub is provided if templ is absent — skip.
9595
test -x bin/nftban-validate
9696
test -x bin/nftban-installer
9797
@@ -104,7 +104,7 @@ jobs:
104104
/usr/lib/nftban/health /etc/nftban /etc/logrotate.d
105105
sudo cp bin/nftban-validate /usr/lib/nftban/bin/nftban-validate
106106
sudo cp bin/nftban-installer /usr/lib/nftban/bin/nftban-installer
107-
# Stub the Go-backed binaries whose full build requires templ so
107+
# Stub the CGO-required binaries (nftban-core + nftband) so
108108
# VerifyInventory's required-files check passes. We only need
109109
# existence, not functionality, for the post-install assertion.
110110
sudo install -m 0755 /bin/true /usr/lib/nftban/bin/nftban-core

.github/workflows/ci-smoke.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,7 @@ jobs:
4343
- name: Install system dependencies
4444
run: |
4545
sudo apt-get update -qq
46-
sudo apt-get install -y nftables jq libpam0g-dev
47-
48-
- name: Install templ
49-
run: go install github.com/a-h/templ/cmd/templ@v0.3.977
50-
51-
- name: Generate templ files
52-
run: $(go env GOPATH)/bin/templ generate
46+
sudo apt-get install -y nftables jq
5347
5448
- name: Build CLI binary
5549
run: go build -trimpath -o bin/nftban-core ./cmd/nftban-core/

.github/workflows/codeql.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ jobs:
5050
with:
5151
go-version: '1.25'
5252

53-
- name: Install build dependencies
54-
run: sudo apt-get update && sudo apt-get install -y libpam0g-dev
55-
5653
- name: Cache Go modules
5754
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.3.0
5855
with:
@@ -62,12 +59,6 @@ jobs:
6259
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
6360
restore-keys: ${{ runner.os }}-go-
6461

65-
- name: Install templ
66-
run: go install github.com/a-h/templ/cmd/templ@v0.3.977
67-
68-
- name: Generate templ files
69-
run: $(go env GOPATH)/bin/templ generate
70-
7162
- name: Initialize CodeQL
7263
uses: github/codeql-action/init@f5c2471be782132e47a6e6f9c725e56730d6e9a3 # v3.32.3
7364
with:

.github/workflows/osv-scanner.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ jobs:
5050
with:
5151
go-version: '1.25'
5252

53-
- name: Install build dependencies
54-
run: sudo apt-get update -qq && sudo apt-get install -y libpam0g-dev
55-
5653
- name: Install OSV-Scanner
5754
run: |
5855
curl -sSfL https://github.com/google/osv-scanner/releases/download/v2.3.3/osv-scanner_linux_amd64 -o osv-scanner
@@ -62,7 +59,6 @@ jobs:
6259
- name: Run OSV-Scanner
6360
run: |
6461
# Scan go.mod in lockfile mode
65-
# Go + libpam0g-dev installed so govulncheck call analysis can compile
6662
# Config: osv-scanner.toml suppresses stdlib CVEs (patched by Go toolchain)
6763
# Exit 0 = clean, Exit 1 = vulnerabilities found, Exit 128 = scan error
6864
./osv-scanner scan --config=osv-scanner.toml --lockfile=go.mod \

.github/workflows/project-health.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,9 @@ jobs:
4545
- name: Install linters & tools
4646
run: |
4747
sudo apt-get update
48-
sudo apt-get install -y shellcheck shfmt yamllint jq devscripts nftables libpam0g-dev
48+
sudo apt-get install -y shellcheck shfmt yamllint jq devscripts nftables
4949
npm i -g markdownlint-cli2@0.17.2
5050
51-
- name: Install templ
52-
run: go install github.com/a-h/templ/cmd/templ@v0.3.977
53-
54-
- name: Generate templ files
55-
run: $(go env GOPATH)/bin/templ generate
56-
5751
- name: Run health check
5852
run: .github/ci/health_check.sh
5953

.github/workflows/release.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ jobs:
5959
with:
6060
go-version: '1.25'
6161

62-
- name: Install build dependencies
63-
run: sudo apt-get update && sudo apt-get install -y libpam0g-dev
64-
6562
- name: Build binaries
6663
run: |
6764
chmod +x build.sh
@@ -368,7 +365,6 @@ jobs:
368365
369366
# Copy raw Go binaries that SLSA can't build (require CGO)
370367
# NOTE: nftban-core is built by SLSA workflow with provenance.
371-
# nftban-ui + nftban-ui-auth removed in v1.100.1b.A (GOTH PR-D4 stage 1).
372368
if [ -d "all-packages" ]; then
373369
for binary in nftband; do
374370
if [ -f "all-packages/${binary}" ]; then
@@ -644,7 +640,6 @@ jobs:
644640
# - verify-release job will: download with retry, verify checksums,
645641
# generate final SHA256SUMS, then publish the release
646642
# NOTE: nftban-core is uploaded by SLSA workflow with provenance.
647-
# nftban-ui + nftban-ui-auth removed in v1.100.1b.A (GOTH PR-D4 stage 1).
648643
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
649644
with:
650645
files: |

.github/workflows/secure-go.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ jobs:
5454
with:
5555
go-version: '1.25'
5656

57-
- name: Install build dependencies
58-
run: sudo apt-get update && sudo apt-get install -y libpam0g-dev
59-
6057
- name: Cache Go build
6158
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.3.0
6259
with:
@@ -66,12 +63,6 @@ jobs:
6663
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
6764
restore-keys: ${{ runner.os }}-go-
6865

69-
- name: Install templ
70-
run: go install github.com/a-h/templ/cmd/templ@v0.3.977
71-
72-
- name: Generate templ files
73-
run: $(go env GOPATH)/bin/templ generate
74-
7566
- name: Verify modules tidy
7667
run: |
7768
go mod tidy

.github/workflows/slsa-go-releaser.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@
1515
# Builds:
1616
# - nftban-core (main CLI for firewall operations)
1717
#
18-
# NOTE (v1.100.1b.A): nftban-ui + nftban-ui-auth removed from shipped
19-
# artifact set per GOTH PR-D4 stage 1. SLSA build coverage now scoped
20-
# to nftban-core only. Source trees for the UI surface remain in repo
21-
# but are not built or published.
22-
#
2318
# COORDINATION: This workflow runs AFTER Release Packages completes to avoid
2419
# race conditions when uploading assets to the same GitHub release.
2520
# =============================================================================
@@ -93,7 +88,6 @@ jobs:
9388
# ============================================================================
9489
# Job 2: Assemble all artifacts and upload to release
9590
# ============================================================================
96-
# NOTE (v1.100.1b.A): nftban-ui + nftban-ui-auth removed — GOTH PR-D4 stage 1.
9791
assemble-release:
9892
name: Assemble Release Artifacts
9993
needs: [get-tag, build-nftban-core]
@@ -116,10 +110,6 @@ jobs:
116110
name: ${{ needs.build-nftban-core.outputs.go-provenance-name }}
117111
path: dist/
118112

119-
# nftban-ui artifact + provenance downloads removed in v1.100.1b.A
120-
# (GOTH PR-D4 stage 1 — stop shipping). nftban-ui no longer built
121-
# by SLSA pipeline.
122-
123113
- name: List artifacts
124114
run: ls -la dist/
125115

0 commit comments

Comments
 (0)