fix(http): replace HTTPoison transport with Req - #9
iautom8things wants to merge 2 commits into
Conversation
|
| {:ueberauth, "~> 0.10.8"}, | ||
| {:jose, "~> 1.8"}, | ||
| {:httpoison, "~> 1.6"}, | ||
| {:req, "~> 0.5.0"}, |
There was a problem hiding this comment.
The new ~> 0.5.0 constraint excludes the fixed Req 0.6.1 release, and the lock file resolves Req 0.5.18. Although the client sets decode_body: false, that does not disable this version's content-encoding decompression step. A malicious token or JWKS response with nested compression layers can therefore consume unbounded memory and take down the application. Upgrade to a fixed Req release or explicitly disable response decompression with the supported raw-response option.
How this was verified: Both reachable provider-response paths use Req 0.5.18 without raw mode, leaving its content-encoding decompression step active.
Knowledge Base Used: Asgard API client behavior
…ession: 01a094f3-eeeb-7f43-afc7-1f8a2448423e\nLog: /Users/mz/.codex-remembers/sessions/2026/09/12/rollout-2026-09-12T05-30-09-01a094f3-eeeb-7f43-afc7-1f8a2448423e.jsonl\n\nhttps://github.com//pull/9 proposes exact 25c4dc4. Remote main remains ca49ce3; rebase was clean and unchanged. Cold verification and separate audit approve the exact candidate, including 20 real HTTP/auth tests, checked compile/format, actual dependency and runtime exclusion of HTTPoison/Hackney. Reports /tmp/uasgard-7n0-cold-verification.md and /tmp/uasgard-7n0-audit.md.\n\nThis repository has no CI workflow or VERSION/CHANGELOG convention. Root follows its existing Git dependency workflow and retains the package version. No Hex publication, merge or deployment occurred. Atlas/Argos immutable-pin consumer integration, complete consumer gates and deployed login evidence remain required. PR is open, ticket stays in progress."
The Asgard strategy keeps HTTPoison and Hackney in consumer dependency graphs. Replace its token and JWKS transport with patched Req 0.7.4 while retaining existing authentication flows.
The client preserves Basic and form credentials, callback URI and PKCE verifier, nonce and RS256 verification, refresh-token retention, scopes and explicit legacy callbacks. Requests disable retries, redirects and decompression, retain finite connection/pool/receive timeouts, and return bounded errors without provider bodies or credentials. Request-local Finch options work when a host application configures a global named Finch pool, without changing that host pool or its defaults. Elixir 1.15 remains the minimum.
The initial 0.5.18 constraint excluded the fix for GHSA-655f-mp8p-96gv. The corrected lock changes only Req; Finch stays 0.22.0. Before the transport correction, three real Atlas-default tests reproduced the named-Finch conflict. They now pass.
The full 22-test suite, forced checked compilation and formatting passed. Independent correction review reran all 22 tests with zero failures and checked the running Req/Finch versions and absence of HTTPoison/Hackney. Real local HTTP covers reserved-character credentials, uncached JWKS during complete code callback, legacy callbacks, exact retry/redirect refusal, malformed responses, finite receive timeout, host-pool preservation and safe refusal of small compressed responses. Prior audits apply to the original transport implementation; the correction has its own independent evidence.
Atlas and Argos consumer tests, complete consumer dependency audits, release boot and deployed login verification remain required before consumer release. This PR proposes an immutable Git revision and does not publish a Hex package. The repository has no CI workflow or VERSION/CHANGELOG release convention, so its existing package version is retained.
Tracks Asgard transport remediation.