Run Veriom in CI
Record deployments from GitHub Actions without storing a token, check pull requests, and run the architecture check on GitLab or Bitbucket.
This page is for the person who looks after a repository's CI. It shows how to add Veriom to GitHub Actions with no stored secret, how to check pull requests, and how to use Veriom on GitLab CI or Bitbucket Pipelines.
Before you start
- The repository is connected to Veriom through the GitHub App. See Connect a repository.
- The repository has finished at least one audit, so Veriom knows its services.
- You have the Admin or Owner role in the workspace.
Set up keyless CI in one click
- In Veriom, open Integrations and select the Repositories tab.
- On the repository's row, click Set up keyless CI.
- If Veriom asks you to confirm your identity, confirm it. This action needs a recent sign-in check.
- Veriom shows Draft pull request opened. Click Open #<number> to see it on GitHub.
- Review the pull request on GitHub and merge it. Veriom never merges it for you.
After the merge, every push to the default branch records a deployment of each service in Veriom. You see them under Architecture in the Services tab.
If a setup pull request is already open, Veriom shows Draft pull request already open and links to it instead of opening a second one.
What the setup pull request adds
The pull request is titled Record deployments in Veriom (keyless). It is opened as a draft from the branch veriom/ci-setup and adds one file, .github/workflows/veriom.yml:
name: Veriom
on:
push:
branches: ["main"]
permissions:
contents: read
id-token: write
jobs:
deployment-record:
runs-on: ubuntu-latest
steps:
- name: "Record the checkout-api deployment"
uses: Veriom/actions/deployment-record@v2
with:
api-url: https://api.veriom.ai
workspace-id: 7f3c9a52-1b4e-4d8a-9c61-2e5f0a7b8d13
service-id: 3c2b1a09-8f7e-4d6c-b5a4-938271605f4e
environment: productionVeriom fills in your default branch, workspace ID, and one step per service. Two things to check before you merge:
- The file lists at most 10 services. Add a step for each extra service.
- Every step records the
productionenvironment. Changeenvironmentif this branch deploys somewhere else.
How keyless sign-in works
The workflow holds no Veriom token. Each run proves which repository it comes from instead:
id-token: writelets the job ask GitHub for a signed OIDC token with the audienceveriom.- The action sends that token to Veriom, which checks GitHub's signature, the issuer, and the expiry.
- Veriom accepts it only when the repository is connected through the GitHub App in your workspace, is enabled, and belongs to the account that installed the App.
- Veriom returns a short-lived workspace token. It lasts 15 minutes by default and each GitHub token can be exchanged once.
That token works only for its own repository. It can start and read audits, record deployments, and send cloud inventory. Any other request gets 403 ci_token_route_not_allowed.
Check pull requests on GitHub
The GitHub App can post a check on each pull request. It needs no workflow file. This check is off until you turn it on:
- Open Audits, select the Schedules tab, then the GitHub events tab.
- Click Edit on the repository's policy. Veriom created it when you connected the repository.
- Under Listen for, select Pull request checks.
- Click Save policy.
The next time a pull request opens or changes, Veriom audits it and posts a check named Veriom architecture guard. The check result follows the release gate:
| Release gate result | GitHub check result |
|---|---|
| Blocks the release | Failure |
| Needs review, or not enough evidence | Action required |
| Shadow mode, unavailable, or turned off | Neutral |
| Passes | Success |
| Passes, on the first run with no earlier audit to compare | Neutral |
To make the check a merge gate, add Veriom architecture guard as a required status check in your GitHub branch protection rule.
The App needs the Pull requests: read and Checks: write permissions to post the check. If it lacks them, Veriom records a github.architecture_check.permission_required event in the Activity log and posts nothing.
Check merge requests on GitLab or Bitbucket
GitLab CI and Bitbucket Pipelines have no keyless option. They use a workspace API token.
-
Create a token under Settings → API tokens with the
audits:read,audits:write, andrepositories:readscopes. See API tokens. -
Copy the check into your repository:
git clone https://github.com/Veriom/actions.git veriom-actions ./veriom-actions/install-architecture-check.sh gitlab /path/to/your/repositoryUse
bitbucketinstead ofgitlabfor Bitbucket. The script writes.veriom/architecture-check.cjsand.veriom/gitlab-architecture-check.yml. -
On GitLab, include the template from
.gitlab-ci.yml:.gitlab-ci.yml include: - local: .veriom/gitlab-architecture-check.ymlOn Bitbucket, copy the step from
.veriom/bitbucket-architecture-check.ymlintobitbucket-pipelines.yml. -
Store the token as the
VERIOM_API_TOKENCI variable. On GitLab, make it Masked but not Protected. Merge request pipelines run on unprotected branches and cannot read protected variables.
The job fails when the result is review, blocked, or insufficient_evidence. Set VERIOM_FAIL_ON to change that list, or to none to never fail.
The actions
All three actions live in Veriom/actions.
| Action | What it does | Required inputs |
|---|---|---|
Veriom/actions/deployment-record@v2 | Records a deployment of one service for the current commit | service-id, environment |
Veriom/actions/architecture-check@v2 | Audits the pull request commit and fails the job on the outcomes in fail-on | None |
Veriom/actions/cloud-collector@v2 | Sends a read-only cloud inventory. See Connect your cloud | provider, api-token |
api-url defaults to https://api.veriom.ai/v1. The actions find the workspace, repository, and commit from the token and the CI run, so you rarely set workspace-id, repository-id, or commit-sha.
If something goes wrong
| Message or code | What it means | Fix |
|---|---|---|
ci_setup_no_services | Veriom has not found a service in this repository yet | Run an audit, then try again |
ci_setup_permission_missing | The GitHub App cannot write the workflow | Grant the App Contents, Workflows, and Pull requests write access in GitHub |
ci_setup_installation_unavailable | The GitHub App is suspended or removed | Reinstall the App, then reconnect the repository |
ci_setup_github_only | The repository is not on GitHub | Use the GitLab or Bitbucket steps above |
ci_oidc_repository_not_connected | The run's repository is not connected to a workspace, or is out of scope | Connect it, or click Add to scope on it in Integrations → Repositories |
ci_oidc_workspace_ambiguous | The repository is connected to more than one workspace | Set workspace-id on the action |
ci_oidc_token_reused | The same GitHub token was exchanged twice | Re-run the job |
ci_token_repository_mismatch | The step tried to act on another repository | Remove repository-id, or point it at this repository |
See Troubleshooting for more codes.
Was this guide useful?
Your response stays in this browser unless you open a GitHub issue.Connect your team's tools
Connect Jira, Linear, Slack, Notion, Sentry and other tools so audits see your decisions, owners and incidents. Send audit results to Slack or Discord.
Connect your cloud
Give Veriom a read-only view of an AWS account, Azure subscription, or Google Cloud project with quick-connect. No keys are created or stored.