{"id":19301855,"url":"https://github.com/darkness4/just-encrypt-yaml","last_synced_at":"2026-06-18T17:31:14.998Z","repository":{"id":260719176,"uuid":"882135459","full_name":"Darkness4/just-encrypt-yaml","owner":"Darkness4","description":"Just encrypt string values in YAML with asymmetric PEM keys. For DIY gitops.","archived":false,"fork":false,"pushed_at":"2026-03-25T17:31:21.000Z","size":36,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-26T18:44:32.456Z","etag":null,"topics":["encryption","gitops","go","secrets","yaml"],"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/Darkness4.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-02T01:07:42.000Z","updated_at":"2025-11-21T02:53:22.000Z","dependencies_parsed_at":"2024-12-13T17:29:10.381Z","dependency_job_id":"3a3ef07f-ba4a-4504-8be0-0fc39d58e848","html_url":"https://github.com/Darkness4/just-encrypt-yaml","commit_stats":null,"previous_names":["darkness4/just-encrypt-yaml"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Darkness4/just-encrypt-yaml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Darkness4%2Fjust-encrypt-yaml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Darkness4%2Fjust-encrypt-yaml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Darkness4%2Fjust-encrypt-yaml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Darkness4%2Fjust-encrypt-yaml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Darkness4","download_url":"https://codeload.github.com/Darkness4/just-encrypt-yaml/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Darkness4%2Fjust-encrypt-yaml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34501471,"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-18T02:00:06.871Z","response_time":128,"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":["encryption","gitops","go","secrets","yaml"],"created_at":"2024-11-09T23:19:06.866Z","updated_at":"2026-06-18T17:31:14.978Z","avatar_url":"https://github.com/Darkness4.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# just-encrypt-yaml\n\nJust encrypt string values in YAML with asymmetric PEM keys. Needed for GitOps when we need to encrypt locally, and decrypt server-side.\n\nMade with standard library. Simple and as basic as possible.\n\n\u003e [!NOTE]\n\u003e\n\u003e Since this project only uses standard libraries, maintenance won't be very frequent (there is nothing to update besides dependencies), but it should work for a long time.\n\u003e\n\u003e Don't fear about the lack of commits, it's just because there is nothing to update!\n\n## Usage\n\n### Generate PEM keys\n\n```bash\nopenssl req -x509 -days 1825 -nodes -newkey rsa:4096 -keyout \"tls.key\" -out \"tls.crt\" -subj \"/CN=secret-controller/O=secret-controller\"\n```\n\n### Encrypt\n\n**secret.yaml**\n\n```yaml\nmySecret: \"mySecretValue\"\n\nwireguard:\n  wg0:\n    privateKey: \"myPrivateKey\"\n```\n\n**Execute:**\n\n```bash\njust-encrypt-yaml --key tls.crt  [--out secret-sealed.yaml] secret.yaml\n```\n\n**secret-sealed.yaml**\n\n```yaml\nmySecret: AgALQpFfOS5AF...\nwireguard:\n  wg0:\n     privateKey: AgBBuKY...\n```\n\n### Decrypt\n\n**secret-sealed.yaml**\n\n```yaml\nmySecret: AgALQpFfOS5AF...\nwireguard:\n  wg0:\n     privateKey: AgBBuKY...\n```\n\n**Execute:**\n\n```bash\njust-encrypt-yaml --decrypt --key tls.key [--out secret-sealed-decrypted.yaml] secret-sealed.yaml\n```\n\n**secret.yaml**\n\n```yaml\nmySecret: \"mySecretValue\"\n\nwireguard:\n  wg0:\n    privateKey: \"myPrivateKey\"\n```\n\n### Help\n\n```bash\nNAME:\n   just-encrypt-yaml - Encrypt or decrypt YAML files using RSA keys\n\nUSAGE:\n   just-encrypt-yaml [global options] command [command options] \u003cfile\u003e\n\nCOMMANDS:\n   help, h  Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --key value    Path to the private RSA key (for decryption) or certificate (for encryption)\n   --decrypt      Decrypt the YAML file (default: false)\n   --out value    Path to the output file\n   --help, -h     show help\n   --version, -v  print the version\n```\n\n## Usage with gomplate\n\n***config.boot.enc***\n\n```groovy\ninterfaces {\n    wireguard wg0 {\n        address \"10.0.0.1/24\"\n        address \"fd00:1234:5678::1/64\"\n        description \"Peer VPN\"\n        peer peer01 {\n            allowed-ips \"10.0.0.2/32\"\n            allowed-ips \"fd00:1234:5678::2/128\"\n            public-key \"gVO0f7i3UsdWWkLYOVzawcndBuKC6FggVLWtdkXoFWQ=\"\n        }\n        port \"51820\"\n        private-key \"{{ .wireguard.wg0.privateKey }}\"\n    }\n}\n```\n\n**secret-sealed.yaml**\n\n```yaml\nwireguard:\n  wg0:\n    privateKey: AgBBuKY...\n```\n\n**Execute:**\n\n```bash\njust-encrypt-yaml --decrypt --key tls.key --out secret.yaml secret-sealed.yaml\ngomplate -c \".=secret.yaml\" -f config.boot.enc -o config.boot\n```\n\n**config.boot**\n\n```groovy\ninterfaces {\n    wireguard wg0 {\n        address \"10.0.0.1/24\"\n        address \"fd00:1234:5678::1/64\"\n        description \"Peer VPN\"\n        peer peer01 {\n            allowed-ips \"10.0.0.2/32\"\n            allowed-ips \"fd00:1234:5678::2/128\"\n            public-key \"gVO0f7i3UsdWWkLYOVzawcndBuKC6FggVLWtdkXoFWQ=\"\n        }\n        port \"51820\"\n        private-key \"gJVybSkgiEJLNOUpz8nTfKGUpLXSy6OMvLqLkLIPOUk=\"\n    }\n}\n```\n\n## License\n\n```\nMIT License\n\nCopyright (c) 2024 Marc Nguyen\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkness4%2Fjust-encrypt-yaml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarkness4%2Fjust-encrypt-yaml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkness4%2Fjust-encrypt-yaml/lists"}