Skip to content

Commit 807cf96

Browse files
committed
Fix
1 parent 632660c commit 807cf96

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/ghsecrets/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@ func main() {
5050
}
5151
}
5252

53-
// Ensure secretID starts with "testsecrets/"
54-
secretID = ensurePrefix(secretID, "testsecrets/")
55-
5653
switch strings.ToLower(backend) {
5754
case "github":
5855
if err := setGitHubSecret(filePath, secretID); err != nil {
5956
exitWithError(err, "Failed to set GitHub secret")
6057
return
6158
}
6259
case "aws":
60+
// Ensure AWS secretID starts with "testsecrets/" prefix
61+
// GHA IAM role has a policy that restricts access to secrets with this prefix
62+
secretID = ensurePrefix(secretID, "testsecrets/")
6363
if err := setAWSSecret(filePath, secretID, sharedWith); err != nil {
6464
exitWithError(err, "Failed to set AWS secret")
6565
return

0 commit comments

Comments
 (0)