feat: add SQL/SQLite, AppSec, Capstone incident-tracker, Gitea Actions CI and spaced repetition
Test and Lint / quality (push) Successful in 34s

This commit is contained in:
soda64 committed 2026-12-02 16:58:44 +01:00
1 parent 0ac80d60d4
commit 9430a194c3
18 files changed
+422 -7

No files matched your search

@@ -0,0 +1,12 @@
# 06 — Bezpieczeństwo Kodu (AppSec: Path Traversal, Redakcja Sekretów)
Teoria: [notes/07-appsec-and-secure-coding.md](../../../notes/07-appsec-and-secure-coding.md)
## Zadania (`appsec.py`)
1. `safe_join(base_dir: Path, relative_path: str) -> Path` — bezpiecznie połącz `base_dir` z `relative_path`. Jeśli wynikowa ścieżka (po `resolve()`) ucieka poza `base_dir.resolve()` (np. `../../etc/passwd` lub ścieżka absolutna `/etc/passwd`), rzuć `PathTraversalError`.
2. `redact_secrets(log_line: str) -> str` — zamaskuj wartości po `token=`, `password=` lub `Bearer ` na `***`, aby sekrety nigdy nie trafiały do logów.
## Uruchomienie testów
```bash
make test MOD=02-engineering-2026/06-security-appsec
```