feat: add SQL/SQLite, AppSec, Capstone incident-tracker, Gitea Actions CI and spaced repetition
Test and Lint / quality (push) Successful in 2m13s
Test and Lint / quality (push) Successful in 2m13s
This commit is contained in:
1 parent
011f23e637
commit
33082598fc
19 files changed
+496
-6
No files matched your search
@@ -0,0 +1,15 @@
|
||||
# Bezpieczeństwo Kodu w Go (AppSec & OWASP w praktyce)
|
||||
|
||||
| Podatność | Jak wygląda błąd w Go | Jak się zabezpieczyć |
|
||||
| :--- | :--- | :--- |
|
||||
| **SQL Injection** | `fmt.Sprintf("... '%s'", input)` | Parametryzowane zapytania `db.Query("... ?", input)`. |
|
||||
| **Command Injection** | `exec.Command("sh", "-c", "ls " + userDir)` | `exec.Command("ls", userDir)` bez pośredniej powłoki `sh -c`. |
|
||||
| **Path Traversal (`../`)** | `filepath.Join(base, userPath)` bez weryfikacji ucieczki poza `base`. | `filepath.Rel(absBase, absTarget)` i odrzucenie ścieżek zaczynających się od `..` lub absolutnych. |
|
||||
| **Wyciek sekretów** | Tokeny w logach `slog`, hasła w kodzie. | Redakcja tokenów w logach (`Bearer ***`), zmienne środowiskowe, `gitleaks`. |
|
||||
| **Brak timeoutów HTTP** | `http.Get(url)` używa `http.DefaultClient` **bez timeoutu**! | Zawsze `&http.Client{Timeout: 5 * time.Second}` i `context.WithTimeout`. |
|
||||
|
||||
## Higiena łańcucha dostaw (Supply Chain)
|
||||
* **Podatności CVE w Go:** `govulncheck ./...` (oficjalne narzędzie zespołu Go).
|
||||
* **Sekrety w Gicie:** `gitleaks detect --source .`
|
||||
|
||||
Praktyczne zadania znajdziesz w [exercises/02-engineering-2026/06-security-appsec](../exercises/02-engineering-2026/06-security-appsec/README.md).
|
||||
Reference in new issue
Block a user