Skip to content

ci: publish MCP server images with SBOM attestations - #3437

Merged
LauraGPT merged 2 commits into
modelscope:mainfrom
kobihikri:ci/image-provenance-sbom
Jul 29, 2026
Merged

ci: publish MCP server images with SBOM attestations#3437
LauraGPT merged 2 commits into
modelscope:mainfrom
kobihikri:ci/image-provenance-sbom

Conversation

@kobihikri

Copy link
Copy Markdown
Contributor

Hi, and thanks for FunASR.

.github/workflows/publish-mcp-server.yml publishes the MCP server image, but the pushed manifest carries no provenance or SBOM attestation. Someone pulling it cannot check that it was built by this workflow, from this repository, at that tag.

MCP servers are a case where this matters a bit more than usual: an MCP server is added to someone's assistant configuration and then invoked automatically, often with access to whatever that assistant can reach. The image ends up trusted by default rather than reviewed each time, so being able to confirm where it came from is worth having.

The change is two lines on the build step:

          push: true
          provenance: mode=max
          sbom: true

BuildKit attaches both to the image manifest, so they travel with the image. No permissions change is needed — nothing has to gain id-token.

docker buildx imagetools inspect <image>:<tag> --format '{{ json .Provenance }}'

Two caveats: mode=max records build arguments (provenance: true gives a smaller record if any have been sensitive), and attestations add an extra manifest to the index, which the registry supports.

No SLSA level claimed.

Disclosure: I used AI assistance to help spot this and prepare the change, and I read the workflow myself.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@kobihikri

Copy link
Copy Markdown
Contributor Author

Correction — I got a fact wrong in this PR, and I would rather flag it myself than let it sit.

I wrote that the pushed manifest "carries no provenance or SBOM attestation". That is half wrong, and the wrong half matters.

Provenance is already there. For public repositories, docker/build-push-action adds provenance attestations with mode=max by default — Docker's documentation states it plainly: "Public repos: provenance attestations with mode=max are automatically added". I checked published images and they do already carry attestation manifests. So the provenance: mode=max line in my diff makes existing behaviour explicit; it does not add anything new.

The SBOM is genuinely new. That part stands — the same page says "SBOM attestations aren't automatically added to the image", and sbom: true is what enables them.

I also wrote in the caveats that provenance: true gives "a smaller record". That is wrong as well: true resolves to max on a public repo, and the smaller setting is provenance: mode=min.

So the honest description of this PR is: it adds an SBOM attestation, and pins the provenance mode explicitly instead of relying on the default. Both are still defensible — an explicit line means the behaviour will not change quietly if the default ever does — but it is a smaller change than my description implied, and you should judge it on that basis rather than on what I originally wrote.

Happy to retitle and rewrite the description accordingly, or to close this if the SBOM alone is not worth the diff to you. Either is fine — just say which and I will act on it.

Apologies for the inaccuracy. It was caught by a maintainer reviewing the same change on another project, and they were right to.

@LauraGPT LauraGPT changed the title ci: attach provenance and SBOM attestations to the published MCP server image ci: publish MCP server images with SBOM attestations Jul 29, 2026

@LauraGPT LauraGPT left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified against docker/build-push-action v7 inputs: sbom: true adds the SBOM attestation, while provenance: mode=max makes the public-repository default explicit. The workflow YAML parses and the change does not expose build secrets.

@LauraGPT
LauraGPT merged commit 6570924 into modelscope:main Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants