sigstore: default blob attestation verification to SLSA provenance v1
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -55,6 +55,8 @@ export interface SigstoreOpts {
|
||||
imageTools?: ImageTools;
|
||||
}
|
||||
|
||||
const COSIGN_PREDICATE_SLSA_PROVENANCE_V1 = 'slsaprovenance1';
|
||||
|
||||
export class Sigstore {
|
||||
private readonly cosign: Cosign;
|
||||
private readonly imageTools: ImageTools;
|
||||
@@ -352,7 +354,8 @@ export class Sigstore {
|
||||
'verify-blob-attestation',
|
||||
'--new-bundle-format',
|
||||
'--certificate-oidc-issuer', 'https://token.actions.githubusercontent.com',
|
||||
'--certificate-identity-regexp', opts.certificateIdentityRegexp
|
||||
'--certificate-identity-regexp', opts.certificateIdentityRegexp,
|
||||
'--type', opts.predicateType ?? COSIGN_PREDICATE_SLSA_PROVENANCE_V1
|
||||
]
|
||||
if (opts.noTransparencyLog || !signedRes.tlogID) {
|
||||
// if there is no tlog entry, we skip tlog verification but still verify the signed timestamp
|
||||
|
||||
@@ -73,6 +73,7 @@ export interface SignProvenanceBlobsResult extends ParsedBundle {
|
||||
}
|
||||
|
||||
export interface VerifySignedArtifactsOpts {
|
||||
predicateType?: string;
|
||||
certificateIdentityRegexp: string;
|
||||
noTransparencyLog?: boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user