Skip to content

Commit 0b3aba8

Browse files
committed
deps: @sigstore/sign@4.0.1
1 parent b3409f4 commit 0b3aba8

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

node_modules/@sigstore/sign/dist/util/oidc.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,16 @@ const core_1 = require("@sigstore/core");
2020
function extractJWTSubject(jwt) {
2121
const parts = jwt.split('.', 3);
2222
const payload = JSON.parse(core_1.encoding.base64Decode(parts[1]));
23-
switch (payload.iss) {
24-
case 'https://accounts.google.com':
25-
case 'https://oauth2.sigstore.dev/auth':
26-
return payload.email;
27-
default:
28-
return payload.sub;
23+
if (payload.email) {
24+
if (!payload.email_verified) {
25+
throw new Error('JWT email not verified by issuer');
26+
}
27+
return payload.email;
28+
}
29+
if (payload.sub) {
30+
return payload.sub;
31+
}
32+
else {
33+
throw new Error('JWT subject not found');
2934
}
3035
}

node_modules/@sigstore/sign/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sigstore/sign",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"description": "Sigstore signing library",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -36,7 +36,7 @@
3636
"@sigstore/bundle": "^4.0.0",
3737
"@sigstore/core": "^3.0.0",
3838
"@sigstore/protobuf-specs": "^0.5.0",
39-
"make-fetch-happen": "^15.0.0",
39+
"make-fetch-happen": "^15.0.2",
4040
"proc-log": "^5.0.0",
4141
"promise-retry": "^2.0.1"
4242
},

package-lock.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2014,14 +2014,16 @@
20142014
}
20152015
},
20162016
"node_modules/@sigstore/sign": {
2017-
"version": "4.0.0",
2017+
"version": "4.0.1",
2018+
"resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-4.0.1.tgz",
2019+
"integrity": "sha512-KFNGy01gx9Y3IBPG/CergxR9RZpN43N+lt3EozEfeoyqm8vEiLxwRl3ZO5sPx3Obv1ix/p7FWOlPc2Jgwfp9PA==",
20182020
"inBundle": true,
20192021
"license": "Apache-2.0",
20202022
"dependencies": {
20212023
"@sigstore/bundle": "^4.0.0",
20222024
"@sigstore/core": "^3.0.0",
20232025
"@sigstore/protobuf-specs": "^0.5.0",
2024-
"make-fetch-happen": "^15.0.0",
2026+
"make-fetch-happen": "^15.0.2",
20252027
"proc-log": "^5.0.0",
20262028
"promise-retry": "^2.0.1"
20272029
},

0 commit comments

Comments
 (0)