{"id":28380682,"url":"https://github.com/0xsequence/go-cloudsecrets","last_synced_at":"2026-04-06T22:01:43.724Z","repository":{"id":223636764,"uuid":"758534832","full_name":"0xsequence/go-cloudsecrets","owner":"0xsequence","description":"Go pkg for hydrating struct secrets from Cloud secret managers","archived":false,"fork":false,"pushed_at":"2024-12-13T12:32:56.000Z","size":85,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-06-24T21:41:18.691Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xsequence.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-02-16T14:29:46.000Z","updated_at":"2024-12-13T12:31:40.000Z","dependencies_parsed_at":"2024-02-21T09:46:49.520Z","dependency_job_id":"5e36cc54-2ba7-4a9e-bda0-a2a9a07a5498","html_url":"https://github.com/0xsequence/go-cloudsecrets","commit_stats":null,"previous_names":["0xsequence/go-cloudsecrets"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/0xsequence/go-cloudsecrets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xsequence%2Fgo-cloudsecrets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xsequence%2Fgo-cloudsecrets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xsequence%2Fgo-cloudsecrets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xsequence%2Fgo-cloudsecrets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xsequence","download_url":"https://codeload.github.com/0xsequence/go-cloudsecrets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xsequence%2Fgo-cloudsecrets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271854475,"owners_count":24834453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"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":[],"created_at":"2025-05-30T03:09:03.590Z","updated_at":"2026-04-06T22:01:43.719Z","avatar_url":"https://github.com/0xsequence.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-cloudsecrets\n\nGo package for hydrating config secrets from Cloud secret providers:\n- [x] `gcp` — GCP Secret Manager\n- [x] `env` — Environment variables (configurable prefix)\n- [x] `nosecrets` — No provider (errors out on any `$SECRET:` value)\n\n```go\nprovider, _ := gcp.NewSecretsProvider(ctx)\ndefer provider.Close()\nerr := cloudsecrets.Hydrate(ctx, provider, \u0026cfg)\n```\n\nThe `Hydrate()` function recursively walks given `cfg` and replaces all fields matching `\"$SECRET:{key}\"` string format with a value fetched from the given provider.\n\nAll referenced secret keys are de-duplicated and fetched only once.\n\nThe `Hydrate()` function tries to replace all fields before returning any error(s). This means that the given struct might be partially hydrated.\n\n## Usage\n```go\nimport (\n\t\"github.com/0xsequence/go-cloudsecrets\"\n\t\"github.com/0xsequence/go-cloudsecrets/gcp\"\n)\n\nvar cfg = config.Config{\n\tDB: \u0026config.DB{\n\t\tDatabase: \"postgres\",\n\t\tHost:     \"localhost:5432\",\n\t\tUsername: \"sequence\",\n\t\tPassword: \"$SECRET:dbPassword\", // will be hydrated (replaced by value of \"dbPassword\" secret)\n\t},\n}\n\nfunc main() {\n\tctx := context.Background()\n\n\tprovider, err := gcp.NewSecretsProvider(ctx)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to create secrets provider: %v\", err)\n\t}\n\tdefer provider.Close()\n\n\terr = cloudsecrets.Hydrate(ctx, provider, \u0026cfg)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to hydrate config secrets: %v\", err)\n\t}\n\n\t// cfg.DB.Password now contains value of latest \"dbPassword\" GCP secret\n}\n```\n\n## License\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xsequence%2Fgo-cloudsecrets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xsequence%2Fgo-cloudsecrets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xsequence%2Fgo-cloudsecrets/lists"}