butlergroup/env_encryption_tool

GitHub: butlergroup/env_encryption_tool

一个基于 Rust 的 .env 文件加密解密工具,采用后量子加密算法保护应用环境变量在存储时的安全性。

Stars: 4 | Forks: 2

[crates.io](https://crates.io/crates/env_encryption_tool) [docs.rs](https://docs.rs/env_encryption_tool) [![](https://img.shields.io/badge/license-AGPL_3.0-blue.svg)](https://opensource.org/licenses/AGPL_3.0) [![CodeQL](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/246cd47097114225.svg)](https://github.com/butlergroup/env_encryption_tool/actions/workflows/github-code-scanning/codeql) [![Rust CI/单元测试](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/036810c3b0114227.svg)](https://github.com/butlergroup/env_encryption_tool/actions/workflows/rust.yml) [![Dependabot 更新](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/3cfad445ca114228.svg)](https://github.com/butlergroup/env_encryption_tool/actions/workflows/dependabot/dependabot-updates) [![miri](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/10966ad9c0114229.svg)](https://github.com/butlergroup/env_encryption_tool/actions/workflows/miri.yml) [![rust-clippy analyze](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/12bee0aa55114231.svg)](https://github.com/butlergroup/env_encryption_tool/actions/workflows/rust-clippy.yml) [![安全审计](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/9b122701ad114232.svg)](https://github.com/butlergroup/env_encryption_tool/actions/workflows/security.yml) [![OSV-Scanner](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/74828af52c114234.svg)](https://github.com/butlergroup/env_encryption_tool/actions/workflows/osv-scanner.yml) [![Snyk Security-Monitored](https://img.shields.io/badge/Snyk%20Security-Monitored-purple)](https://app.snyk.io/share/784f6fef-6aaf-47ed-81ba-99e05b854665) [![依赖状态](https://deps.rs/repo/github/butlergroup/env_encryption_tool/status.svg)](https://deps.rs/repo/github/butlergroup/env_encryption_tool) [![OpenSSF 最佳实践](https://www.bestpractices.dev/projects/10676/badge)](https://www.bestpractices.dev/projects/10676) [![Scorecard 供应链安全](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/ca6fa317f4114237.svg)](https://github.com/butlergroup/env_encryption_tool/actions/workflows/scorecard.yml) [![Microsoft Defender For Devops](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/a7cf4869ee114238.svg)](https://github.com/butlergroup/env_encryption_tool/actions/workflows/defender-for-devops.yml) [![覆盖率状态](https://coveralls.io/repos/github/butlergroup/env_encryption_tool/badge.svg?branch=main)](https://coveralls.io/github/butlergroup/env_encryption_tool?branch=main) [![功能请求](https://img.shields.io/github/issues/butlergroup/env_encryption_tool/feature-request.svg)](https://github.com/butlergroup/env_encryption_tool/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement) [![Bugs](https://img.shields.io/github/issues/butlergroup/env_encryption_tool/bug.svg)](https://github.com/butlergroup/env_encryption_tool/issues?utf8=✓&q=is%3Aissue+is%3Aopen+label%3Abug) ## env_encryption_tool :copyright: 项目目标与信息 **目的**:该项目的目标是为指定的 Rust 应用程序加密 `.env` 文件并将其以加密状态存储,然后在运行时使用基于操作系统的环境变量对其进行解密,并将其传递给应用程序。这要求任何潜在/非法的攻击者必须首先突破操作系统的安全防御并访问其环境变量,才能有机会窃取应用程序级别的环境变量。 **现使用 PQ (后量子) 加密算法** :nail_care: *免责声明*:本项目已稳定并可用于生产环境,但在我们发布 v1.0 版本和/或获得赞助之前,将不提供基于 SLA 的支持。 :bowtie: ## 安装说明 1. [安装 Rust](https://rustup.rs/) :earth_americas: 2. 克隆/fork `env_encryption_tool` 仓库 :zap: 3. 设置一个名为 "DECRYPTION_KEY" 的操作系统级环境变量( :earth_americas: [适用于 Linux](https://stackoverflow.com/questions/45502996/how-to-set-environment-variable-in-linux-permanently), :earth_africa: [适用于 Windows](https://phoenixnap.com/kb/windows-set-environment-variable), :earth_asia: [适用于 MacOS](https://stackoverflow.com/questions/65597552/how-exactly-to-set-up-and-use-environment-variables-on-a-mac)),将其设为您想要的 32 字节/字符的值 :lock: 4. 运行 "cargo build --release" - 这将在 `target/release` 文件夹中输出一个二进制文件 :sparkles: 5. 在与您的 `.env` 文件相同的文件夹中运行该二进制文件 - 这将输出一个 `env.enc` 文件 :confetti_ball: 6. 将包含的 `decrypt_config.rs` 文件及其相关 crates 集成到您的 Rust 项目中 :star: 7. 将 `env.enc` 文件复制到您的 Rust 二进制文件运行的同一文件夹中,大功告成!您的应用程序在运行时即可获得加密的环境变量。 :tada: ## 许可证 `env_encryption_tool` 采用 AGPL-3.0 许可证授权,只要源代码保持开源,即可免费使用、修改和分发。**在未公开源代码的情况下使用本软件的修改版本不符合 AGPL-3.0 许可证的规定。** ## 服务条款 在使用我们的软件之前,请阅读我们的[服务条款](https://github.com/butlergroup/env_encryption_tool/blob/main/terms-of-service.md)。违反这些条款的用户将不会获得社区或贡献者的支持。 ## 隐私政策 请同时阅读我们的[隐私政策](https://github.com/butlergroup/env_encryption_tool/blob/main/privacy-policy.md),以了解我们如何处理您的个人信息。 ## 联系方式 有任何问题或建议?请通过 dev@butlergroup.net 联系我们。感谢您,祝您编码愉快! :) ## Star 历史 [![Star 历史图表](https://api.star-history.com/svg?repos=butlergroup/env_encryption_tool&type=Date)](https://www.star-history.com/#butlergroup/env_encryption_tool&Date)
标签:Crates.io, DevSecOps, dotenv, .env文件管理, Rust, StruQ, 上游代理, 加密解密工具, 可视化界面, 后量子密码学, 子域名变形, 敏感信息存储, 文件加密, 环境变量保护, 网络安全, 网络流量审计, 跨平台安全工具, 通知系统, 隐私保护