This service implements the TrustSignal GitHub App MVP for:
pushreleaseworkflow_run
The integration is webhook driven. It validates X-Hub-Signature-256 against the raw body before JSON parsing, derives tenant context from the webhook payload, submits verification context to TrustSignal, and writes native GitHub Check Runs back to the repository.
- Metadata: read
- Contents: read
- Actions: read
- Checks: write
Do not grant broader permissions for the pilot.
pushreleaseworkflow_run
GitHub Cloud defaults:
GITHUB_API_BASE_URL=https://api.github.comGITHUB_GRAPHQL_BASE_URL=https://api.github.com/graphqlGITHUB_WEB_BASE_URL=https://github.com
GHES example:
GITHUB_API_BASE_URL=https://ghe.example.com/api/v3GITHUB_GRAPHQL_BASE_URL=https://ghe.example.com/api/v3/graphqlGITHUB_WEB_BASE_URL=https://ghe.example.com
Required secrets:
GITHUB_APP_IDGITHUB_PRIVATE_KEY_PEMGITHUB_WEBHOOK_SECRET
push
- Accepts signed push events.
- Ignores non-default-branch pushes.
- Creates a TrustSignal Check Run tied to the pushed commit SHA.
workflow_run
- Handles completed workflow runs.
- Refreshes workflow metadata from GitHub using the installation token.
- Publishes the resulting TrustSignal Check Run on the workflow run
head_sha.
release
- Handles published releases.
- Refreshes release metadata from GitHub.
- Resolves
target_commitishto a commit SHA when GitHub provides a branch or tag name. - Publishes the resulting TrustSignal Check Run on the resolved target commit.
GET /github/installationsPOST /github/check-run
These routes are protected with INTERNAL_API_KEY and are not intended for public exposure.
name: trustsignal-artifact
on:
workflow_dispatch:
push:
branches: [main]
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build artifact
run: tar -czf artifact.tgz README.md
- name: Compute digest
id: digest
run: echo "sha256=$(sha256sum artifact.tgz | awk '{print $1}')" >> "$GITHUB_OUTPUT"
- name: Submit to TrustSignal
env:
TRUSTSIGNAL_API_BASE_URL: ${{ secrets.TRUSTSIGNAL_API_BASE_URL }}
TRUSTSIGNAL_API_KEY: ${{ secrets.TRUSTSIGNAL_API_KEY }}
run: |
curl -fsSL \
-H "x-api-key: ${TRUSTSIGNAL_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"repository": "'"${GITHUB_REPOSITORY}"'",
"runId": "'"${GITHUB_RUN_ID}"'",
"sha": "'"${GITHUB_SHA}"'",
"artifactDigest": "'"${{ steps.digest.outputs.sha256 }}"'"
}' \
"${TRUSTSIGNAL_API_BASE_URL}/api/v1/verifications/github"- The service does not persist installation tokens.
- Delivery deduplication tracks in-flight and completed deliveries in memory for the MVP, so failed deliveries can be retried but horizontal scaling still needs a shared dedupe store.
- GraphQL base URL is configurable for future feature work, but the current MVP uses REST endpoints only.
- GHES support assumes REST endpoints compatible with the app installation, checks, releases, and actions APIs used here.