#1 fix(security): resolve CodeQL findings
Originally created by: thomijasir
Summary
- Require HTTPS for remote client and public server URLs. HTTP remains available for localhost and loopback IP addresses.
- Disable HTTP redirects and validate the endpoint again when constructing the API client.
- Replace fixed cryptographic test keys with randomly generated key material.
- Reuse the strict backup-key sanitizer during bootstrap restore and add traversal boundary tests.
- Rename the recent-authentication helper so CodeQL does not misclassify the returned client as password data.
CodeQL result
The pull request scan completed with zero findings in Rust, JavaScript/TypeScript, and Actions. The latest main-branch Rust analysis reports 30 results at ff27714; the pull request Rust analysis reports 0 results at 11ce6ea.
- Alerts [#28] and [#29] are resolved through transport enforcement, redirect rejection, and the helper rename.
- Alert [#30] is resolved by removing hard-coded cryptographic keys from the test.
- Alerts [#1] through [#27] no longer appear in the fresh scan. Regression tests now enforce the path boundary, and bootstrap restore uses the shared strict filename sanitizer.
No alerts were dismissed manually.
Compatibility
Existing remote HTTP endpoints must move to HTTPS. Local development on localhost, 127.0.0.0/8, and ::1 continues to support HTTP. Redirecting endpoints must be configured using their final URL.
Verification
- cargo fmt --manifest-path app/Cargo.toml -- --check
- cargo clippy --manifest-path app/Cargo.toml --locked --all-targets --all-features -- -D warnings
- cargo test --manifest-path app/Cargo.toml --locked --all-targets
- cargo test --manifest-path app/Cargo.toml --locked --all-targets --all-features
- bun run build
- bun run docs:build
Related
Tickets: #1
Tickets: #27
Tickets: #28
Tickets: #29
Tickets: #30
Originally posted by: dopbase
cool!
Ticket changed by: dopbase