clean up signature events + harden release workflow#28
Merged
Conversation
The publish job runs with id-token:write (npm OIDC trusted publishing)
and contents:write, and interpolated the attacker-influenceable tag
name (github.ref_name and tag-derived step outputs) directly into run:
scripts. Git ref names permit shell metacharacters, so a tag like
v1.0.0$(...) could execute arbitrary commands with publish privileges.
- Move all tag-derived values to env: blocks, referenced as quoted
shell variables instead of ${{ }} interpolation in run: bodies
- Add strict semver tag validation that fails the workflow before any
untrusted value is used
Actions are already pinned to commit SHAs; npm pin intentionally
omitted (npm@latest retained by decision).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Autocaptured signature events shipped the produced signature (state.data) as `signatureHash` to events.formo.so — a replayable permit/Permit2/SIWE bearer credential, on by default. Scope: remove `signatureHash` only. The signed message (plaintext or EIP-712 struct) is still captured as before; no behavior change there and no new configuration option. - Remove `signatureHash` end-to-end: SignatureAPIEvent, IFormoAnalytics /IFormoAnalyticsInstance signature(), FormoAnalytics.signature(), EventFactory.generateSignatureEvent (+ lib/event/types.ts), and the WagmiEventHandler mutation handler (no longer reads state.data). - Add src/__tests__/signature.test.ts: asserts no signatureHash / no raw-signature value is emitted for signMessage or signTypedData. deepsec revalidate: CRITICAL other-signature-exfiltration -> fixed. typecheck/lint clean, 212/212 tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request removes the signatureHash field from signature-related events across the codebase, including interfaces, event factories, and the Wagmi event handler. This change is a security measure to prevent the capture of replayable credentials such as signatures for Permit or SIWE. New tests have been added to ensure that raw signatures are never forwarded to the event pipeline. I have no feedback to provide.
Comment/label-only cleanup, no behavior change. Gates green (212/212). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Security branch for
@formo/analytics-react-native. Two findings from the deepsec audit.Autocaptured signature events shipped the produced signature (
state.data) assignatureHashtoevents.formo.so— a replayable permit/Permit2/SIWE bearer credential, on by default.Scope: remove
signatureHashonly. The signed message (plaintext forsignMessage, EIP-712 struct forsignTypedData) is captured exactly as before; no behavior change there and no new configuration option.signatureHashremoved end-to-end:SignatureAPIEvent,IFormoAnalytics/IFormoAnalyticsInstancesignature(),FormoAnalytics.signature(),EventFactory.generateSignatureEvent(+lib/event/types.ts), and theWagmiEventHandlermutation handler (no longer readsstate.data).src/__tests__/signature.test.ts: asserts nosignatureHash/ no raw-signature value forsignMessageorsignTypedData.Verification: typecheck ✓ · lint ✓ · 212/212 tests ✓ · deepsec
revalidate(commit6314268) → CRITICALother-signature-exfiltration= fixed.${{ github.ref_name }}interpolated intorun:blocks inrelease.yml; moved toenv:+ quoted vars with a strict semver tag-name validation gate.Coordination
C1 is fixed identically in
@formo/analytics(web SDK,getformo/sdkbranchsec/deepsec). These are published packages leaking replayable credentials — recommend a coordinated GHSA covering both packages plus backend scrubbing of already-ingested raw signatures.Not in this PR
Other deepsec findings (M2/M3/M4 consent/attribution, queue bugs) remain open and tracked separately.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmithwith what you need.