Skip to content

chore: log provenance attestation fields#791

Draft
bdemeo12 wants to merge 1 commit intomainfrom
poc/provenance-attestation
Draft

chore: log provenance attestation fields#791
bdemeo12 wants to merge 1 commit intomainfrom
poc/provenance-attestation

Conversation

@bdemeo12
Copy link
Copy Markdown
Contributor

  • Ready for review
  • Follows CONTRIBUTING rules
  • Reviewed by Snyk internal team

What does this PR do?

Where should the reviewer start?

How should this be manually tested?

Any background context you want to provide?

What are the relevant tickets?

Screenshots

Additional questions

@bdemeo12 bdemeo12 requested a review from kateeselius April 13, 2026 17:51
Copy link
Copy Markdown
Contributor

@kateeselius kateeselius left a comment

Choose a reason for hiding this comment

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

Also, you should add your amazing new fact to the enum list! https://github.com/snyk/snyk-docker-plugin/blob/main/components/common.yaml#L17

}

export interface ProvenanceAttestationsFact {
type: "provenanceAttestations";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

`platform=${JSON.stringify(descriptor.platform)}, annotations=${JSON.stringify(descriptor.annotations)}`,
);

const isAttestationManifest =
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this just for provenance attestation? Are there other types that could end up with unknown architecture and "attestation-manifest" annotation?

const attestations: ProvenanceAttestation[] = [];

debug(
`[provenance-poc] Scanning ${metadata.mainIndexFile!.manifests.length} descriptors in image index`,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

would mainIndexFile ever be undefined?

`[provenance-poc] Attestation manifest content: ${JSON.stringify(nestedManifest, null, 2)}`,
);

const attestationManifest = nestedManifest as OciArchiveManifest;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would malformed attestations be an issue here if they can't be casted to OciArchiveManifest?

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