Commit Graph

18 Commits

Author SHA1 Message Date
02ca16a68a fix: always set Secure/HttpOnly/SameSite on session cookies (closes #47)
All checks were successful
check / check (push) Successful in 2m4s
Resolve the two remaining gosec G124 findings (internal/session/
session.go:84 and :128): session cookies are now unconditionally
Secure, HttpOnly, and SameSite=Strict on both the CreateSession
set-cookie path and the ClearSession delete-cookie path. gosec requires
these attributes to be constant, and there is no legitimate
configuration in which the authentication cookie should be weaker, so
the former secure toggle (wired to !config.Debug) is removed rather
than kept as a variable.

The toggle parameter on NewManager is retained as an ignored blank
parameter so existing call sites (including tests) keep compiling;
removing it is tracked as a Future Step in TODO.md. Local development
over http://localhost keeps working because browsers treat localhost as
a trustworthy origin and accept Secure cookies there.

Update TODO.md per its Workflow section: record this step as completed,
promote the manual auth/URL-flow test pass to Next Step, and correct
the stale Status text (make check is now green).
2026-08-07 21:14:16 +07:00
504afea4f8 scripts-to-rule-them-all (#45)
All checks were successful
check / check (push) Successful in 4s
Reviewed-on: #45
Co-authored-by: sneak <sneak@sneak.berlin>
Co-committed-by: sneak <sneak@sneak.berlin>
2026-07-07 02:14:03 +02:00
2fb909283d Update TODO.md: standard structure and Workflow section (#44)
All checks were successful
check / check (push) Successful in 5s
Reviewed-on: #44
Co-authored-by: sneak <sneak@sneak.berlin>
Co-committed-by: sneak <sneak@sneak.berlin>
2026-07-06 21:20:56 +02:00
2e934c8894 fix: QA audit fixes for 1.0/MVP readiness (#25)
All checks were successful
check / check (push) Successful in 5s
closes #24

## QA Audit Fixes

This PR addresses issues found during the 1.0/MVP QA audit.

### Changes

1. **TODO.md: Mark AVIF encoding as done** — AVIF encoding is fully implemented via govips in `processor.go` but was still listed as a TODO item.

2. **scripts/manual-test.sh: Fix form field names** — The manual test script was using wrong field names:
   - Login form: was sending `password=...`, should be `key=...` (matching the HTML form's `name="key"`)
   - Generator form: was sending `source_url`, `fit_mode` — should be `url`, `fit` (matching the handler's `r.FormValue()` calls)
   - This means **the manual test script never actually worked** — login always failed silently because the `key` field was empty.

### Full QA Audit Results

The comprehensive QA audit report has been posted as a comment on [issue #24](#24).

Co-authored-by: user <user@Mac.lan guest wan>
Reviewed-on: #25
Co-authored-by: clawbot <clawbot@noreply.example.org>
Co-committed-by: clawbot <clawbot@noreply.example.org>
2026-03-15 17:58:13 +01:00
70d55977c0 Add WebP encoding support
Uses github.com/gen2brain/webp - a CGO-free library that uses WASM via
wazero runtime for encoding. WebP decoding was already supported.

- Add gen2brain/webp dependency for encoding
- Implement WebP encoding in processor.go
- Add FormatWebP to SupportedOutputFormats
- Re-enable WebP option in generator form dropdown
- Mark WebP encoding as complete in TODO.md
2026-01-08 11:55:45 -08:00
aab43db44a Add WebP and AVIF encoding support to P0 TODO 2026-01-08 11:12:59 -08:00
02de534cc2 Reorganize TODO.md: remove completed, prioritize for 1.0
P0 Critical: Manual testing, cache eviction, config validation
P1 Production: Blocked networks, rate limiting, EXIF stripping
P2 Nice to have: Everything else
2026-01-08 10:41:00 -08:00
774ee97ba1 Update TODO.md: mark HTTP response handling items complete
Completed:
- ETag generation and validation
- Conditional requests (If-None-Match)
- HEAD request support
- Metrics endpoint with auth (already implemented)
2026-01-08 10:09:10 -08:00
6f423af65d Update TODO.md: mark graceful shutdown and sanitization as complete 2026-01-08 10:02:29 -08:00
90be4e7763 Update TODO.md: mark security validations as complete 2026-01-08 08:50:37 -08:00
857be30e82 Update TODO.md: mark auth/encrypted URLs feature as complete 2026-01-08 08:43:23 -08:00
f601e17812 Add implementation plan for auth and encrypted URLs feature 2026-01-08 07:39:31 -08:00
cc0fd29954 Update TODO.md with completed image processing items 2026-01-08 04:02:53 -08:00
b14c897408 Update TODO.md with completed caching layer items 2026-01-08 03:36:05 -08:00
9ff44b7e65 Update TODO.md with completed core features 2026-01-08 03:02:24 -08:00
a9573a4b10 Mark project setup tasks complete in TODO.md 2026-01-08 02:53:49 -08:00
4ef9141960 Add Makefile with check, lint, test, fmt targets
- check: default target, runs fmt-check, lint, and test
- fmt-check: verifies code is properly formatted
- fmt: formats code with gofmt
- lint: runs golangci-lint
- test: runs go test
- build: builds pixad binary with version info
- clean: removes build artifacts
2026-01-08 01:51:46 -08:00
12f6f6fe75 Add TODO.md with implementation checklist
Complete linear checklist of tasks to implement the pixa caching
image reverse proxy server, covering project setup, core features,
caching, image processing, security, and operational concerns.
2026-01-08 01:51:15 -08:00