Skip to content

chore: fingerprint signing secrets for cross-repo comparison#31

Open
dinex-dev wants to merge 1 commit into
devfrom
chore/secret-fingerprint
Open

chore: fingerprint signing secrets for cross-repo comparison#31
dinex-dev wants to merge 1 commit into
devfrom
chore/secret-fingerprint

Conversation

@dinex-dev

Copy link
Copy Markdown
Member

Summary

Adds a manual-dispatch workflow that prints a salted SHA-256 fingerprint + byte length for each of the four mac signing / notarize secrets. Output goes to the run's STEP_SUMMARY (markdown panel on the run page) so it's easy to grab and compare against the equivalent fingerprint from requestly/http-interceptor-desktop-app.

This is a debug aid for the question "are the values stored under `APPLE_ID` on prod actually the same bytes as the values stored under `BSTACK_APPLE_ID` on dev?" — the only remaining variable that can explain why mac notarize succeeds here but fails on prod (full code-tree comparison turned up no other differences).

How to use

  1. After merging, dispatch `Fingerprint Signing Secrets` on this repo. Note the four `len=... sha256=...` lines from the run summary.
  2. Set up the equivalent workflow on `requestly/http-interceptor-desktop-app`. Same algorithm, same salt (`requestly-signing-secret-fingerprint-v1`) — only the secret references differ (e.g. `secrets.APPLE_ID` instead of `secrets.BSTACK_APPLE_ID`). Dispatch it.
  3. Compare the two tables.
Result Interpretation
Same `len` + same `sha256` Byte-identical. Secrets match across repos.
Same `len` + different `sha256` Same length but different content — different account / wrong password / typo same length.
Different `len` Almost certainly a whitespace or trailing-newline issue on one side.

Why salted

The salt is a fixed public constant (`requestly-signing-secret-fingerprint-v1`). It's not a secret — it just prevents the hash output from being a raw SHA-256 of the secret value, which would in principle be brute-forceable for very weak secrets (not a real risk for Apple credentials, but cheap defense). Both repos must use the same salt for hashes to be comparable, so don't change it.

What it doesn't do

  • Does not print, log, or leak the secret values themselves. Only the hash + length.
  • Does not touch any other workflow or repository code.
  • Does not run automatically — only on `workflow_dispatch`.

Cleanup

This is a temporary debugging aid. Once the prod / dev secret divergence is identified and fixed, this workflow file can be deleted in a follow-up PR — leaving it in the tree indefinitely is fine but unnecessary.

🤖 Generated with Claude Code

Adds a manual-dispatch workflow that prints SHA-256 fingerprint + byte
length for the four mac signing / notarize secrets, salted with a fixed
public constant. Output goes to the run's STEP_SUMMARY.

Purpose: let dev and prod each fingerprint their own copies of the same
logical secrets and compare hashes side-by-side. Same salt + same algo
on both repos means equal stored bytes → equal output hashes. Different
hashes (or different lengths) prove the stored values diverge — gives
us a definitive answer to "are these secrets actually byte-identical
across repos" without ever revealing the secret bytes.

On dev the workflow reads from BSTACK_APPLE_ID / BSTACK_APPLE_APP_-
SPECIFIC_PASSWORD / BSTACK_MAC_CERTS / BSTACK_MAC_CERTS_PASSWORD.
Prod's equivalent workflow should reference whatever names prod stores
the same logical values under (APPLE_ID / APPLE_APP_SPECIFIC_PASSWORD /
BSTACK_MAC_CERTS / BSTACK_MAC_CERTS_PASSWORD per current prod state) —
the env var names map the local secret to a stable logical name so the
fingerprint table is directly comparable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant