ADR-0028: Proofs can live in Google Cloud Storage or Azure Blob under OIDC bound to an environment or a workflow, and survivors reach SonarQube
Status: Accepted Date: 2026-09-30
Context
Two needs remain at the edges of the gate: where its proofs live, and one more place its survivors are read.
- Proof stores. The ledger lives in a directory, in the GitHub Actions
cache over that directory, or in S3 and S3-compatible stores (ADR-0007).
Teams on Google Cloud or Azure keep their CI's state there. The rules a
store must keep are settled:
- a run reads its own scope and the default branch's, and writes only its own (ADR-0007);
- only the verdict job of the default branch holds what can write the
default branch's scope, and an OIDC identity that can write it trusts a
GitHub environment restricted to the default branch, or the verdict
workflow's
job_workflow_ref, never a bareref(ADR-0007, ADR-0019); - a run without credentials, such as a fork's, reads the default branch's ledger from a public URL and writes nothing (ADR-0013).
- SonarQube. Teams that gate on SonarQube or SonarQube Cloud want survivors in the same issue list as everything else.
What the clouds offer, read in their documentation:
| Google Cloud Storage | Azure Blob Storage | |
|---|---|---|
| Read and write over HTTP | GET and PUT https://storage.googleapis.com/<bucket>/<object> with a bearer token | GET and PUT https://<account>.blob.core.windows.net/<container>/<blob>, with x-ms-blob-type: BlockBlob and x-ms-version, and a bearer token for https://storage.azure.com/.default |
| PHP library | google/cloud-storage brings google/cloud-core, google/auth, Guzzle and google/gax, which brings gRPC and protobuf | azure-storage-php is retired: its community support ended on 17 March 2024 |
| OIDC from GitHub | Workload Identity Federation: GitHub's token is exchanged at sts.googleapis.com/v1/token, and optionally for a service account's token through iamcredentials' generateAccessToken. google-github-actions/auth writes an external_account credentials file. An attribute condition is required, and may test any claim of GitHub's token | A federated identity credential on an app registration or a user-assigned managed identity. GitHub's token, requested for the audience api://AzureADTokenExchange, is exchanged at login.microsoftonline.com/<tenant>/oauth2/v2.0/token as a client assertion. A standard credential matches the token's sub exactly, such as …:environment:<name>. job_workflow_ref can be matched only by a flexible credential, which is in preview, or by a sub that GitHub is configured to include it in |
| Public read of one prefix | A managed folder at <prefix>/refs/heads/<default>/, with allUsers as Storage Object Viewer. It needs uniform bucket-level access, and public access prevention off. IAM conditions cannot be used with allUsers | None below a container: anonymous read is set per container, at the Blob level, and the account's AllowBlobPublicAccess must allow it |
| A conditional write | ifGenerationMatch, answered by 412 on a mismatch | If-Match: <ETag>, answered by 412 on a mismatch |
GitHub's default sub claim carries the owner's and the repository's ids for
repositories created after 2026-07-15, as
repo:octo-org@123456/octo-repo@456789:…. A credential that matches sub
exactly has to use the form the repository issues.
What SonarQube documents:
- The generic external-issues format, read from
sonar.externalIssuesReportPaths, holdsrulesandissues. SonarQube Server changed it in 10.3 and deprecated the older one. From 10.8 only the newer format maps an issue's quality correctly, and SonarQube Cloud requires itsimpacts. - A rule has
id,name,descriptionandengineId, and optionally acleanCodeAttributeandimpacts: [{softwareQuality, severity}]. - An issue has a
ruleId, an optionaleffortMinutes, and aprimaryLocationwithmessage,filePathand atextRangeofstartLine, and optionallyendLine,startColumnandendColumn. - External issues count toward the quality gate, and each can be accepted or marked a false positive.
- An issue on a file the scanner did not index is dropped, and the 10.7 scanner's source only logs how many.
- SARIF import turns every issue into a CONVENTIONAL, SECURITY issue, whatever it reports.
Decision
Two more proof stores
gcsandazureareProofStoreadapters over plain HTTP.Adapter\Gcs\BucketLedgerandAdapter\Azure\ContainerLedgerread and write one object per scope,<prefix>/<scope>/ledger.json.gz, throughsymfony/http-client, which the gate already requires, as theotlpreporter does (ADR-0016). Each is a get, a put and the OIDC token exchange. Nothing is added torequireorsuggest.gcstakeswith.bucket(required),with.prefix(mutation-gateby default) andwith.publicUrl(none by default).azuretakeswith.accountandwith.container(both required),with.prefix(mutation-gate),with.publicContainer(none) andwith.publicUrl(none).- Every option sits under
proofs, which the proof key leaves out (ADR-0007). - This amends ADR-0007, whose table gains the two backends.
Core\Http\Exchangeis the HTTP edge both stores andPublicLedgershare, andAdapter\Http\HttpExchangeimplements it oversymfony/http-client. It follows no redirect, gives every request ADR-0013's 60 seconds, and reads a ledger within its byte limits.Core\Proof\ObjectLedgerholds the read and the write a store makes of one object per scope, and each store is anCore\Proof\ObjectStore: where the object is, and the requests that read and write it.gcsuses Cloud Storage's XML API athttps://storage.googleapis.com/<bucket>/<object>.azuresendsx-ms-version: 2024-11-04, andx-ms-blob-type: BlockBlobwith a write.
A store's token comes from OIDC federation, and never from a key.
- GCS reads the
external_accountcredentials file thatGOOGLE_APPLICATION_CREDENTIALSnames, asgoogle-github-actions/authwrites it, makes the STS exchange, and impersonates a service account where the file says to. Only thefileandurlcredential sources are read, which are what CI identity providers write. On GitHub Actions it builds the same account itself fromMUTATION_GATE_GCS_PROVIDERandMUTATION_GATE_GCS_SERVICE_ACCOUNT, with GitHub'sACTIONS_ID_TOKEN_REQUEST_URL, so the jobs that hold the store's identity run no third-party action. - Azure requests GitHub's token from
ACTIONS_ID_TOKEN_REQUEST_URLfor the audienceapi://AzureADTokenExchange, and exchanges it with the tenant and client thatAZURE_TENANT_IDandAZURE_CLIENT_IDname, the variablesazure/loginuses. - Other CIs, with a federation of their own, hand the gate a ready
bearer token in
MUTATION_GATE_GCS_TOKENorMUTATION_GATE_AZURE_TOKEN. - A key is refused. A credentials file holding a service-account key
is exit 2, and the message names the federation to use instead. The
azurestore has no option for a storage-account key or a shared access signature, so a config that gives one is an unknown key (ADR-0002). A long-lived secret that can write the default branch's ledger never sits in CI. - A store with no token opens read-only, as ADR-0013 decides for any store.
- The
gcsstore asks STS for the scopedevstorage.read_write, or forcloud-platformwhere it then impersonates, and asksgenerateAccessTokenfordevstorage.read_write. The file'stoken_urlhas to be athttps://sts.googleapis.com, itsservice_account_impersonation_urlathttps://iamcredentials.googleapis.com, and aurlsource has to behttps://, so the CI's token is sent nowhere else. The file is read and checked even whereMUTATION_GATE_GCS_TOKENis set. - From the provider and service account, the
gcsstore asks GitHub for its token for the provider's default audience,https://iam.googleapis.com/<provider>, overhttps://alone, exchanges it athttps://sts.googleapis.com/v1/tokenfor the audience//iam.googleapis.com/<provider>, and impersonates the service account athttps://iamcredentials.googleapis.com. Neither host is ever read from the environment. A provider that is notprojects/<number>/locations/global/workloadIdentityPools/<pool>/providers/<id>, a service account that is not<name>@<project>.iam.gserviceaccount.com, or a job GitHub hands no OIDC token, is refused, ready token or not. The provider goes before a credentials file where both are set. - The
azurestore asks Entra ID for the scopehttps://storage.azure.com/.default, with GitHub's token as ajwt-bearerclient assertion. - Each store asks for its token once per run, and only when it reads or writes with it.
- A service-account key is refused as GOOGLE_APPLICATION_CREDENTIALS names a service-account key, which the gcs store refuses: use Workload Identity Federation instead., and any other type of credentials as GOOGLE_APPLICATION_CREDENTIALS names "" credentials; the gcs store reads only an external_account file, from federation.
- GCS reads the
The identity that can write the default branch's scope is bound to an environment, or to the verdict's workflow, never to a bare
ref.- The primary binding is a GitHub environment whose deployment-branch
policy allows only the default branch, used only by the verdict job. On
Azure it is a standard federated credential whose subject is
repo:<owner>/<repo>:environment:<name>, in the form the repository issues. On GCS it is an attribute condition onassertion.environmenttogether withassertion.repository_id, with the store's role granted to thatprincipalSeton the bucket. - The alternative binding pins the verdict's workflow: on GCS a
condition on
assertion.job_workflow_ref, and on Azure asubthat GitHub is configured to includejob_workflow_refin, or a flexible federated credential. - A binding on a bare
refis refused in the README, as ADR-0019 refuses it for S3. - The README gives each cloud's setup commands. The first step of the
build proves them against a test project in each cloud, including GCS's
conditions on
environmentandjob_workflow_ref, which Google's examples do not show. If one does not hold, the README documents only the bindings that do. - This amends ADR-0007 and ADR-0019, which gain the two clouds.
- The bindings the README gives are proven against the clouds' documentation alone; no test project runs them.
- The primary binding is a GitHub environment whose deployment-branch
policy allows only the default branch, used only by the verdict job. On
Azure it is a standard federated credential whose subject is
A fork reads the default branch's ledger from a public URL, and each cloud makes exactly that scope public its own way.
- GCS:
publicUrlishttps://storage.googleapis.com/<bucket>, over a managed folder<prefix>/refs/heads/<default>/thatallUsersmay read. That is what ADR-0013's bucket policy is on S3. - Azure: a second container,
with.publicContainer, at theBlobaccess level. The store writes the default branch's scope there, and every other scope to the private container, andpublicUrlpoints at the public one.doctorreports an account whoseAllowBlobPublicAccessis off. - A run without credentials asks for no other scope: it reads as an empty ledger, which costs a run, never a verdict (ADR-0007, ADR-0013).
- This amends ADR-0013.
doctor --onlineasks the public container's URL for?restype=containerwith no service version, as a fork's run asks, and an account whoseAllowBlobPublicAccessis off answers 409. It reports that as advice, under the sluganonymous-reads-refused.
- GCS:
The last write wins, as on every store. Two verdicts writing one scope at the same time keep the later ledger (ADR-0007). Both clouds offer conditional writes, and so moving every store to them is a decision for all stores at once, not for two.
What the stores' credentials never reach, and where the workflow asks for them.
GOOGLE_APPLICATION_CREDENTIALS,MUTATION_GATE_GCS_TOKEN,AZURE_*andMUTATION_GATE_AZURE_TOKENjoin what every run withholds from the runners, besideAWS_*andACTIONS_*(ADR-0004).- The reusable workflow reads each cloud's identity from the
repository's variables,
AZURE_TENANT_IDandAZURE_CLIENT_ID, andMUTATION_GATE_GCS_PROVIDERandMUTATION_GATE_GCS_SERVICE_ACCOUNT. It asks forid-token: writeonly infetch, which reads, anddeliver, which writes, the two jobs that run none of the project's code, as it does for an S3 store behind an OIDC role. A project that runs the action grants it only to the job that runs it withdeliver: true. This amends ADR-0011. - Every run also withholds
GOOGLE_GHA_CREDS_PATHandCLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE, whichgoogle-github-actions/authsets to the same credentials file.
A SonarQube reporter
sonarwrites the generic external-issues format. It is a built-in file reporter (ADR-0009) with apath, such as{"use": "sonar", "path": "build/mutation-sonar.json"}, and it reports only. The README gives the line to add to the scanner's properties:sonar.externalIssuesReportPaths=build/mutation-sonar.json. SonarQube Server before 10.3 is not served. This amends ADR-0009.Its rules are SARIF's, with the quality each affects.
- Five rules, each with
engineId: "mutation-gate"andcleanCodeAttribute: TESTED:survived,uncovered,unjudgedandflaky, whoseimpactsnameRELIABILITY, andsurvived-security, whoseimpactsnameSECURITY, for a surviving mutant a security-tagged mutator made (ADR-0021). - The names and descriptions are fixed text in this package, and each description links the gate's troubleshooting page for that judgement (ADR-0018).
Core\Report\SonarRuleholds the five rules, their names (Surviving mutant, Uncovered mutant, Unjudged mutant, Flaky mutant and Surviving security mutant), their descriptions and the quality each affects. A description is SARIF's text for the rule, then the section of the guide of the release that wrote it:survived,uncovered,unjudgedorflaky, andsurvivedforsurvived-security. A surviving security mutant, one its package's security set holds (ADR-0021), is raised undersurvived-security, and every other issue under the rule SARIF reports it by.
- Five rules, each with
Each issue is a mutant the score counts as not killed.
- The mutants are exactly those SARIF reports (ADR-0009). A mutant proven equivalent, or killed by static analysis (ADR-0020), is none.
- Its location is the mutant's file, repository-relative, and its lines, with columns from the file's tokens (ADR-0009).
- Its message is the hint, the mutator, the gate's id and the reproduce command.
- Its severity is its rule's, and every rule's impact is
MEDIUM, whatever the mutant's set did. SonarQube reads a severity for each rule, in itsimpacts, and never for each issue: its scanner refuses an issue that carries aseverityof its own beside the rules. One severity for every rule keeps an issue on its rule, with what SonarQube has accepted of it, when its set crosses its floor. effortMinutesis left out, so Sonar's default of 0 applies.- SonarQube counts columns from 0 and ends a range before the column it names. A mutant whose change its tokens do not show on its lines is placed on its lines alone, which SonarQube marks from the start of its first line to the end.
Files Sonar would silently drop are named first.
doctorcompares the trees withsonar.sourcesinsonar-project.properties, where there is one, and reports a tree outside it as advice: Sonar drops the survivors inapp/Legacy, which is outsidesonar.sources. The reporter writes, beside its file, how many issues it wrote under each top directory. This amends ADR-0017's table.- The check's slug is
outside-sonar-sources. It runs where asonarreport is listed andsonar-project.propertiessetssonar.sources, which is read as a Java properties file. The count is said on the line that says where the report was written, as Wrote build/mutation-sonar.json. Issues by top directory: 12 under src, 3 under app., with.for files at the root.
- The check's slug is
The package imports its own. The package's SonarCloud analysis reads its own
sonarreport, so its gate of no open issue (ADR-0011) also holds its survivors.- The package's CI does not run its own gate, so its
SonarCloud analysis has no
sonarreport to read.
- The package's CI does not run its own gate, so its
SonarCloud analysis has no
Where it lives in the code.
Core\Reportrenders the report andAdapter\Filesystemwrites it, as every file report is written. A test checks the output against the fields Sonar's documentation lists.Adapter\Filesystem\SonarReportFilewrites it, with the mutated files read throughAdapter\Filesystem\MutatedFiles, as the HTML report reads them.tests/Fixtures/sonar-generic-issues.schema.jsonis a JSON Schema of the fields the documentation lists, and every verdict's report is checked against it.
Alternatives considered
| Option | Why it lost |
|---|---|
The official SDKs, in suggest | Google's library brings a dependency tree larger than the gate, gRPC among it. Azure's is retired. |
| Accepting key files, account keys and shared access signatures | Works everywhere at once, and puts a long-lived secret that can write the default branch's ledger in CI, which OIDC federation exists to remove. |
Binding the writing identity to ref: refs/heads/<default> | Every job that runs on the default branch carries that ref, including those issue_comment and workflow_run start (ADR-0019). |
| Signed URLs for forks, made by the default branch's run | No public bucket. A GCS signed URL lives seven days at most, and the URL itself has to reach every fork. |
| No public read for these two stores | Simpler. A fork's pull request re-mutates everything it cannot carry. |
| Conditional writes on the two new stores only | No lost proofs there. Two stores would behave unlike the other three. |
| Pointing SonarQube at the SARIF report | Nothing to build. Sonar would turn every survivor into a security vulnerability. |
| The deprecated external-issues format beside the current one | Serves SonarQube Server before 10.3, with a deprecated format to keep. |
| One Sonar rule per mutator family | Richer filtering in Sonar. Eleven rules to keep in step with ADR-0009's families, where the gate's own four judgements already say what matters. |
A rule for each severity: HIGH in a set that failed, LOW otherwise | Severity that follows the floor. An issue would move to another rule each time its set crossed its floor, and lose what SonarQube had accepted of it. |
| A fixed effort per survivor | Survivors would show as technical debt, measured in minutes nobody measured. |
Consequences
Proofs can live in all three major clouds, with the same scope rule and the same trust boundary, and with no long-lived secret in CI.
Forks read the default branch's proofs on every store that has a public URL, and plant nothing.
Survivors reach SonarQube as reliability issues, and untested security defences as security issues, counted by its quality gate like any other issue.
Related
- ADR-0004: what every run withholds from the runners
- ADR-0007: the ProofStore port, scopes and their trust
- ADR-0009: reporters, SARIF's rules and columns
- ADR-0011: the reusable workflow, and the package's SonarCloud gate
- ADR-0013: public read for runs without credentials
- ADR-0016: a reporter built over
symfony/http-client - ADR-0017:
doctor's checks - ADR-0018: troubleshooting slugs
- ADR-0019: OIDC identities that never trust a bare
ref - ADR-0020: mutants killed by static analysis
- ADR-0021: security-tagged mutators