@@ -471,6 +471,7 @@ describe('Configure AWS Credentials', () => {
471
471
RoleArn : ROLE_ARN ,
472
472
RoleSessionName : 'GitHubActions' ,
473
473
DurationSeconds : 6 * 3600 ,
474
+ SourceIdentity : GITHUB_ACTOR_SANITIZED ,
474
475
Tags : [
475
476
{ Key : 'GitHub' , Value : 'Actions' } ,
476
477
{ Key : 'Repository' , Value : ENVIRONMENT_VARIABLE_OVERRIDES . GITHUB_REPOSITORY } ,
@@ -493,6 +494,7 @@ describe('Configure AWS Credentials', () => {
493
494
RoleArn : ROLE_ARN ,
494
495
RoleSessionName : 'GitHubActions' ,
495
496
DurationSeconds : 5 ,
497
+ SourceIdentity : GITHUB_ACTOR_SANITIZED ,
496
498
Tags : [
497
499
{ Key : 'GitHub' , Value : 'Actions' } ,
498
500
{ Key : 'Repository' , Value : ENVIRONMENT_VARIABLE_OVERRIDES . GITHUB_REPOSITORY } ,
@@ -515,6 +517,7 @@ describe('Configure AWS Credentials', () => {
515
517
RoleArn : ROLE_ARN ,
516
518
RoleSessionName : 'MySessionName' ,
517
519
DurationSeconds : 6 * 3600 ,
520
+ SourceIdentity : GITHUB_ACTOR_SANITIZED ,
518
521
Tags : [
519
522
{ Key : 'GitHub' , Value : 'Actions' } ,
520
523
{ Key : 'Repository' , Value : ENVIRONMENT_VARIABLE_OVERRIDES . GITHUB_REPOSITORY } ,
@@ -537,6 +540,7 @@ describe('Configure AWS Credentials', () => {
537
540
RoleArn : 'arn:aws:iam::123456789012:role/MY-ROLE' ,
538
541
RoleSessionName : 'GitHubActions' ,
539
542
DurationSeconds : 6 * 3600 ,
543
+ SourceIdentity : GITHUB_ACTOR_SANITIZED ,
540
544
Tags : [
541
545
{ Key : 'GitHub' , Value : 'Actions' } ,
542
546
{ Key : 'Repository' , Value : ENVIRONMENT_VARIABLE_OVERRIDES . GITHUB_REPOSITORY } ,
@@ -559,7 +563,8 @@ describe('Configure AWS Credentials', () => {
559
563
RoleArn : 'arn:aws:iam::111111111111:role/MY-ROLE' ,
560
564
RoleSessionName : 'GitHubActions' ,
561
565
DurationSeconds : 6 * 3600 ,
562
- WebIdentityToken : 'testpayload'
566
+ WebIdentityToken : 'testpayload' ,
567
+ SourceIdentity : GITHUB_ACTOR_SANITIZED
563
568
} )
564
569
} ) ;
565
570
@@ -573,7 +578,8 @@ describe('Configure AWS Credentials', () => {
573
578
RoleArn : 'arn:aws:iam::111111111111:role/MY-ROLE' ,
574
579
RoleSessionName : 'GitHubActions' ,
575
580
DurationSeconds : 6 * 3600 ,
576
- WebIdentityToken : 'testpayload'
581
+ WebIdentityToken : 'testpayload' ,
582
+ SourceIdentity : GITHUB_ACTOR_SANITIZED
577
583
} )
578
584
} ) ;
579
585
@@ -590,7 +596,8 @@ describe('Configure AWS Credentials', () => {
590
596
RoleArn : 'arn:aws:iam::111111111111:role/MY-ROLE' ,
591
597
RoleSessionName : 'GitHubActions' ,
592
598
DurationSeconds : 3600 ,
593
- WebIdentityToken : 'testtoken'
599
+ WebIdentityToken : 'testtoken' ,
600
+ SourceIdentity : GITHUB_ACTOR_SANITIZED
594
601
} ) ;
595
602
expect ( core . setSecret ) . toHaveBeenNthCalledWith ( 1 , FAKE_STS_ACCESS_KEY_ID ) ;
596
603
expect ( core . setSecret ) . toHaveBeenNthCalledWith ( 2 , FAKE_STS_SECRET_ACCESS_KEY ) ;
@@ -610,7 +617,8 @@ describe('Configure AWS Credentials', () => {
610
617
RoleArn : 'arn:aws:iam::111111111111:role/MY-ROLE' ,
611
618
RoleSessionName : 'GitHubActions' ,
612
619
DurationSeconds : CUSTOM_ROLE_DURATION ,
613
- WebIdentityToken : 'testtoken'
620
+ WebIdentityToken : 'testtoken' ,
621
+ SourceIdentity : GITHUB_ACTOR_SANITIZED
614
622
} ) ;
615
623
expect ( core . setSecret ) . toHaveBeenNthCalledWith ( 1 , FAKE_STS_ACCESS_KEY_ID ) ;
616
624
expect ( core . setSecret ) . toHaveBeenNthCalledWith ( 2 , FAKE_STS_SECRET_ACCESS_KEY ) ;
@@ -644,6 +652,7 @@ describe('Configure AWS Credentials', () => {
644
652
RoleArn : ROLE_ARN ,
645
653
RoleSessionName : 'GitHubActions' ,
646
654
DurationSeconds : 6 * 3600 ,
655
+ SourceIdentity : GITHUB_ACTOR_SANITIZED ,
647
656
Tags : [
648
657
{ Key : 'GitHub' , Value : 'Actions' } ,
649
658
{ Key : 'Repository' , Value : ENVIRONMENT_VARIABLE_OVERRIDES . GITHUB_REPOSITORY } ,
@@ -671,6 +680,7 @@ describe('Configure AWS Credentials', () => {
671
680
RoleArn : ROLE_ARN ,
672
681
RoleSessionName : 'GitHubActions' ,
673
682
DurationSeconds : 6 * 3600 ,
683
+ SourceIdentity : GITHUB_ACTOR_SANITIZED ,
674
684
Tags : [
675
685
{ Key : 'GitHub' , Value : 'Actions' } ,
676
686
{ Key : 'Repository' , Value : ENVIRONMENT_VARIABLE_OVERRIDES . GITHUB_REPOSITORY } ,
@@ -693,6 +703,7 @@ describe('Configure AWS Credentials', () => {
693
703
RoleArn : ROLE_ARN ,
694
704
RoleSessionName : 'GitHubActions' ,
695
705
DurationSeconds : 21600 ,
706
+ SourceIdentity : GITHUB_ACTOR_SANITIZED ,
696
707
Tags : undefined
697
708
} )
698
709
} ) ;
@@ -707,6 +718,7 @@ describe('Configure AWS Credentials', () => {
707
718
RoleArn : ROLE_ARN ,
708
719
RoleSessionName : 'GitHubActions' ,
709
720
DurationSeconds : 21600 ,
721
+ SourceIdentity : GITHUB_ACTOR_SANITIZED ,
710
722
Tags : [
711
723
{ Key : 'GitHub' , Value : 'Actions' } ,
712
724
{ Key : 'Repository' , Value : ENVIRONMENT_VARIABLE_OVERRIDES . GITHUB_REPOSITORY } ,
@@ -729,6 +741,7 @@ describe('Configure AWS Credentials', () => {
729
741
RoleArn : ROLE_ARN ,
730
742
RoleSessionName : 'GitHubActions' ,
731
743
DurationSeconds : 21600 ,
744
+ SourceIdentity : GITHUB_ACTOR_SANITIZED ,
732
745
Tags : [
733
746
{ Key : 'GitHub' , Value : 'Actions' } ,
734
747
{ Key : 'Repository' , Value : ENVIRONMENT_VARIABLE_OVERRIDES . GITHUB_REPOSITORY } ,
0 commit comments