summaryrefslogtreecommitdiff
path: root/review_feedback.md
blob: 403f67bda18892cc249175464964e70420c9c4ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Review Cycle 2025-01-20

## Status: [APPROVED]

## Resolved Issues

1.  **Missing Tests for Auth Package:** ✅ FIXED
    *   Created `internal/auth/auth_test.go` with tests for `Authenticate`, `CreateUser`.
    *   Created `internal/auth/handlers_test.go` with tests for `HandleLogin`.

2.  **Missing CSRF Protection:** ✅ FIXED
    *   Implemented CSRF middleware in `internal/auth/middleware.go`.
    *   Added CSRF token to login form and all state-changing requests.
    *   HTMX requests include token via `hx-headers`.

3.  **Acceptance Tests Outdated:** ✅ FIXED
    *   Updated `test/acceptance_test.go` with auth middleware integration.
    *   Added test backdoor for session injection in tests.

## Verification

*   `go test ./...` - All tests passing.

## Praise

*   **Solid Auth Implementation:** The `internal/auth` package is well-structured and easy to read.
*   **Secure Defaults:** Good use of `bcrypt` for hashing and `scs` for session management with `RenewToken` to prevent session fixation.
*   **Clean Architecture:** The separation of concerns between Service, Handlers, and Middleware is excellent.
*   **CSRF Implementation:** Custom middleware approach avoids external dependencies while providing full protection.