fix: gate the oauth callback, read every getmeas page, clear advisories (v0.1.3) #6
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/t_dbf5d5af-audit"
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?
Fixes the findings from read-only audit t_b81660de (on
0debb77). Card: t_dbf5d5af. Releases as v0.1.3.What changed
Dependencies and CI
cargo auditreported nine advisories onmain. Six of them are on the outbound TLS path to Withings: rustls (four), rustls-webpki and webpki-roots. Bumped rustls 0.23.46, rustls-webpki 0.103.16, webpki-roots 1.0.11, quinn-proto 0.11.19 (lockfile only) and tokio 1.54.1.cargo auditis now clean.ci.ymlhad no schedule, so a new advisory never turned a run red. It now runscargodaily.dockeris skipped on a schedule, because a scheduled run's ref ismain, which is the single:buildcachewriter./oauth/callback403: the callback is on, guarded only by a staticstatethat appears in every consent URL. Newoauth_gate:WITHINGS_MCP_OAUTH_WINDOW_SECSafter startup (default 600, at most 3600);404as "not configured".Ticketreleased on drop, and the exchange runs in a spawned task, so a browser that disconnects mid-exchange can't leave the gateInFlight.ExpectedToken, so its length no longer leaks.Privacy
TraceLayer's default span recorded the whole URI atDEBUG, which for the callback includes the authorisation code and the state. The span now records the path only.list_measurementsnow returns only the requested types, so a reading outside the catalogue never reaches a caller even if Withings ignoresmeastypes.Reads
getmeasmore/offsetwere ignored, so a long range returned its first page withtruncated: false.complete, and the warning says why paging stopped.startafterendisinvalid_paramsbefore any Withings call. Previously Withings answered it with an internal503.serverInforeportedrmcpand rmcp's version; it now reportswithings-mcp0.1.3.Metrics
withings_mcp_withings_failures_total{stage,code}, with closed label sets.withings_mcp_reauthorisation_required, also set at startup when there is no credential./healthstays a pure liveness probe.Verification
cargo fmt --all --checkpasses.cargo clippy --all-targets --all-features --locked -- -D warningspasses.cargo test --all-features --locked: 117 passed, up from 97.cargo auditandcargo deny check bans licenses sourcespass.cargo +1.93.0 check --all-features --lockedpasses.b5a2371found no blockers. Two should-fix items (a stuckInFlightstate on cancel, and unmeasured page order in the docs) and several notes were addressed ina93d197andfd63366. The review then approved head1f8b4aa.Not covered here
🤖 Generated with Claude Code
https://claude.ai/code/session_01EQ1LZDFTafzEcUuC2A526L