Skip to content

Commit a83d40e

Browse files
committed
Decode base64 test secrets by default when fetching test secrets
1 parent ad8c475 commit a83d40e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tools/ghsecrets/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ If you want to retrieve an existing secret from AWS Secrets Manager, use:
8585
ghsecrets get --secret-id testsecrets/MySecretName --profile <your-aws-sdlc-profile>
8686
```
8787

88-
By default, it prints out the Base64-encoded string. To decode it automatically:
88+
By default, it tries to decode a Base64-encoded test secret. To disable decoding use `--decode false` flag:
8989

9090
```sh
91-
ghsecrets get --secret-id testsecrets/MySecretName --decode --profile <your-aws-sdlc-profile>
91+
ghsecrets get --secret-id testsecrets/MySecretName --decode false --profile <your-aws-sdlc-profile>
9292
```
9393

9494
## FAQ

tools/ghsecrets/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func main() {
106106
setCmd.PersistentFlags().StringSliceVar(&sharedWith, "shared-with", []string{}, "Comma-separated list of IAM ARNs to share the secret with")
107107

108108
getCmd.PersistentFlags().StringVarP(&secretID, "secret-id", "s", "", "ID of the secret to retrieve")
109-
getCmd.PersistentFlags().BoolVarP(&decode, "decode", "d", false, "Decode the Base64-encoded secret value")
109+
getCmd.PersistentFlags().BoolVarP(&decode, "decode", "d", true, "Decode the Base64-encoded secret value")
110110
getCmd.PersistentFlags().StringVar(&profile, "profile", "", "AWS profile to use for credentials (required for AWS backend)")
111111

112112
getCmd.MarkPersistentFlagRequired("secret-id")

0 commit comments

Comments
 (0)