624 B
624 B
06 — Bezpieczeństwo Kodu (AppSec: Path Traversal, Redakcja Sekretów)
Teoria: notes/07-appsec-and-secure-coding.md
Zadania (appsec.go)
SafeJoin(baseDir, relPath string) (string, error)— bezpiecznie połączbaseDirzrelPath. Odrzuć ścieżki absolutne i próby wyjścia pozabaseDir(../../etc/passwd) błędemErrPathTraversal.RedactSecrets(logLine string) string— zamaskuj wartości poBearer,token=ipassword=na***.
Uruchomienie testów
make test PKG=./exercises/02-engineering-2026/06-security-appsec