mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-23 04:54:00 +01:00
ci(runner): inspect Daytona image metadata remotely (#12795)
## Thinking Path The reused Daytona image path already verifies the signed immutable digest. It then downloads every filesystem layer only to read OCI config fields. Buildx can retrieve the same config from that immutable digest without pulling the layers. The assertions can therefore stay intact while removing the expensive transfer. ## What Changed - inspect the signed immutable Daytona image config through Buildx after GHCR logout - preserve digest, source revision, content ID, platform, user, and provider-pack assertions - extend the workflow contract test for the metadata-only path ## Verification - Daytona image and workflow security tests: 10 passed - Prettier and git diff checks passed - observed full pull/prune cost: about 4m55s; metadata inspection: about one second ## Risks The current image has one runnable linux/amd64 platform plus its attestation. A future genuinely multi-platform image would need explicit linux/amd64 selection. ## Model Used Codex (GPT-5)
This commit is contained in:
1 parent
871f7d1124
commit
03faa644fb
2 files changed
+30
-23
No files matched your search
@@ -71,8 +71,16 @@ describe("runner E2E Daytona image contract", () => {
|
||||
);
|
||||
expect(workflow).not.toContain("e2e-git-${{ github.sha }}");
|
||||
expect(workflow).toContain("cosign sign --yes");
|
||||
expect(workflow).toContain("docker image inspect");
|
||||
expect(workflow).toContain('.Config.User == "daytona"');
|
||||
expect(workflow).toContain("docker logout ghcr.io");
|
||||
expect(workflow).toContain(`docker buildx imagetools inspect "$immutable"`);
|
||||
expect(workflow).toContain(`--format '{{json .Image}}'`);
|
||||
expect(workflow).not.toContain(`docker --config "$anonymous_config" pull`);
|
||||
expect(workflow).not.toContain("docker image inspect");
|
||||
expect(workflow).not.toContain("docker buildx prune --all --force");
|
||||
expect(workflow).not.toContain("docker system prune --all --force");
|
||||
expect(workflow).toContain('.architecture == "amd64"');
|
||||
expect(workflow).toContain('.os == "linux"');
|
||||
expect(workflow).toContain('.config.User == "daytona"');
|
||||
expect(workflow).toContain("PAPERCLIP_RUNNER_PROVIDER_PACK_ROOT=");
|
||||
expect(workflow).toContain(
|
||||
"node packages/paperclip-runner/scripts/build-provider-pack.mjs packages/paperclip-runner/provider-pack",
|
||||
@@ -83,7 +91,12 @@ describe("runner E2E Daytona image contract", () => {
|
||||
expect(workflow).toContain(
|
||||
"PAPERCLIP_RUNNER_SOURCE_REVISION: ${{ needs.daytona_image.outputs.source_revision }}",
|
||||
);
|
||||
expect(workflow).toContain("anonymous_config");
|
||||
expect(workflow.indexOf("cosign verify")).toBeLessThan(
|
||||
workflow.indexOf("docker logout ghcr.io"),
|
||||
);
|
||||
expect(workflow.indexOf("docker logout ghcr.io")).toBeLessThan(
|
||||
workflow.indexOf(`--format '{{json .Image}}'`),
|
||||
);
|
||||
});
|
||||
|
||||
it("hashes the audited image dependency closure rather than the repository revision", async () => {
|
||||
|
||||
Reference in new issue
Block a user