Trusted publishers
A trusted publisher is a GitHub repository that your organization allows to upload. Its GitHub Actions workflows can then upload SBOMs and build provenance without an API key. GitHub gives each run a short-lived token, and Affectra checks that token against your list.
Only an admin or an owner sees the page Trusted publishers and can change the list. The workflow that uses it is in Upload SBOMs from GitHub Actions.
What it guards against
Section titled “What it guards against”- A key that leaks. There is no secret in the repository to leak. A token lives for one run.
- A repository that changes hands. Affectra pins a repository by the numeric IDs GitHub gave it, not by its name. If the repository is renamed, it stays trusted. If someone creates a new repository under the old name, it does not inherit the trust.
- A repository that should not upload. Only repositories on your list can upload to your organization. A repository trusted by another organization is not trusted by yours.
- The wrong workflow. You can restrict a trusted repository to one workflow file, a ref pattern, or a GitHub environment. All restrictions you set must match.
A GitHub token can only upload SBOMs and build provenance. It cannot read your data or change anything else.
It does not say that the code in the repository is safe. It says that your organization allows that repository’s workflows to upload.
Trust a repository
Section titled “Trust a repository”- Open Trusted publishers under Organization in the app.
- Under Trust a GitHub repository, enter the Repository as
owner/name. - Optionally set a Workflow (optional), such as
release.yml, a Ref pattern (optional), such asrefs/tags/v*, or an Environment (optional). - Select Trust repository.
For a public repository, Affectra looks up the IDs on GitHub. For a private repository it cannot. Select Private repository: Affectra cannot look it up, so enter its IDs, and enter the Owner ID and the Repository ID. Get both with:
gh api repos/OWNER/NAME --jq '.owner.id, .id'The list Trusted repositories shows each repository with its two IDs, its restrictions (or Any workflow), when it was added and by whom. Adding the same repository with the same restrictions twice is refused.
Stop trusting a repository
Section titled “Stop trusting a repository”Select Remove next to it and confirm Stop trusting …? Its workflows can no longer upload without an API key. It takes effect at once.
SBOMs that the repository uploaded stay. A signature that was recorded as trusted when it arrived keeps that record.
Trust and signatures
Section titled “Trust and signatures”Trusting a repository lets its workflows upload. Signing is a separate step that proves which workflow built a document. When the action signs an SBOM, Affectra checks the signature on upload and marks the SBOM signed when one of your trusted publishers made it. A valid signature from a repository that is not on the list shows signed, untrusted.
The signature policy goes one step further. Under Signed SBOMs on the same page, the checkbox Accept only SBOMs signed by a trusted repository makes your organization refuse every SBOM that is unsigned or signed by anyone else. See Require signed uploads and Sign SBOMs.
A certificate does not name a GitHub environment. A repository that you trust only for an environment therefore never counts as a signer.
- Upload SBOMs from GitHub Actions
- Require signed uploads
- API keys, for CI systems other than GitHub Actions