{"id":13788628,"url":"https://github.com/i80and/pledge-rs","last_synced_at":"2025-11-11T23:34:40.534Z","repository":{"id":57656296,"uuid":"67357057","full_name":"i80and/pledge-rs","owner":"i80and","description":"A Rust binding to OpenBSD's pledge(2) interface","archived":false,"fork":false,"pushed_at":"2022-09-18T20:28:24.000Z","size":117,"stargazers_count":27,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-30T06:22:43.299Z","etag":null,"topics":["openbsd-pledge","rust-bindings"],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/i80and.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":"2016-09-04T16:50:38.000Z","updated_at":"2025-07-14T08:53:15.000Z","dependencies_parsed_at":"2022-08-26T05:11:36.302Z","dependency_job_id":null,"html_url":"https://github.com/i80and/pledge-rs","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/i80and/pledge-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i80and%2Fpledge-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i80and%2Fpledge-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i80and%2Fpledge-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i80and%2Fpledge-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/i80and","download_url":"https://codeload.github.com/i80and/pledge-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i80and%2Fpledge-rs/sbom","scorecard":{"id":476450,"data":{"date":"2025-08-11","repo":{"name":"github.com/i80and/pledge-rs","commit":"07f32e3f0b448b712afefe3ddf1b6a195d5ae85c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"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":"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":"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":"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":"Code-Review","score":1,"reason":"Found 4/21 approved changesets -- score normalized to 1","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":"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/rust.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/i80and/pledge-rs/rust.yml/master?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/rust.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":"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":"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":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"22 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: RUSTSEC-2022-0078 / GHSA-f85w-wvc7-crwc","Warn: Project is vulnerable to: RUSTSEC-2023-0034 / GHSA-f8vr-r385-rh5r","Warn: Project is vulnerable to: RUSTSEC-2024-0003 / GHSA-8r5v-vm4m-4g25","Warn: Project is vulnerable to: RUSTSEC-2024-0332 / GHSA-q6cp-qfwq-4gcv","Warn: Project is vulnerable to: RUSTSEC-2024-0421 / GHSA-h97m-ww89-6jmq","Warn: Project is vulnerable to: RUSTSEC-2024-0384","Warn: Project is vulnerable to: RUSTSEC-2024-0019 / GHSA-r8w9-5wcg-vfj7","Warn: Project is vulnerable to: RUSTSEC-2023-0022 / GHSA-3gxf-9r58-2ghg","Warn: Project is vulnerable to: RUSTSEC-2023-0024 / GHSA-6hcf-g6gr-hhcr","Warn: Project is vulnerable to: RUSTSEC-2023-0023 / GHSA-9qwg-crg9-m2vc","Warn: Project is vulnerable to: RUSTSEC-2023-0044 / GHSA-xcf7-rvmh-g6q4","Warn: Project is vulnerable to: RUSTSEC-2023-0072 / GHSA-xphf-cx8h-7q9g","Warn: Project is vulnerable to: GHSA-q445-7m23-qrmw","Warn: Project is vulnerable to: RUSTSEC-2024-0357","Warn: Project is vulnerable to: RUSTSEC-2025-0004 / GHSA-rpmj-rpgj-qmpm","Warn: Project is vulnerable to: GHSA-4fcv-w3qc-ppgg","Warn: Project is vulnerable to: RUSTSEC-2025-0022","Warn: Project is vulnerable to: RUSTSEC-2023-0018 / GHSA-mc8h-8q98-g5hr","Warn: Project is vulnerable to: RUSTSEC-2023-0001 / GHSA-7rrj-xr53-82p7","Warn: Project is vulnerable to: RUSTSEC-2023-0005 / GHSA-4q83-7cq4-p6wg","Warn: Project is vulnerable to: GHSA-rr8g-9fpq-6wmg","Warn: Project is vulnerable to: RUSTSEC-2025-0023"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T15:25:20.836Z","repository_id":57656296,"created_at":"2025-08-19T15:25:20.836Z","updated_at":"2025-08-19T15:25:20.836Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":283950015,"owners_count":26921648,"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-11-11T02:00:06.610Z","response_time":65,"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":["openbsd-pledge","rust-bindings"],"created_at":"2024-08-03T21:00:51.185Z","updated_at":"2025-11-11T23:34:40.514Z","avatar_url":"https://github.com/i80and.png","language":"Rust","readme":"# pledge-rs\n\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n[![crates.io](http://meritbadge.herokuapp.com/pledge)](https://crates.io/crates/pledge)\n\nA Rust binding to OpenBSD's pledge(2) interface.\n\n## Usage\n\n    /* Rust 2015 only */ #[macro_use] extern crate pledge;\n    /* Rust 2018 only */ use pledge::{pledge, pledge_promises, pledge_execpromises};\n\n    fn foo() {\n        // make both promises and execpromises\n        pledge![Stdio Proc Exec, Stdio Tty].unwrap();\n\n        // make promises only\n        pledge_promises![Stdio Exec].unwrap();\n\n        // make execpromises only\n        pledge_execpromises![Stdio].unwrap();\n    }\n\nThis is roughly equivalent to:\n\n    /* Rust 2015 only */ extern crate pledge;\n    use pledge::{pledge, Promise, ToPromiseString};\n\n    fn foo() {\n        // make both promises and execpromises\n        let promises = vec![Promise::Stdio, Promise::Proc, Promise::Exec];\n        let execpromises = vec![Promise::Stdio, Promise::Tty];\n        pledge(\u0026*promises.to_promise_string(), \u0026*execpromises.to_promise_string()).unwrap();\n\n        // make promises only\n        let promises = vec![Promise::Stdio, Promise::Exec];\n        pledge(\u0026*promises.to_promise_string(), None).unwrap();\n\n        // make execpromises only\n        let execpromises = vec![Promise::Stdio];\n        pledge(None, \u0026*execpromises.to_promise_string()).unwrap();\n    }\n\nYou may also provide promises directly as a string:\n\n    /* Rust 2015 only */ extern crate pledge;\n    use pledge::pledge;\n\n    fn foo() {\n        // make both promises and execpromises\n        pledge(\"stdio proc exec\", \"stdio tty\").unwrap();\n\n        // make promises only\n        pledge(\"stdio exec\", None).unwrap();\n\n        // make execpromises only\n        pledge(None, \"stdio\").unwrap();\n    }\n\nAll of these will yield `pledge::Error::UnsupportedPlatform` on platforms that\ndon’t support pledge(2). You can use `pledge::Error::ignore_platform` to ignore\nthat variant and make your program portable to those platforms:\n\n    /* Rust 2015 only */ extern crate pledge;\n    /* Rust 2018 only */ use pledge::pledge_promises;\n\n    fn foo() {\n        ...\n\n        pledge_promises![Stdio Exec]\n            .or_else(pledge::Error::ignore_platform)\n            .unwrap();\n\n        ...\n    }\n\n## Compatibility\n\nThis version of the crate is compatible with the [OpenBSD 6.3+ interface], where\nthe second parameter restricts the privileges of the process after execve(2),\nand guaranteed to be compatible with Rust 1.24.0+ (as shipped by OpenBSD 6.3).\n\nUse version `^0.3` for the [OpenBSD 5.9+ interface] last supported by [Bitrig],\nwhere the second parameter sets a whitelist of permitted paths.\n\nTo migrate your code from older versions:\n\n* change `pledge![P, Q, R]` call sites to `pledge_promises![P Q R]`\n* change `pledge(\"p q r\")` call sites to `pledge(\"p q r\", None)`\n* change `pledge_with_paths(promises, paths)` to `pledge(promises)`\n* update usage of renamed `Promise` variants (e.g. `MCast` → `Mcast`)\n* consider making execpromises to restrict processes after execve(2)\n* consider using [unveil(2)] and the [unveil crate] (OpenBSD 6.4+)\n\n[OpenBSD 6.3+ interface]: https://man.openbsd.org/OpenBSD-6.3/pledge.2\n[OpenBSD 5.9+ interface]: https://man.openbsd.org/OpenBSD-5.9/pledge.2\n[Bitrig]: https://www.bitrig.org\n[unveil(2)]: https://man.openbsd.org/OpenBSD-6.4/unveil.2\n[unveil crate]: https://crates.io/crates/unveil\n","funding_links":[],"categories":["Libraries"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi80and%2Fpledge-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fi80and%2Fpledge-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi80and%2Fpledge-rs/lists"}