{"id":13553300,"url":"https://github.com/a7ul/undercover","last_synced_at":"2025-04-27T19:32:45.189Z","repository":{"id":48694405,"uuid":"365532549","full_name":"a7ul/undercover","owner":"a7ul","description":"Store your environment variables and secrets in git safely.","archived":false,"fork":false,"pushed_at":"2022-01-29T22:16:28.000Z","size":70,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T02:22:11.049Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/a7ul.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":"2021-05-08T14:18:23.000Z","updated_at":"2022-01-29T22:16:31.000Z","dependencies_parsed_at":"2022-09-14T12:51:45.809Z","dependency_job_id":null,"html_url":"https://github.com/a7ul/undercover","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a7ul%2Fundercover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a7ul%2Fundercover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a7ul%2Fundercover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a7ul%2Fundercover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a7ul","download_url":"https://codeload.github.com/a7ul/undercover/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251196138,"owners_count":21550909,"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","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":"2024-08-01T12:02:21.681Z","updated_at":"2025-04-27T19:32:44.948Z","avatar_url":"https://github.com/a7ul.png","language":"JavaScript","readme":"# 🕵️ Undercover\n\n\u003e ⚠️ This project is now deprecated. Please take a look at https://github.com/a7ul/secrets.mjs\n\nStore your environment variables and secrets in git safely.\n\nThis script is a single file pure nodejs script.\n\n## Quick use (no install)\n\n```\nnpx zx https://raw.githubusercontent.com/a7ul/undercover/main/undercover.mjs help\n```\n\n## Installation\n\nYou can use undercover by just copying it and commiting it in your repo.\n\n```\ncurl https://raw.githubusercontent.com/a7ul/undercover/main/undercover.mjs \u003e undercover.mjs\nnode ./undercover.mjs\n```\n\nor manually\n\n```\ncurl https://raw.githubusercontent.com/a7ul/undercover/main/undercover.mjs \u003e undercover.mjs\nchmod a+x ./undercover.mjs\n./undercover.mjs\n```\n\nIt is recommended you commit undercover.mjs with your repo, so its easier to run whenever you want to decrypt or encrypt secrets.\n\nFurther updates can be pulled by just doing:\n\n```sh\n./undercover.mjs update\n```\n\n## Features\n\n**Encrypt/Decrypt Env files**\n\nFirst class `.env` files support. Only the values are encrypted and keys are left in plain text.\nThis makes it easy to see changes in the git when changing something in the encrypted file.\n\n```sh\n ./undercover.mjs encrypt ./test.env\n```\n\n![envfiles](https://user-images.githubusercontent.com/4029423/117862198-acdbfe00-b292-11eb-93fe-1d91e1cce561.jpg)\n\n**Encrypt/Decrypt entire files**\n\nUseful for things like service accounts, ssh keys or any other file that is sensitive.\n\n```sh\n ./undercover.mjs encrypt ./secret.json\n```\n\n![entirefile](https://user-images.githubusercontent.com/4029423/117862994-8f5b6400-b293-11eb-9b31-5d7676814c9e.png)\n\n**Diff against encrypted file**\n\nDisplays the diff between the encrypted file and the decrypted file.\n\n```sh\n./undercover.mjs diff ./test.env.ecrypt\n```\n\n![diff](https://user-images.githubusercontent.com/4029423/117863116-b74ac780-b293-11eb-96fc-efba1b0a4b7a.png)\n\n## Requirements\n\n- Node v14 and above\n\n## Development\n\n- Run tests: `NODE_ENV=test node ./tests/run.mjs`\n\n## References\n\n- https://github.com/motdotla/dotenv/blob/master/lib/main.js\n- http://vancelucas.com/blog/stronger-encryption-and-decryption-in-node-js/\n- https://github.com/google/zx\n- https://www.sohamkamani.com/blog/javascript/making-a-node-js-test-runner/\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa7ul%2Fundercover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa7ul%2Fundercover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa7ul%2Fundercover/lists"}