API hardening bundle: OIDC nonce, POST logout, media key validation, honor excluded_event_types on create #70
Labels
No labels
area:ai
area:ci-cd
area:notifications
area:observability
area:public-pages
backlog
bug
duplicate
enhancement
help wanted
invalid
question
type:decision
type:feature
type:infra
type:maintenance
type:security
v1.0.1
v1.1.0
v1.2.0
v1.3.0
v2.0.0
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/WeatherBot#70
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
noncealongside the existing statehandling (app/api/auth.py:126-134, 94-117)
^[A-Za-z0-9_-]+$and resolve-checkcontainment in radar_cache_dir (app/api/media.py:22-38)
excluded_event_typesin create_location — currently acceptedby the schema and dropped (app/api/locations.py:43-51)
Filed from the 2026-07-17 codebase audit (
docs/.internal/report-2026-07-17.md), finding F-31.Fixed in #93 (merged to
main). All four items: (1) OIDC login generates anonce, stored in the session alongsidestateand validated against the verified ID token'snonceclaim on callback (replay/injection defense); (2) logout is nowPOST /auth/logoutguarded byrequire_csrf— a GET no longer logs out (405); it clears the session and returns the Authentik end-session URL as JSON, which the frontend navigates to top-level (afetch()can't follow a cross-origin redirect); (3) the media route validatescache_keyagainst^[A-Za-z0-9_-]+$and enforces resolved-path containment within the radar cache dir; (4)create_locationnow persistsexcluded_event_types(previously accepted by the schema and dropped). Each item has a regression test.