Files
rust-learning/exercises/02-engineering-2026/06-security-appsec

06 — Bezpieczeństwo Kodu (AppSec: Path Traversal, Redakcja Sekretów)

Teoria: notes/07-appsec-and-secure-coding.md

Zadania (src/lib.rs)

  1. safe_join(base_dir: &Path, relative_path: &str) -> Result<PathBuf, SecurityError> — odrzuć ścieżki absolutne (Path::is_absolute) oraz zawierające Component::ParentDir (..), w przeciwnym razie zwróć Ok(base_dir.join(relative_path)).
  2. redact_secrets(log_line: &str) -> String — zamaskuj wartości po Bearer , token= oraz password= na ***.

Uruchomienie testów

make test PKG=eng06-security-appsec