Summary
High priority
1) Sensitive auth/material is logged in plaintext (token/cookie/response leakage)
Current code logs OIDC secrets and arbitrary HTTP response bodies:
Why this matters:
Suggested fix:
2) Dependency security advisories in lockfile/dependency graph
cargo audit reports:
Dependency entrypoints:
Why this matters:
Suggested fix:
Medium priority
3) Incorrect HTTP caching semantics for static files
Why this matters:
Suggested fix:
4) 404 fallback behavior returns 200 for custom 404.sql
Why this matters:
Suggested fix:
5) Crash/panic edges in request path and response finalization
Why this matters:
Suggested fix:
Maintainability / bloat / duplication
6) Very large multi-responsibility modules increase change risk
Key files:
Also note duplicated fetch pipelines:
Why this matters:
Suggested fix:
Proposed execution plan
Summary
High priority
1) Sensitive auth/material is logged in plaintext (token/cookie/response leakage)
Current code logs OIDC secrets and arbitrary HTTP response bodies:
sqlpage.fetchraw response body logWhy this matters:
Suggested fix:
[REDACTED]).2) Dependency security advisories in lockfile/dependency graph
cargo auditreports:RUSTSEC-2023-0071onrsa 0.9.10(Marvin timing side-channel)RUSTSEC-2024-0436(paste 1.0.15)RUSTSEC-2025-0134(rustls-pemfile 2.2.0)Dependency entrypoints:
Why this matters:
Suggested fix:
sqlx-oldapi 0.6.xline to maintained upstream.cargo audit(or equivalent) to CI as informational gate at minimum.Medium priority
3) Incorrect HTTP caching semantics for static files
Last-Modifiedcurrently usesSystemTime::now()>>=Why this matters:
Suggested fix:
Last-Modifiedfrom actual source mtime (or omit if unknown).>vs>=) to one consistent contract.4) 404 fallback behavior returns 200 for custom
404.sqlWhy this matters:
Suggested fix:
404for custom not-found handlers.5) Crash/panic edges in request path and response finalization
unwrap()inServepathunwrap()in response close pathWhy this matters:
Suggested fix:
unwrap()with structured error propagation and explicit400/500mapping.Maintainability / bloat / duplication
6) Very large multi-responsibility modules increase change risk
Key files:
src/webserver/database/sql.rssrc/webserver/oidc.rssrc/render.rssrc/webserver/database/sqlpage_functions/functions.rssrc/app_config.rsAlso note duplicated fetch pipelines:
fetchfetch_with_metaWhy this matters:
Suggested fix:
Proposed execution plan
Last-Modifiedsource and local/db comparison contract.unwrap()in request/response hot paths.sqlx-oldapiand dependency audit remediation.