@@ -8,7 +8,7 @@ import {attestProvenance, buildSLSAProvenancePredicate} from '../src/provenance'
8
8
9
9
describe ( 'provenance functions' , ( ) => {
10
10
const originalEnv = process . env
11
- const issuer = 'https://example .com'
11
+ const issuer = 'https://token.actions.foo.ghe .com'
12
12
const audience = 'nobody'
13
13
const jwksPath = '/.well-known/jwks.json'
14
14
const tokenPath = '/token'
@@ -38,7 +38,7 @@ describe('provenance functions', () => {
38
38
...originalEnv ,
39
39
ACTIONS_ID_TOKEN_REQUEST_URL : `${ issuer } ${ tokenPath } ?` ,
40
40
ACTIONS_ID_TOKEN_REQUEST_TOKEN : 'token' ,
41
- GITHUB_SERVER_URL : 'https://github .com' ,
41
+ GITHUB_SERVER_URL : 'https://foo.ghe .com' ,
42
42
GITHUB_REPOSITORY : claims . repository
43
43
}
44
44
@@ -68,7 +68,7 @@ describe('provenance functions', () => {
68
68
69
69
describe ( 'buildSLSAProvenancePredicate' , ( ) => {
70
70
it ( 'returns a provenance hydrated from an OIDC token' , async ( ) => {
71
- const predicate = await buildSLSAProvenancePredicate ( issuer )
71
+ const predicate = await buildSLSAProvenancePredicate ( )
72
72
expect ( predicate ) . toMatchSnapshot ( )
73
73
} )
74
74
} )
@@ -96,9 +96,9 @@ describe('provenance functions', () => {
96
96
} )
97
97
98
98
describe ( 'when using the github Sigstore instance' , ( ) => {
99
- const { fulcioURL, tsaServerURL} = signingEndpoints ( 'github' )
100
-
101
99
beforeEach ( async ( ) => {
100
+ const { fulcioURL, tsaServerURL} = signingEndpoints ( 'github' )
101
+
102
102
// Mock Sigstore
103
103
await mockFulcio ( { baseURL : fulcioURL , strict : false } )
104
104
await mockTSA ( { baseURL : tsaServerURL } )
@@ -118,8 +118,7 @@ describe('provenance functions', () => {
118
118
subjectName,
119
119
subjectDigest,
120
120
token : 'token' ,
121
- sigstore : 'github' ,
122
- issuer
121
+ sigstore : 'github'
123
122
} )
124
123
125
124
expect ( attestation ) . toBeDefined ( )
@@ -146,8 +145,7 @@ describe('provenance functions', () => {
146
145
const attestation = await attestProvenance ( {
147
146
subjectName,
148
147
subjectDigest,
149
- token : 'token' ,
150
- issuer
148
+ token : 'token'
151
149
} )
152
150
153
151
expect ( attestation ) . toBeDefined ( )
@@ -183,8 +181,7 @@ describe('provenance functions', () => {
183
181
subjectName,
184
182
subjectDigest,
185
183
token : 'token' ,
186
- sigstore : 'public-good' ,
187
- issuer
184
+ sigstore : 'public-good'
188
185
} )
189
186
190
187
expect ( attestation ) . toBeDefined ( )
@@ -211,8 +208,7 @@ describe('provenance functions', () => {
211
208
const attestation = await attestProvenance ( {
212
209
subjectName,
213
210
subjectDigest,
214
- token : 'token' ,
215
- issuer
211
+ token : 'token'
216
212
} )
217
213
218
214
expect ( attestation ) . toBeDefined ( )
@@ -238,8 +234,7 @@ describe('provenance functions', () => {
238
234
subjectDigest,
239
235
token : 'token' ,
240
236
sigstore : 'public-good' ,
241
- skipWrite : true ,
242
- issuer
237
+ skipWrite : true
243
238
} )
244
239
245
240
expect ( attestation ) . toBeDefined ( )
0 commit comments