Add a few standard OCI annotations to every image you build: source, revision, authors, version and base digest. A scanner or a person can then read the labels on a flagged image and find the repository and team that own it, without asking around or keeping a separate spreadsheet.
The problem labels solve
A scan flags an image named something like platform-api, tag 4.2. Who fixes it? In many companies the answer takes a day of messages. The image itself can carry the answer if the build writes it in.
The OCI image specification defines a set of pre-defined annotation keys under the org.opencontainers.image prefix. They are optional, but they are standard, so tools can rely on them.
Keys worth setting
From the specification's annotation list:
| Key | What the spec says it holds | Why it helps |
|---|---|---|
| org.opencontainers.image.source | URL to get source code for building the image | Points to the repository |
| org.opencontainers.image.revision | Source control revision identifier for the packaged software | Points to the exact commit |
| org.opencontainers.image.authors | Contact details of the people or organization responsible for the image | Names who to contact |
| org.opencontainers.image.version | Version of the packaged software | Links image to a release |
| org.opencontainers.image.base.digest | Digest of the image this image is based on | Shows which base was used |
The spec describes authors as freeform text, so a team mailbox or a team name works better than a single person who may leave.
How to set them
You can pass labels at build time. Docker's build command accepts a label option, and many build tools write annotations from CI variables. In a CI pipeline, fill the values from variables the pipeline already knows: the repository URL, the commit SHA, the release tag. Do this in one shared build template, not by hand in each repository, so no team forgets.
Avoid putting secrets, internal ticket numbers or personal data in labels. Anyone who can pull the image can read them.
How routing then works
- The scan flags an image digest.
- A script or your scanner's integration reads the source and authors labels.
- The finding is assigned to that repository's owners, or a ticket is opened there.
Findings in a base image can be grouped by the base digest label, so a platform team handles one fix instead of fifty tickets. See base image rollup report for the grouping idea.
Where this breaks
- Images built before you adopted labels have none. Backfill from the registry if you can, or assign them to a default owner.
- Labels can be wrong or out of date. Treat them as a hint and verify during triage.
- Third-party images carry the publisher's labels, not yours. Route those findings to whoever approved the image for use.
A worked example: from flagged image to owner in three steps
Suppose a scan flags an image with a digest starting sha256:7f3a. Without labels, someone searches chat for the team. With labels, a script inspects the image configuration and reads the following values.
| Label | Value in this example |
|---|---|
| org.opencontainers.image.source | the Git URL of the payments service |
| org.opencontainers.image.revision | the commit identifier of the build |
| org.opencontainers.image.authors | the payments team mailbox |
| org.opencontainers.image.version | 4.2.0 |
| org.opencontainers.image.base.digest | the digest of the base image used |
The finding is assigned to the payments repository, a ticket mentions the commit, and the base digest shows that the vulnerable package came from the shared base image, not from the payments code. The platform team gets one ticket for the base, and the payments team gets none. Triage took minutes.
Step by step: roll out labels
- Pick the five keys above as your minimum set.
- Add them in the shared build template or pipeline step, filled from CI variables.
- Add a check that fails the build if source or authors is empty.
- After a week, query the registry to see which images still lack labels.
- Backfill older images by owner lookup, or label them "unowned" and review those monthly.
- Teach your triage script or ticket integration to read the labels.
Using labels beyond routing
Once the labels exist you can answer other questions quickly.
- Which images were built from a commit that is now known to be vulnerable?
- Which images share a base digest, and how many services need the same base update?
- Which images have no source label, and therefore were not built by the standard pipeline?
- Which images list a person, not a team, as author?
The last two are signals about process health, not just routing.
Keep labels honest
A label is a claim made by the builder. It can be wrong. An image built on a laptop could carry a source label that points to the main repository. Where it matters, combine labels with provenance or signature evidence that you can check, and treat the label as a lookup key rather than proof.
The specification also says the keys are optional and that freeform fields such as authors are strings, so different teams may fill them differently. Write a short style guide: use a team mailbox, use the canonical repository URL, and use the release tag for version.
Common mistakes
- Labeling by hand, which guarantees gaps.
- Putting sensitive data in labels. Anyone who can pull the image can read them.
- Using a personal email, which goes stale when people move.
- Forgetting that third party images carry labels you did not write.
Try it yourself
Click through it at your own pace, or open it full screen.
Look at what information is attached to each item, and imagine the same fields coming from image labels.
Where Safeguard fits
Safeguard's asset discovery and vulnerability management can help you keep track of which assets exist and who looks after them. You can try a free scan at gold.safeguard.sh/scan.
Quick check
Are OCI annotations required?
No, they are optional pre-defined keys. Using them means tools and people can read ownership the same way everywhere.
Should I put an engineer's email in the authors label?
Prefer a team name or shared mailbox. Individuals change roles, and labels are visible to anyone who can pull the image.
Do labels survive a rebuild?
Only if the build step writes them again. Put the labels in the shared build template so every rebuild sets them from current values.
Sources
Last reviewed: 19 October 2026.