{"id":19177748,"url":"https://github.com/jessety/encrypted-env","last_synced_at":"2025-08-29T16:18:53.876Z","repository":{"id":41048799,"uuid":"345222593","full_name":"jessety/encrypted-env","owner":"jessety","description":"Encrypt and decrypt env config files quickly and easily","archived":false,"fork":false,"pushed_at":"2024-02-15T01:39:01.000Z","size":55,"stargazers_count":6,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-28T18:22:27.725Z","etag":null,"topics":["encrypted","env","env-encrypted","env-encryption","env-secrets","environment-variables"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/encrypted-env","language":"TypeScript","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/jessety.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":"2021-03-07T00:09:12.000Z","updated_at":"2025-04-21T10:18:32.000Z","dependencies_parsed_at":"2025-05-07T20:41:41.300Z","dependency_job_id":"045c42cc-0fb3-41ae-a907-b2f2945dce8c","html_url":"https://github.com/jessety/encrypted-env","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":"jessety/boilerplate-typescript-package","purl":"pkg:github/jessety/encrypted-env","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessety%2Fencrypted-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessety%2Fencrypted-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessety%2Fencrypted-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessety%2Fencrypted-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jessety","download_url":"https://codeload.github.com/jessety/encrypted-env/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessety%2Fencrypted-env/sbom","scorecard":{"id":516629,"data":{"date":"2025-08-11","repo":{"name":"github.com/jessety/encrypted-env","commit":"086c686c418fa57ebf90090e1e006fa2100b6d53"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/encrypted-env/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/encrypted-env/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/encrypted-env/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/encrypted-env/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/encrypted-env/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/encrypted-env/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/encrypted-env/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/encrypted-env/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/encrypted-env/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/encrypted-env/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/encrypted-env/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/encrypted-env/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/encrypted-env/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/encrypted-env/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/encrypted-env/release.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:18","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:34","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:55","Warn: npmCommand not pinned by hash: .github/workflows/publish.yml:22","Warn: npmCommand not pinned by hash: .github/workflows/publish.yml:40","Warn: npmCommand not pinned by hash: .github/workflows/publish.yml:64","Info:   0 out of  15 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   6 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T01:59:03.902Z","repository_id":41048799,"created_at":"2025-08-20T01:59:03.903Z","updated_at":"2025-08-20T01:59:03.903Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272709326,"owners_count":24980336,"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-29T02:00:10.610Z","response_time":87,"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":["encrypted","env","env-encrypted","env-encryption","env-secrets","environment-variables"],"created_at":"2024-11-09T10:34:56.827Z","updated_at":"2025-08-29T16:18:53.844Z","avatar_url":"https://github.com/jessety.png","language":"TypeScript","readme":"# encrypted-env\n\n[![ci](https://github.com/jessety/encrypted-env/workflows/ci/badge.svg)](https://github.com/jessety/encrypted-env/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/npm/v/encrypted-env.svg)](https://www.npmjs.com/package/encrypted-env)\n[![license](https://img.shields.io/github/license/jessety/encrypted-env.svg)](https://github.com/jessety/encrypted-env/blob/main/LICENSE)\n\n`encrypted-env` is designed to make encrypting and decrypting sensitive `.env` files a breeze. It's supports using different configuration files for different environments (e.g. `development`, `staging`, and `production`) with different encryption keys for each, and can detect which to load based on existing environmental variavbles.\n\n## Installation\n\n```bash\nnpm install encrypted-env\n```\n\n## Encrypting / Decrypting\n\nThis package provides two commands, `env-encrypt` and `env-decrypt`. To encrypt your `.env` file, run `npx env-encrypt`. If encrypting for the first time, the user will be prompted to enter in a 32-character key. The key is then stored for future encryption / decryption.\n\n## Multiple Environments\n\nCreate a `.env-encrypted.config.json` configuration file in the root of your project that maps environment names to the filename of the configuration file to use.\n\n```json\n{\n  \"development\": \".env.dev\",\n  \"staging\": \".env.staging\",\n  \"production\": \".env.prod\"\n}\n```\n\nOnce defined, you can encrypt and decrypt configuration files for each environment by appending the environment name to the command:\n\n```bash\nnpx env-encrypt staging\n```\n\nThis may also be used in the `scripts` section of your `package.json` file:\n\n```json\n{\n  \"name\": \"project-name\",\n  \"scripts\": {\n    \"encrypt:staging\": \"env-encrypt staging\",\n    \"decrypt:staging\": \"env-decrypt staging\"\n  }\n}\n```\n\n## CI\n\nTo enable dynamic decryption in CI, set a secret in the repository and inject it into the process ENV for decryption.\n\nFor example, here's a GitHub Actions job that decrypts the env files for a project prior to running integration tests that require them:\n\n```yaml\n  integration-test:\n    runs-on: ubuntu-latest\n    timeout-minutes: 5\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v2\n\n      - name: Setup Node\n        uses: actions/setup-node@v2\n        with:\n          node-version: 14.x\n\n      - name: Install dependencies\n        run: npm install\n\n      - name: Decrypt env\n        run: npx env-decrypt\n        env:\n          ENV_KEY: ${{ secrets.ENV_KEY }}\n          CI: true\n\n      - name: Run integration tests\n        run: npm run test:integration\n```\n\n## Loading configuration in runtime\n\nTo load environmental variables into your project:\n\n```typescript\nimport loadENV from 'encrypted-env';\n\nconst env = loadENV();\n```\n\nIf you have multiple environments defined, it will load the config file that corresponds to the environment set in the `NODE_ENV` or `ENVIRONMENT` variable.\n\nFor example, if the `NODE_ENV` process env is set to `development` and the `.env-encrypted.config.json` file looks like this:\n\n```json\n{\n  \"development\": \".env.dev\",\n  \"staging\": \".env.staging\",\n  \"production\": \".env.prod\"\n}\n```\n\nThen it will attempt to parse and load `.env.dev`. If it cannot find `.env.dev`, it will fail with an error prompting the user to run `npx env-decrypt development`- which will attempt to create `.env.dev` from `.env.dev.encrypted`.\n\n## Version Control\n\nMake sure to add these lines to your `.gitignore` file:\n\n```text\n**/*.env\n**/*.key\n```\n\nThis way, only the encrypted `.env` files will be pushed to version control.\n\n## License\n\nMIT © Jesse Youngblood\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessety%2Fencrypted-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjessety%2Fencrypted-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessety%2Fencrypted-env/lists"}