{"id":19341749,"url":"https://github.com/stephane-martin/vault-exec","last_synced_at":"2026-06-13T02:32:04.130Z","repository":{"id":57567467,"uuid":"171673041","full_name":"stephane-martin/vault-exec","owner":"stephane-martin","description":"Execute a command with environment variables set from Vault","archived":false,"fork":false,"pushed_at":"2019-07-31T21:02:20.000Z","size":3111,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-24T08:45:44.959Z","etag":null,"topics":["golang","unix","vault"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stephane-martin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-20T12:55:03.000Z","updated_at":"2024-03-22T00:22:21.000Z","dependencies_parsed_at":"2022-08-28T07:43:02.507Z","dependency_job_id":null,"html_url":"https://github.com/stephane-martin/vault-exec","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/stephane-martin/vault-exec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephane-martin%2Fvault-exec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephane-martin%2Fvault-exec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephane-martin%2Fvault-exec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephane-martin%2Fvault-exec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stephane-martin","download_url":"https://codeload.github.com/stephane-martin/vault-exec/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephane-martin%2Fvault-exec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34270414,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","unix","vault"],"created_at":"2024-11-10T03:32:21.614Z","updated_at":"2026-06-13T02:32:04.090Z","avatar_url":"https://github.com/stephane-martin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vault-exec\n\n`vault-exec` is a helper tool for Hashicorp's Vault. It is similar to `envconsul`: `vault-exec`\nreads some secrets from Vault, sets the corresponding environment variables, and executes\na command.\n\nDifferences from `envconsul`:\n\n- `vault-exec` can not read key/values from consul. Only from Vault.\n- `vault-exec` supports various Vault authentication schemes: token, userpass, approle, ldap.\n- by default `vault-exec` does not prefix environment variable keys with the secret keys.\n\nAfter authentication, `vault-exec` gets a token from Vault. `vault-exec` automatically renews\nthe token. When the token finally expires, the command is terminated and `vault-exec` stops.\n\nIf a secret read from Vault is renewable, `vault-exec` automatically renews the secret. When\na secret finally expires, `vault-exec` terminates the command, rereads the secrets from Vault,\nand then restarts the command.\n\nPlease note that Vault does not support \"watching\" a secret, contrary to consul. If you\nmodify a secret in Vault, `vault-exec` won't be aware of the change before the end of the\nexpiration period.\n\n# Compilation\n\n`vault-exec` is written in pure Go. It uses `dep` as a dependency manager. The dependencies\nare committed in git. There is provided `Makefile` to set the appropriate compilation options.\nSo do something like :\n\n```bash\nmkdir -p ~/go/src/github.com/stephane-martin\ncd ~/go/src/github.com/stephane-martin\ngit clone https://github.com/stephane-martin/vault-exec\ncd vault-exec\nmake release\n```\n\n# Installation\n\nFor Linux you van just grab the provided binary in the releases section. It is\ncompiled statically.\n\n# Usage\n\nsee `vault-exec --help`.\n\nMost options can be set through environment variable. In particular:\n- `VAULT_ADDR` can point to the HTTP address of the Vault server\n- `VAULT_TOKEN` can provide the Vault token for token based authentication.\n\nWhen using token based authentication, if VAULT_TOKEN is not set, and if the token\nis not provided as a command-line option, vault-exec will try to retrieve the token\nfrom `~/.vault-token`.\n\n# Example\n\n```\nexport VAULT_ADDR=http://127.0.0.1:8200\nexport VAULT_TOKEN=s.9rYhELGRJzWaCo3m3bV5eWJO\nvault-exec --secret secret/my env\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephane-martin%2Fvault-exec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephane-martin%2Fvault-exec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephane-martin%2Fvault-exec/lists"}