-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Several open-source projects related to secret management are already called "whisper". In order to make finding this project through search engines easier, we rename it to "murmur".
- Loading branch information
Showing
54 changed files
with
241 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
FROM scratch | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/busser/whisper | ||
LABEL org.opencontainers.image.source=https://github.com/busser/murmur | ||
|
||
# The binary is built beforehand. | ||
COPY whisper / | ||
COPY murmur / | ||
|
||
ENTRYPOINT ["/whisper"] | ||
ENTRYPOINT ["/murmur"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
FROM alpine | ||
|
||
COPY --from=ghcr.io/busser/whisper:latest /whisper /bin/whisper | ||
COPY --from=ghcr.io/busser/murmur:latest /murmur /bin/murmur | ||
|
||
ENTRYPOINT ["/bin/whisper", "exec", "--", "sh", "-c", "echo The secret sauce is $SECRET_SAUCE."] | ||
ENTRYPOINT ["/bin/murmur", "run", "--", "sh", "-c", "echo The secret sauce is $SECRET_SAUCE."] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# Example: Dockerfile | ||
|
||
This directory contains an example of using whisper inside a Dockerfile. | ||
This directory contains an example of using murmur inside a Dockerfile. | ||
|
||
To run the example: | ||
|
||
```bash | ||
docker build -t whisper-example . | ||
docker build -t murmur-example . | ||
docker run \ | ||
-e SECRET_SAUCE=passthrough:szechuan \ | ||
whisper-example | ||
murmur-example | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module github.com/busser/whisper | ||
module github.com/busser/murmur | ||
|
||
go 1.20 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package cmd | ||
|
||
import ( | ||
"os" | ||
|
||
"github.com/spf13/cobra" | ||
) | ||
|
||
func Execute() { | ||
if err := rootCmd().Execute(); err != nil { | ||
os.Exit(1) | ||
} | ||
} | ||
|
||
func rootCmd() *cobra.Command { | ||
cmd := &cobra.Command{ | ||
Use: "murmur", | ||
Short: "Murmur passes secrets as environment variables to a process", | ||
Long: `A plug-and-play shim that fetches secrets from a secure | ||
location and passes them to your application as environment variables.`, | ||
SilenceUsage: true, | ||
} | ||
|
||
cmd.AddCommand(runCmd()) | ||
|
||
return cmd | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package cmd | ||
|
||
import ( | ||
"os" | ||
|
||
"github.com/busser/murmur/internal/murmur" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func runCmd() *cobra.Command { | ||
cmd := &cobra.Command{ | ||
Use: "run", | ||
Short: "Run a command with secrets injected", | ||
Long: `Run any command with updated environment variables. Any variables containing | ||
a reference to an externally-stored secret will be overwritten with the secret's | ||
value. | ||
Examples: | ||
# Azure Key Vault | ||
export SECRET_SAUCE="azkv:example.vault.azure.net/secret-sauce" | ||
murmur run -- sh -c 'echo The secret sauce is $SECRET_SAUCE.'`, | ||
|
||
Args: cobra.MinimumNArgs(1), | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
exitCode, err := murmur.Run(args[0], args[1:]...) | ||
if err != nil { | ||
return err | ||
} | ||
os.Exit(exitCode) | ||
return nil | ||
}, | ||
} | ||
|
||
return cmd | ||
} |
Oops, something went wrong.