AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Moderate 60 Monero

Load ShopinBit image attachments with header auth

Public commit record

What the developer wrote

Authored by sneurlax

73/100 · Adequate
Load ShopinBit image attachments with header auth

The attachment images were fetched from a query-auth URL carrying the
token and customer key. Now that they go through the HTTP wrapper,
which logs failed requests, and dart:io puts the request URL in its
exceptions, those credentials could end up in the log file.

Fetch the plain URL with the Authorization and External-Customer-Key
headers instead. TorAwareNetworkImage takes the headers but keeps
keying the image cache on the URL alone, so a re-mounted attachment
still comes from the cache.

client.dart wasn't formatted on staging, so its diff includes one
formatting change.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This commit fixes a privacy/credential-leak issue in Stack Wallet's ShopinBit support-ticket feature. Previously, image attachments were downloaded using a URL that contained the user's secret access token and customer key as visible query parameters. Because the app's HTTP wrapper logs failed requests and Dart's networking exceptions include the full URL, those secret credentials could have been written to log files on the device. The patch switches to sending the credentials as HTTP headers instead, so the URL stays plain and the sensitive values are not embedded in it. A new test confirms the image loader accepts headers but still caches images by URL alone.

Recommended action

Treat this as a security-hardening fix and include it in the next release. Review whether any existing device logs or crash reports may already contain leaked `Authorization` or `External-Customer-Key` query parameters, and consider rotating any exposed tokens or customer keys. Audit other uses of `getAttachmentUrl` with `useQueryAuth: true` across the codebase to ensure none remain.

Security signals we found

01

Credential exposure in URLs moved to HTTP headers

02

HTTP request logging and exception messages could previously leak bearer token and customer key

03

New `AttachmentRequest` typedef encapsulates URI + headers

04

Cache key isolation from auth headers prevents unnecessary refetches

05

Unit test added for header behavior and cache-key equality

Risk score

Why this scored 60/100

Our methodology →
Potential impact 18/30
Exploitability 12/25
Stealth signal 10/15
Affected reach 8/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.