Skip to content

Commit fc7fc5e

Browse files
committed
Add acceptance tests for SLSA v1 attestations
Extends acceptance test framework to create and verify SLSA v1 attestations, enabling end-to-end testing of v1 provenance support. Co-authored-by: Claude Code <[email protected]> Ref: https://issues.redhat.com/browse/EC-1581
1 parent 0adcc43 commit fc7fc5e

File tree

7 files changed

+198
-27
lines changed

7 files changed

+198
-27
lines changed

acceptance/attestation/attestation.go

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const (
3838
PredicateBuilderID = "https://tekton.dev/chains/v2"
3939
PredicateBuilderType = "https://tekton.dev/attestations/chains/pipelinerun@v2"
4040
PredicateType = "slsaprovenance"
41+
PredicateTypeV1 = "slsaprovenance1"
4142
)
4243

4344
// CreateStatementFor creates an empty statement that can be further customized
@@ -70,9 +71,44 @@ func CreateStatementFor(imageName string, image v1.Image) (*in_toto.ProvenanceSt
7071
return nil, fmt.Errorf("received statement of unsupported type: %v", obj)
7172
}
7273

74+
// CreateV1StatementFor creates an empty SLSA v1.0 statement that can be further customized
75+
// and subsequently signed by SignStatement.
76+
func CreateV1StatementFor(imageName string, image v1.Image) (*in_toto.ProvenanceStatementSLSA1, error) {
77+
digest, err := image.Digest()
78+
if err != nil {
79+
return nil, err
80+
}
81+
82+
obj, err := attestation.GenerateStatement(attestation.GenerateOpts{
83+
Predicate: bytes.NewReader([]byte(fmt.Sprintf(`{
84+
"buildDefinition": {
85+
"buildType": "%s",
86+
"externalParameters": {}
87+
},
88+
"runDetails": {
89+
"builder": {
90+
"id": "%s"
91+
}
92+
}
93+
}`, PredicateBuilderType, PredicateBuilderID))),
94+
Type: PredicateTypeV1,
95+
Digest: digest.Hex,
96+
Repo: imageName,
97+
})
98+
if err != nil {
99+
return nil, err
100+
}
101+
102+
if statement, ok := obj.(in_toto.ProvenanceStatementSLSA1); ok {
103+
return &statement, nil
104+
}
105+
106+
return nil, fmt.Errorf("received statement of unsupported type: %v", obj)
107+
}
108+
73109
// SignStatement signs the provided statement with the named key. The key needs
74110
// to be previously generated with the functionality from the crypto package.
75-
func SignStatement(ctx context.Context, keyName string, statement in_toto.ProvenanceStatementSLSA02) ([]byte, error) {
111+
func SignStatement(ctx context.Context, keyName string, statement any) ([]byte, error) {
76112
payload, err := json.Marshal(statement)
77113
if err != nil {
78114
return nil, err

acceptance/examples/sigstore.rego

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ _errors contains error if {
8080
info := ec.sigstore.verify_attestation(_image_ref, _sigstore_opts)
8181
some att in info.attestations
8282

83-
att.statement.predicateType != "https://slsa.dev/provenance/v0.2"
83+
# Support both SLSA v0.2 and v1 predicate types
84+
not _is_supported_slsa_predicate(att.statement.predicateType)
8485
error := sprintf("unexpected statement predicate: %s", [att.statement.predicateType])
8586
}
8687

@@ -115,5 +116,18 @@ valid_signature(sig) if {
115116
}
116117

117118
_builder_id(att) := value if {
119+
# SLSA v0.2: predicate.builder.id
118120
value := att.statement.predicate.builder.id
121+
} else := value if {
122+
# SLSA v1: predicate.runDetails.builder.id
123+
value := att.statement.predicate.runDetails.builder.id
119124
} else := "MISSING"
125+
126+
# Helper to check if predicate type is a supported SLSA version
127+
_is_supported_slsa_predicate(predicate_type) if {
128+
predicate_type == "https://slsa.dev/provenance/v0.2"
129+
}
130+
131+
_is_supported_slsa_predicate(predicate_type) if {
132+
predicate_type == "https://slsa.dev/provenance/v1"
133+
}

acceptance/go.mod

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ require (
1414
github.com/go-git/go-git/v5 v5.13.0
1515
github.com/go-openapi/strfmt v0.23.0
1616
github.com/google/go-containerregistry v0.20.7
17-
github.com/in-toto/in-toto-golang v0.9.1-0.20240317085821-8e2966059a09
17+
github.com/in-toto/in-toto-golang v0.9.0
1818
github.com/konflux-ci/application-api v0.0.0-20240812090716-e7eb2ecfb409
1919
github.com/opencontainers/image-spec v1.1.1
2020
github.com/otiai10/copy v1.14.0
@@ -26,7 +26,7 @@ require (
2626
github.com/sigstore/rekor v1.3.6
2727
github.com/sigstore/sigstore v1.8.9
2828
github.com/stretchr/testify v1.11.1
29-
github.com/tektoncd/cli v0.38.0
29+
github.com/tektoncd/cli v0.37.1
3030
github.com/tektoncd/pipeline v0.66.0
3131
github.com/testcontainers/testcontainers-go v0.34.0
3232
github.com/transparency-dev/merkle v0.0.2
@@ -140,7 +140,6 @@ require (
140140
github.com/hashicorp/go-multierror v1.1.1 // indirect
141141
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
142142
github.com/hashicorp/golang-lru v1.0.2 // indirect
143-
github.com/in-toto/attestation v1.1.0 // indirect
144143
github.com/inconshreveable/mousetrap v1.1.0 // indirect
145144
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
146145
github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267 // indirect

acceptance/go.sum

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@ github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHf
261261
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
262262
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
263263
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
264-
github.com/creack/pty v1.1.23 h1:4M6+isWdcStXEf15G/RbrMPOQj1dZ7HPZCGwE4kOeP0=
265-
github.com/creack/pty v1.1.23/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
264+
github.com/creack/pty v1.1.21 h1:1/QdRyBaHHJP61QkWMXlOIBfsgdDeeKfK8SYVUWJKf0=
265+
github.com/creack/pty v1.1.21/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
266266
github.com/cucumber/gherkin/go/v26 v26.2.0 h1:EgIjePLWiPeslwIWmNQ3XHcypPsWAHoMCz/YEBKP4GI=
267267
github.com/cucumber/gherkin/go/v26 v26.2.0/go.mod h1:t2GAPnB8maCT4lkHL99BDCVNzCh1d7dBhCLt150Nr/0=
268268
github.com/cucumber/godog v0.15.0 h1:51AL8lBXF3f0cyA5CV4TnJFCTHpgiy+1x1Hb3TtZUmo=
@@ -529,6 +529,8 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+
529529
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
530530
github.com/googleapis/gax-go/v2 v2.14.1 h1:hb0FFeiPaQskmvakKu5EbCbpntQn48jyHuvrkurSS/Q=
531531
github.com/googleapis/gax-go/v2 v2.14.1/go.mod h1:Hb/NubMaVM88SrNkvl8X/o8XWwDJEPqouaLeN2IUxoA=
532+
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA=
533+
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
532534
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
533535
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
534536
github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw=
@@ -580,8 +582,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:
580582
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
581583
github.com/in-toto/attestation v1.1.0 h1:oRWzfmZPDSctChD0VaQV7MJrywKOzyNrtpENQFq//2Q=
582584
github.com/in-toto/attestation v1.1.0/go.mod h1:DB59ytd3z7cIHgXxwpSX2SABrU6WJUKg/grpdgHVgVs=
583-
github.com/in-toto/in-toto-golang v0.9.1-0.20240317085821-8e2966059a09 h1:cwCITdi9pF50CF8uh40qDbkJ/VrEVzx5AoaHP7OPdEo=
584-
github.com/in-toto/in-toto-golang v0.9.1-0.20240317085821-8e2966059a09/go.mod h1:yGCBn2JKF1m26FX8GmkcLSOFVjB6khWRxFsHwWIg7hw=
585+
github.com/in-toto/in-toto-golang v0.9.0 h1:tHny7ac4KgtsfrG6ybU8gVOZux2H8jN05AXJ9EBM1XU=
586+
github.com/in-toto/in-toto-golang v0.9.0/go.mod h1:xsBVrVsHNsB61++S6Dy2vWosKhuA3lUTQd+eF9HdeMo=
585587
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
586588
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
587589
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
@@ -737,6 +739,8 @@ github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3v
737739
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
738740
github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
739741
github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
742+
github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI=
743+
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
740744
github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1Hc+ETb5K+23HdAMvESYE3ZJ5b5cMI=
741745
github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE=
742746
github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=
@@ -896,12 +900,12 @@ github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDd
896900
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48=
897901
github.com/tchap/go-patricia/v2 v2.3.3 h1:xfNEsODumaEcCcY3gI0hYPZ/PcpVv5ju6RMAhgwZDDc=
898902
github.com/tchap/go-patricia/v2 v2.3.3/go.mod h1:VZRHKAb53DLaG+nA9EaYYiaEx6YztwDlLElMsnSHD4k=
899-
github.com/tektoncd/cli v0.38.0 h1:mH4xMxehfPOD2Ar0KZgWtb9Wh3r3S6wSAAZo8pTcruI=
900-
github.com/tektoncd/cli v0.38.0/go.mod h1:MLcBL6RH70XgKeaKV3l3YcvHjASyTELZACG9ZfVA5yg=
903+
github.com/tektoncd/cli v0.37.1 h1:bAf8sISiI7WGsS7Ov2pFeQ86+M8AQB/CjFbEfJOn+w0=
904+
github.com/tektoncd/cli v0.37.1/go.mod h1:voq7pZzbA/dohTDE4l3iby3Wnnqt0XtkYUBbj1h3u5o=
901905
github.com/tektoncd/pipeline v0.66.0 h1:WLL98YEgWzblSAD2mPbpZN97tkOC50wiftaW+8+6zTY=
902906
github.com/tektoncd/pipeline v0.66.0/go.mod h1:V3cyfxxc7b3GLT2a13GX2mWA86qmxWhh4mOp4gfFQwQ=
903-
github.com/tektoncd/triggers v0.29.0 h1:piRTJT1Sjq3xmGnR50V54oG0NlsszKETLxdCGhgSNQQ=
904-
github.com/tektoncd/triggers v0.29.0/go.mod h1:CHE2QhjYkECFCpvPLpiANhI/hIlJUxL03ulTNEgbT10=
907+
github.com/tektoncd/triggers v0.27.0 h1:c55e/YJF6Vs5BEarqDYksFYuR4sFbmAVEqrLNPZvXUk=
908+
github.com/tektoncd/triggers v0.27.0/go.mod h1:DkkAkdSd9aAW9RklUVyFRKQ8kONmZQw4Ur2G1r3wFQo=
905909
github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo=
906910
github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ=
907911
github.com/thales-e-security/pool v0.0.2 h1:RAPs4q2EbWsTit6tpzuvTFlgFRJ3S8Evf5gtvVDbmPg=

acceptance/image/image.go

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ func CreateAndPushImageSignature(ctx context.Context, imageName string, keyName
296296
// image, same as `cosign attest` or Tekton Chains would, and pushes it to the stub
297297
// registry as a new tag for that image akin to how cosign and Tekton Chains do it
298298
func CreateAndPushAttestation(ctx context.Context, imageName, keyName string) (context.Context, error) {
299-
return createAndPushAttestationWithPatches(ctx, imageName, keyName, nil)
299+
return createAndPushAttestationInternal(ctx, imageName, keyName, nil, false)
300300
}
301301

302302
// createAndPushAttestation for a named image in the Context creates an attestation
@@ -306,6 +306,11 @@ func CreateAndPushAttestation(ctx context.Context, imageName, keyName string) (c
306306
// statement as required by the tests. This implementation now includes transparency
307307
// log upload to generate bundle information like Tekton Chains does for attestations.
308308
func createAndPushAttestationWithPatches(ctx context.Context, imageName, keyName string, patches *godog.Table) (context.Context, error) {
309+
return createAndPushAttestationInternal(ctx, imageName, keyName, patches, false)
310+
}
311+
312+
// createAndPushAttestationInternal is the internal implementation that supports both SLSA v0.2 and v1
313+
func createAndPushAttestationInternal(ctx context.Context, imageName, keyName string, patches *godog.Table, useV1 bool) (context.Context, error) {
309314
var state *imageState
310315
ctx, err := testenv.SetupState(ctx, &state)
311316
if err != nil {
@@ -322,22 +327,28 @@ func createAndPushAttestationWithPatches(ctx context.Context, imageName, keyName
322327
return ctx, err
323328
}
324329

325-
// generates a mostly-empty statement, but with the required fields already filled in
326-
// at this point we could add more data to the statement but the minimum works, we'll
327-
// need to add more data to the attestation in more elaborate tests so:
328-
// TODO: create a hook to add more data to the attestation
329-
statement, err := attestation.CreateStatementFor(imageName, image)
330-
if err != nil {
331-
return ctx, err
332-
}
330+
var statement any
333331

334-
statement, err = applyPatches(statement, patches)
335-
if err != nil {
336-
return ctx, err
332+
if useV1 {
333+
// SLSA v1.0
334+
statement, err = attestation.CreateV1StatementFor(imageName, image)
335+
if err != nil {
336+
return ctx, err
337+
}
338+
} else {
339+
// SLSA v0.2
340+
v02Statement, err := attestation.CreateStatementFor(imageName, image)
341+
if err != nil {
342+
return ctx, err
343+
}
344+
345+
statement, err = applyPatches(v02Statement, patches)
346+
if err != nil {
347+
return ctx, err
348+
}
337349
}
338350

339-
// signs the attestation with the named key
340-
signedAttestation, err := attestation.SignStatement(ctx, keyName, *statement)
351+
signedAttestation, err := attestation.SignStatement(ctx, keyName, statement)
341352
if err != nil {
342353
return ctx, err
343354
}
@@ -484,6 +495,12 @@ func createAndPushAttestationWithPatches(ctx context.Context, imageName, keyName
484495
return ctx, nil
485496
}
486497

498+
// CreateAndPushV1Attestation for a named image creates a SLSA v1.0 attestation
499+
// and pushes it to the stub registry
500+
func CreateAndPushV1Attestation(ctx context.Context, imageName, keyName string) (context.Context, error) {
501+
return createAndPushAttestationInternal(ctx, imageName, keyName, nil, true)
502+
}
503+
487504
// CreateAndPushImageWithParent creates a parent image and a test image for the given imageName.
488505
func CreateAndPushImageWithParent(ctx context.Context, imageName string) (context.Context, error) {
489506
var err error
@@ -1164,6 +1181,7 @@ func AddStepsTo(sc *godog.ScenarioContext) {
11641181
sc.Step(`^a valid image signature of "([^"]*)" image signed by the "([^"]*)" key$`, CreateAndPushImageSignature)
11651182
sc.Step(`^a valid attestation of "([^"]*)" signed by the "([^"]*)" key$`, CreateAndPushAttestation)
11661183
sc.Step(`^a valid attestation of "([^"]*)" signed by the "([^"]*)" key, patched with$`, createAndPushAttestationWithPatches)
1184+
sc.Step(`^a valid slsa v1 attestation of "([^"]*)" signed by the "([^"]*)" key$`, CreateAndPushV1Attestation)
11671185
sc.Step(`^a signed and attested keyless image named "([^"]*)"$`, createAndPushKeylessImage)
11681186
sc.Step(`^a OCI policy bundle named "([^"]*)" with$`, createAndPushPolicyBundle)
11691187
sc.Step(`^an image named "([^"]*)" with signature from "([^"]*)"$`, steal("sig"))

features/__snapshots__/validate_image.snap

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5274,3 +5274,80 @@ Error: success criteria not met
52745274
[signatures with embedded bundles verify without external rekor queries:stderr - 1]
52755275

52765276
---
5277+
5278+
[SLSA v1 attestation support:stdout - 1]
5279+
{
5280+
"success": true,
5281+
"components": [
5282+
{
5283+
"name": "Unnamed",
5284+
"containerImage": "${REGISTRY}/acceptance/slsa-v1-test@sha256:${REGISTRY_acceptance/slsa-v1-test:latest_DIGEST}",
5285+
"source": {},
5286+
"successes": [
5287+
{
5288+
"msg": "Pass",
5289+
"metadata": {
5290+
"code": "builtin.attestation.signature_check"
5291+
}
5292+
},
5293+
{
5294+
"msg": "Pass",
5295+
"metadata": {
5296+
"code": "builtin.attestation.syntax_check"
5297+
}
5298+
},
5299+
{
5300+
"msg": "Pass",
5301+
"metadata": {
5302+
"code": "builtin.image.signature_check"
5303+
}
5304+
},
5305+
{
5306+
"msg": "Pass",
5307+
"metadata": {
5308+
"code": "sigstore.valid"
5309+
}
5310+
}
5311+
],
5312+
"success": true,
5313+
"signatures": [
5314+
{
5315+
"keyid": "",
5316+
"sig": "${IMAGE_SIGNATURE_acceptance/slsa-v1-test}"
5317+
}
5318+
],
5319+
"attestations": [
5320+
{
5321+
"type": "https://in-toto.io/Statement/v0.1",
5322+
"predicateType": "https://slsa.dev/provenance/v1",
5323+
"predicateBuildType": "https://tekton.dev/attestations/chains/pipelinerun@v2",
5324+
"signatures": [
5325+
{
5326+
"keyid": "",
5327+
"sig": "${ATTESTATION_SIGNATURE_acceptance/slsa-v1-test}"
5328+
}
5329+
]
5330+
}
5331+
]
5332+
}
5333+
],
5334+
"key": "${known_PUBLIC_KEY_JSON}",
5335+
"policy": {
5336+
"sources": [
5337+
{
5338+
"policy": [
5339+
"git::${GITHOST}/git/sigstore-v1-policy.git?ref=${LATEST_COMMIT}"
5340+
]
5341+
}
5342+
],
5343+
"rekorUrl": "${REKOR}",
5344+
"publicKey": "${known_PUBLIC_KEY}"
5345+
},
5346+
"ec-version": "${EC_VERSION}",
5347+
"effective-time": "${TIMESTAMP}"
5348+
}
5349+
---
5350+
5351+
[SLSA v1 attestation support:stderr - 1]
5352+
5353+
---

features/validate_image.feature

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,3 +1175,26 @@ Feature: evaluate enterprise contract
11751175
Then the exit status should be 1
11761176
And the output should match the snapshot
11771177
And the "${TMPDIR}/output.json" file should match the snapshot
1178+
1179+
Scenario: SLSA v1 attestation support
1180+
Given a key pair named "known"
1181+
And an image named "acceptance/slsa-v1-test"
1182+
And a valid image signature of "acceptance/slsa-v1-test" image signed by the "known" key
1183+
And a valid slsa v1 attestation of "acceptance/slsa-v1-test" signed by the "known" key
1184+
And a git repository named "sigstore-v1-policy" with
1185+
| main.rego | examples/sigstore.rego |
1186+
And policy configuration named "ec-policy" with specification
1187+
"""
1188+
{
1189+
"sources": [
1190+
{
1191+
"policy": [
1192+
"git::https://${GITHOST}/git/sigstore-v1-policy.git"
1193+
]
1194+
}
1195+
]
1196+
}
1197+
"""
1198+
When ec command is run with "validate image --image ${REGISTRY}/acceptance/slsa-v1-test --policy acceptance/ec-policy --public-key ${known_PUBLIC_KEY} --rekor-url ${REKOR} --show-successes --output json"
1199+
Then the exit status should be 0
1200+
And the output should match the snapshot

0 commit comments

Comments
 (0)