You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: mark all 16 security findings as resolved in audit report
Update SECURITY_EVAL_2026-04-11.md with resolution status for each
finding, upgrade overall grade from B+ to A, expand remediation plan
table with Status column covering all 16 items (previously grouped
SEC-012–016 as backlog).
**Findings:** 0 CRITICAL · 1 HIGH · 5 MEDIUM · 5 LOW · 5 INFO — **All 16 resolved**
9
9
10
10
---
11
11
12
12
## Executive Summary
13
13
14
14
`static-web` demonstrates strong security fundamentals — multi-layer path traversal prevention, XSS-safe templating, excellent TLS configuration, and a CI pipeline with `govulncheck` and race detection. The single HIGH-severity finding is an unbounded in-memory path cache (`sync.Map`) that enables a straightforward memory exhaustion DoS. Five MEDIUM findings cover weakened shipped defaults, compression resource limits, server fingerprinting, cache key normalization, and verbose panic logging. No critical vulnerabilities were found.
15
15
16
+
> **Remediation Status:** All 16 findings have been addressed in branch `fix/security-audit-remediations` (commits `d26183c`, `6c1948d`). The overall grade has been upgraded from **B+** to **A**.
|**Status**| ✅ **Resolved** — Added `sanitizeForLog()` that replaces ASCII control chars (0x00–0x1F, 0x7F) with `\xNN` hex escapes. Applied to URI in access logging. |
435
445
|**CWE**| CWE-117 (Improper Output Neutralization for Logs) |
436
446
|**OWASP**| A09:2021 — Security Logging and Monitoring Failures |
437
447
|**File**|`internal/handler/middleware.go:113–115` and `file.go:257`|
@@ -470,6 +480,7 @@ uri := sanitizeForLog(string(ctx.RequestURI()))
@@ -583,6 +597,7 @@ This is actually **correct** per the Fetch specification. A literal `*` response
583
597
| Attribute | Value |
584
598
| ----------- | ------------------------- |
585
599
|**Severity**| INFO |
600
+
|**Status**| ✅ **Resolved** — Expanded `computeETag` doc comment with collision analysis and rationale for 64-bit truncation. |
586
601
|**CWE**| CWE-328 (Use of Weak Hash) |
587
602
|**File**|`internal/handler/file.go:480–483`|
588
603
@@ -595,6 +610,7 @@ ETags are computed as `sha256(data)[:8]` (64 bits). For cache validation purpose
595
610
| Attribute | Value |
596
611
| ----------- | ------------------------- |
597
612
|**Severity**| INFO |
613
+
|**Status**| ✅ **Resolved** — Set `MaxRequestBodySize: 1024` (1 KB) on both HTTP and HTTPS servers. Static file server needs no request body. |
598
614
|**CWE**| CWE-770 (Allocation of Resources Without Limits or Throttling) |
599
615
|**File**|`internal/server/server.go:74`|
600
616
@@ -611,6 +627,7 @@ MaxRequestBodySize: 1024, // 1 KB -- static server needs no request body
611
627
| Attribute | Value |
612
628
| ----------- | ------------------------- |
613
629
|**Severity**| INFO |
630
+
|**Status**| ✅ **Resolved** — Added `MaxConnsPerIP` config field (default 0 = unlimited) wired to `fasthttp.Server.MaxConnsPerIP`. Env: `STATIC_SERVER_MAX_CONNS_PER_IP`. |
614
631
|**CWE**| CWE-770 (Allocation of Resources Without Limits or Throttling) |
615
632
|**File**| N/A (architectural) |
616
633
@@ -623,6 +640,7 @@ No built-in rate limiting. This is typical for a static file server (usually han
623
640
| Attribute | Value |
624
641
| ----------- | ------------------------- |
625
642
|**Severity**| INFO |
643
+
|**Status**| ✅ **Resolved** — Added symlink detection (`d.Type()&os.ModeSymlink`), target resolution via `filepath.EvalSymlinks`, and validation that target stays within `absRoot`. |
626
644
|**CWE**| CWE-59 (Improper Link Resolution Before File Access) |
627
645
|**File**|`internal/cache/preload.go:74–158`|
628
646
@@ -710,21 +728,25 @@ Even the custom 404 page path from configuration is validated through `PathSafe`
*Report generated by Kai security audit pipeline. All findings verified against source code as of commit `fcfe429`.*
752
+
*Report generated by Kai security audit pipeline. All findings verified against source code as of commit `fcfe429`. All 16 findings remediated in commits `d26183c` and `6c1948d` on branch `fix/security-audit-remediations`.*
0 commit comments