1. Create a CI service account
Create one non-human identity for one repository and deployment environment. Assign an owner, expiration, rotation schedule, and these minimal capabilities:- read the mapped project, target, suite, and approved baseline;
- request only the selected safe run mode;
- read that run’s status and canonical report;
- verify the report and evaluate the named gate policy.
2. Map repository context
The integration record binds an exact source repository and deployment environment to:
Pull requests from forks must not receive a service token or run stateful tests. Treat target, suite, policy, runner, and baseline values as protected repository configuration.
3. Store secrets
Store the short-lived token exchange credential in the CI platform’s encrypted secret store and expose it only to the gate job. Pin third-party actions by full commit, restrict workflow permissions to read repository contents, and grant check-write permission only when annotations are required. Mask credentials and disable shell tracing around authentication. Never place tokens in command arguments, job summaries, cache keys, artifacts, reports, or debug bundles. Prefer identity federation or expiring tokens over a long-lived API key; rotate and revoke on ownership or repository changes.4. Gate job contract
The released workflow must perform these steps in order:- check out the exact commit under review;
- install the pinned RampSpec CLI and offline verifier after digest validation;
- exchange the CI identity for a short-lived project-scoped token;
- resolve protected mapping values and confirm target ownership and network;
- materialize and verify the immutable suite lock;
- start once with a unique idempotency key derived from trusted run context;
- wait by run identifier, reconnecting without creating a duplicate;
- download the canonical report and verification material;
- verify schema, suite-lock digest, artifacts, trusted key, and signature offline;
- evaluate the pinned policy against the report and approved baseline;
- upload the report, lock, manifest, and verifier result under the retention policy;
- revoke temporary credentials and require cleanup evidence.
5. Stable exit meanings
The released CLI assigns stable, documented numeric values to these distinct meanings:
Do not implement numeric mappings until the CLI release publishes them. Wrapper scripts must preserve the CLI status rather than collapsing every nonzero result into one diagnosis.