Skip to content

Commit 7cc40e1

Browse files
fabriziosalmiclaude
andcommitted
chore: fix GitHub repo config — CI, dependabot, templates, changelog
CI: - Standardize Go version to 1.24 across all jobs (waf was 1.22) - npm audit now fails on critical vulns (was silently passing with || true) - Update waf-go/go.mod from go 1.21 to go 1.24 Dependabot: - Remove dead pip entries for /backend and /waf (Python paths don't exist) - Add /backend-go gomod tracking (was missing entirely) Workflows: - Remove defunct feat/fastapi-migration branch from docs.yml triggers GitHub templates: - Add bug report issue template (version, logs, deployment method) - Add feature request issue template (area selector) - Add PR template with test checklist - Add CODEOWNERS (@fabriziosalmi for all files) Changelog: - Add v3.3.0 (performance) and v3.3.1 (caching overhaul) entries Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ac76be3 commit 7cc40e1

9 files changed

Lines changed: 143 additions & 17 deletions

File tree

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Default owner for everything
2+
* @fabriziosalmi

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Bug Report
2+
description: Report a bug or unexpected behavior
3+
labels: ["bug"]
4+
body:
5+
- type: textarea
6+
id: description
7+
attributes:
8+
label: Description
9+
description: What happened? What did you expect instead?
10+
validations:
11+
required: true
12+
13+
- type: textarea
14+
id: steps
15+
attributes:
16+
label: Steps to reproduce
17+
description: Minimal steps to trigger the issue
18+
placeholder: |
19+
1. Go to Settings
20+
2. Enable aggressive caching
21+
3. Click "Reload Config"
22+
4. See error in logs
23+
24+
- type: textarea
25+
id: logs
26+
attributes:
27+
label: Relevant logs
28+
description: Paste backend/proxy/browser console output
29+
render: shell
30+
31+
- type: input
32+
id: version
33+
attributes:
34+
label: Version
35+
description: Output of the sidebar version badge (e.g. 3.3.1 go)
36+
placeholder: "3.3.1"
37+
38+
- type: dropdown
39+
id: deployment
40+
attributes:
41+
label: Deployment method
42+
options:
43+
- Docker Compose (default)
44+
- Manual / bare metal
45+
- Other

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Feature Request
2+
description: Suggest a new feature or improvement
3+
labels: ["enhancement"]
4+
body:
5+
- type: textarea
6+
id: problem
7+
attributes:
8+
label: Problem or use case
9+
description: What are you trying to do? Why is the current behavior insufficient?
10+
validations:
11+
required: true
12+
13+
- type: textarea
14+
id: solution
15+
attributes:
16+
label: Proposed solution
17+
description: How should it work? Include config examples, UI mockups, or API shapes if relevant.
18+
19+
- type: dropdown
20+
id: area
21+
attributes:
22+
label: Area
23+
options:
24+
- Dashboard / UI
25+
- Proxy (Squid)
26+
- WAF
27+
- DNS (dnsmasq)
28+
- Backend API
29+
- Settings / Configuration
30+
- CI / Deployment
31+
- Documentation
32+
- Other

.github/dependabot.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,12 @@ updates:
99
patterns:
1010
- "*"
1111

12-
- package-ecosystem: "pip"
13-
directory: "/backend"
14-
schedule:
15-
interval: "weekly"
16-
groups:
17-
backend-dependencies:
18-
patterns:
19-
- "*"
20-
21-
- package-ecosystem: "pip"
22-
directory: "/waf"
12+
- package-ecosystem: "gomod"
13+
directory: "/backend-go"
2314
schedule:
2415
interval: "weekly"
2516
groups:
26-
waf-dependencies:
17+
backend-go-dependencies:
2718
patterns:
2819
- "*"
2920

.github/pull_request_template.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Summary
2+
3+
<!-- What does this PR do? Why? -->
4+
5+
## Changes
6+
7+
-
8+
9+
## Test plan
10+
11+
- [ ] `go test ./...` passes (backend-go)
12+
- [ ] `go test ./...` passes (waf-go)
13+
- [ ] `npm run build && npm test` passes (ui)
14+
- [ ] `docker compose build` succeeds
15+
- [ ] Manual smoke test on local stack
16+
17+
## Related issues
18+
19+
<!-- Closes #123 -->

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- uses: actions/checkout@v4
5050
- uses: actions/setup-go@v5
5151
with:
52-
go-version: '1.22'
52+
go-version: '1.24'
5353
cache-dependency-path: waf-go/go.sum
5454
- run: go build -v ./...
5555
working-directory: waf-go
@@ -82,7 +82,7 @@ jobs:
8282
- uses: actions/checkout@v4
8383
- uses: actions/setup-go@v5
8484
with:
85-
go-version: '1.22'
85+
go-version: '1.24'
8686
cache-dependency-path: waf-go/go.sum
8787
- run: go test -v -race -count=1 ./...
8888
working-directory: waf-go
@@ -113,7 +113,7 @@ jobs:
113113
working-directory: ui
114114
run: |
115115
npm ci
116-
npm audit --audit-level=high || true
116+
npm audit --audit-level=critical
117117
118118
# ── 7. Docker build verification ──────────────────────────────────────
119119
docker-build:

.github/workflows/docs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
- feat/fastapi-migration
87
paths:
98
- 'docs/**'
109
- '.github/workflows/docs.yml'

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,44 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [3.3.1] - 2026-04-08
9+
10+
### Fixed
11+
12+
- **Real cache statistics**: `GET /api/cache/statistics` now queries live Squid metrics via `squidclient mgr:info` (Docker exec) instead of returning hardcoded zeros
13+
- **Cache clear works**: `POST /api/maintenance/clear-cache` uses `squid -k purge` via Docker exec instead of posting to a non-existent HTTP endpoint
14+
- **Config generation no longer overridden**: `custom_squid.conf` auto-migrated to `custom_squid_extra.conf` (append-only); all cache/memory/performance settings from the UI are now applied
15+
- **`aggressive_caching_enabled` toggle functional**: writes override-expire refresh patterns for static assets, packages, media files
16+
- **`cache_bypass_domains` functional**: comma-separated domain list in Settings generates Squid ACL + `cache deny` rules
17+
- **`enable_offline_mode` functional**: enables `offline_mode on` + aggressive stale serving
18+
- **Duplicate refresh patterns removed**: single consistent set in generated squid.conf
19+
- **Added `cachemgr_passwd`** directive so squidclient can access cache manager stats
20+
21+
### Added
22+
23+
- `ExecContainer` method in Docker client (full Docker API exec flow with stream mux header stripping)
24+
- Settings handler writes toggle files + `cache_bypass_domains.txt` for Squid
25+
26+
## [3.3.0] - 2026-04-08
27+
28+
### Performance
29+
30+
- **SQLite WAL mode fix**: `modernc.org/sqlite` driver now correctly activates WAL mode (`_pragma=` syntax), eliminating `database is locked` errors
31+
- **WebSocket/CORS origin fix**: IP-based access now works for WebSocket and CORS headers
32+
- **DashboardSummary optimized**: 8 separate COUNT queries consolidated into single aggregate query
33+
- **Bubble sort replaced**: `sort.Slice` in ShadowIT handler (O(n^2) to O(n log n))
34+
- **CIDR networks pre-compiled**: rate limiter no longer parses 4 CIDR strings per request
35+
- **Log tailer buffered**: `bufio.Scanner` replaces `io.ReadAll`, preventing unbounded memory usage
36+
- **GDPR setting cached**: 30s TTL cache eliminates per-row database query
37+
- **HTTP client pooling**: WAF/proxy clients reused instead of allocated per request
38+
- **readAll optimized**: `bytes.Buffer` for efficient memory allocation
39+
- **Import timestamp pre-formatted**: single format call instead of per-entry
40+
41+
### Frontend
42+
43+
- Reduced API polling: Dashboard 10s to 30s, ThreatIntel 15s to 30s, staleTime 10s to 60s
44+
- Sidebar health check skips when tab is hidden, interval 15s to 30s
45+
846
## [3.2.2] - 2026-04-07
947

1048
### Added

waf-go/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module secure-proxy-waf
22

3-
go 1.21
3+
go 1.24
44

55
require github.com/go-icap/icap v0.0.0-20151011115316-ca4fad4ebb28

0 commit comments

Comments
 (0)