{"id":13672291,"url":"https://github.com/1Password/electron-hardener","last_synced_at":"2025-04-27T21:32:35.955Z","repository":{"id":46855213,"uuid":"360949257","full_name":"1Password/electron-hardener","owner":"1Password","description":"A fast and small Rust library to make Electron apps more secure.","archived":false,"fork":false,"pushed_at":"2024-08-30T15:56:31.000Z","size":42,"stargazers_count":387,"open_issues_count":1,"forks_count":16,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-04-24T05:03:10.462Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1Password.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","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}},"created_at":"2021-04-23T16:47:24.000Z","updated_at":"2025-04-04T02:26:54.000Z","dependencies_parsed_at":"2024-12-11T20:01:14.390Z","dependency_job_id":null,"html_url":"https://github.com/1Password/electron-hardener","commit_stats":{"total_commits":9,"total_committers":3,"mean_commits":3.0,"dds":0.2222222222222222,"last_synced_commit":"52deabd307186cbae10f04c8bd4467a9543b4787"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1Password%2Felectron-hardener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1Password%2Felectron-hardener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1Password%2Felectron-hardener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1Password%2Felectron-hardener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1Password","download_url":"https://codeload.github.com/1Password/electron-hardener/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251212593,"owners_count":21553483,"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-02T09:01:31.514Z","updated_at":"2025-04-27T21:32:35.711Z","avatar_url":"https://github.com/1Password.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# electron-hardener\r\n\r\n[![crates.io version](https://img.shields.io/crates/v/electron-hardener.svg)](https://crates.io/crates/electron-hardener)\r\n[![crate documentation](https://docs.rs/electron-hardener/badge.svg)](https://docs.rs/electron-hardener)\r\n![MSRV](https://img.shields.io/badge/rustc-1.46+-blue.svg)\r\n[![crates.io downloads](https://img.shields.io/crates/d/electron-hardener.svg)](https://crates.io/crates/electron-hardener)\r\n![CI](https://github.com/1Password/electron-hardener/workflows/CI/badge.svg)\r\n\r\n\r\nA Rust library and command line tool to harden Electron binaries against runtime behavior modifications.\r\n\r\nThis provides a way to harden Electron applications against a specific class of runtime behavior\r\nmodification. Specifically, if an unprivileged process can't write to the application's binary file or process\r\naddress space, it should not be able to change what an app does at runtime.\r\n\r\nThe library provides two sets of functionality:\r\n - An interface to view and modify the status of fuses in an application, similar to the [official fuses package](https://github.com/electron/fuses).\r\n - A fast and configurable alternative implementation of the [electron-evil-feature-patcher](https://github.com/antelle/electron-evil-feature-patcher) tool created by [Dimitri Witkowski].\r\nAll patches it can perform are also exposed in this crate. See its README for more details on how it works.\r\n\r\n## Usage\r\n\r\n### Library\r\nThe library exposes a simple and configurable interface:\r\n```rust\r\nuse electron_hardener::{ElectronApp, Fuse, NodeJsCommandLineFlag};\r\n\r\nlet mut app = ElectronApp::from_bytes(\u0026mut application_bytes)?;\r\n\r\napp.set_fuse_status(Fuse::RunAsNode, false)?;\r\n\r\napp.patch_option(NodeJsCommandLineFlag::Inspect)?;\r\n```\r\n\r\nCheck out the [command line tool](./src/bin/main.rs)'s source or the [example](./examples/usage.rs) to see more ways to use it.\r\n\r\n### Command line tool\r\n\r\nThe command line tool exposes the same functionality and interface as `electron-evil-feature-patcher`:\r\n```bash\r\nelectron-hardener ./path/to/packaged/electron/app\r\n```\r\n\r\n## Install\r\n### Library\r\nIn your project's `Cargo.toml` file:\r\n```toml\r\nelectron_hardener = \"0.2.2\"\r\n```\r\n\r\n### Command line tool\r\nMake sure you have a [Rust compiler](https://rustup.rs/) installed and then run\r\n```bash\r\ncargo install electron-hardener\r\n```\r\n\r\n## Electron compatibility\r\n`electron-harder` tracks the latest stable version of Electron. Functionality is currently tested on a minimum version of Electron 15. Older versions may partially work but this is not guaranteed.\r\n\r\n## MSRV\r\n\r\nThe Minimum Supported Rust Version is currently 1.46.0. This will be bumped to the latest stable version of Rust when needed.\r\n\r\n## Credits\r\nMade with ❤️ by the [1Password](https://1password.com/) team, with full credits to [Dimitri Witkowski] for taking the time and effort to discover the command line flags that can be disabled, and finally creating the original tool which served as inspiration for this project.\r\n\r\n#### License\r\n\r\n\u003csup\u003e\r\nLicensed under either of \u003ca href=\"LICENSE-APACHE\"\u003eApache License, Version\r\n2.0\u003c/a\u003e or \u003ca href=\"LICENSE-MIT\"\u003eMIT license\u003c/a\u003e at your option.\r\n\u003c/sup\u003e\r\n\r\n\u003cbr\u003e\r\n\r\n\u003csub\u003e\r\nUnless you explicitly state otherwise, any contribution intentionally submitted\r\nfor inclusion in this crate by you, as defined in the Apache-2.0 license, shall\r\nbe dual licensed as above, without any additional terms or conditions.\r\n\u003c/sub\u003e\r\n\r\n[Dimitri Witkowski]: https://github.com/antelle\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1Password%2Felectron-hardener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1Password%2Felectron-hardener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1Password%2Felectron-hardener/lists"}