File tree Expand file tree Collapse file tree 3 files changed +17
-10
lines changed 
node_modules/@sigstore/sign Expand file tree Collapse file tree 3 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,16 @@ const core_1 = require("@sigstore/core");
2020function  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} 
Original file line number Diff line number Diff line change 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" 
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  },
Original file line number Diff line number Diff line change 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      },
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments