Skip to content

Fix TrustSignal verification API authentication: use x-api-key header#15

Merged
chrismaz11 merged 2 commits intomainfrom
copilot/trustsignal-verification-failure
Mar 18, 2026
Merged

Fix TrustSignal verification API authentication: use x-api-key header#15
chrismaz11 merged 2 commits intomainfrom
copilot/trustsignal-verification-failure

Conversation

Copy link
Contributor

Copilot AI commented Mar 18, 2026

The verification client was sending Authorization: ****** but the TrustSignal API at api.trustsignal.devexpectsx-api-key: , causing every verification attempt to fail with 403 Forbidden: invalid API key`.

Changes

  • src/trustsignal/client.ts — Replace authorization: ****** with "x-api-key": apiKey`
  • tests/trustsignalClient.test.ts — Update all header assertions to expect x-api-key
  • docs/integrations/github.md — Correct the curl example to use -H "x-api-key: ${TRUSTSIGNAL_API_KEY}"
  • apps/action/dist/index.js — Rebuilt bundle
- authorization: `******
+ "x-api-key": this.apiKey,

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

…zation: Bearer

Co-authored-by: chrismaz11 <24700273+chrismaz11@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix TrustSignal verification API key issue Fix TrustSignal verification API authentication: use x-api-key header Mar 18, 2026
Copilot AI requested a review from chrismaz11 March 18, 2026 04:16
@chrismaz11 chrismaz11 marked this pull request as ready for review March 18, 2026 04:17
Copilot AI review requested due to automatic review settings March 18, 2026 04:17
@chrismaz11 chrismaz11 merged commit 4bb3e2b into main Mar 18, 2026
7 of 8 checks passed
@chrismaz11 chrismaz11 deleted the copilot/trustsignal-verification-failure branch March 18, 2026 04:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes TrustSignal verification client authentication by switching from an Authorization: Bearer ... header to the x-api-key header required by api.trustsignal.dev, preventing 403 Forbidden: invalid API key failures during verification.

Changes:

  • Update TrustSignalVerificationClient to send x-api-key instead of authorization.
  • Update unit tests to assert x-api-key header usage.
  • Fix the GitHub integration curl example to use -H "x-api-key: ...".

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
src/trustsignal/client.ts Sends API key via x-api-key header for verification requests
tests/trustsignalClient.test.ts Updates mocked fetch header assertions to match new auth header
docs/integrations/github.md Updates curl example to use x-api-key header
apps/action/dist/index.js Rebuilt action bundle reflecting the header change

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants