{"id":17241977,"url":"https://github.com/mtkennerly/exesexe","last_synced_at":"2025-10-09T05:35:51.352Z","repository":{"id":57427544,"uuid":"89890094","full_name":"mtkennerly/exesexe","owner":"mtkennerly","description":"Manipulate return codes from executables.","archived":false,"fork":false,"pushed_at":"2024-03-17T03:10:11.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-08T10:59:41.981Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/mtkennerly.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2017-05-01T01:58:28.000Z","updated_at":"2022-07-07T21:04:35.000Z","dependencies_parsed_at":"2024-12-03T22:41:45.488Z","dependency_job_id":"aecfc198-3142-4079-9075-7ec0d3b9270b","html_url":"https://github.com/mtkennerly/exesexe","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"ea51e869f26d35723ac3a105847476cc1dca3ac3"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mtkennerly/exesexe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtkennerly%2Fexesexe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtkennerly%2Fexesexe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtkennerly%2Fexesexe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtkennerly%2Fexesexe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtkennerly","download_url":"https://codeload.github.com/mtkennerly/exesexe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtkennerly%2Fexesexe/sbom","scorecard":{"id":666644,"data":{"date":"2025-08-11","repo":{"name":"github.com/mtkennerly/exesexe","commit":"de17ddf5f02dbe5957868fabbc9d75cd3373d945"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"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":"Code-Review","score":0,"reason":"Found 0/10 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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yaml: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":"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":"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":"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/main.yaml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/mtkennerly/exesexe/main.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yaml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/mtkennerly/exesexe/main.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yaml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/mtkennerly/exesexe/main.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yaml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/mtkennerly/exesexe/main.yaml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/main.yaml:16","Warn: pipCommand not pinned by hash: .github/workflows/main.yaml:37","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand 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":"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":"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":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.0.1 not signed: https://api.github.com/repos/mtkennerly/exesexe/releases/6238287","Warn: release artifact v1.0.0 not signed: https://api.github.com/repos/mtkennerly/exesexe/releases/6238230","Warn: release artifact v1.0.1 does not have provenance: https://api.github.com/repos/mtkennerly/exesexe/releases/6238287","Warn: release artifact v1.0.0 does not have provenance: https://api.github.com/repos/mtkennerly/exesexe/releases/6238230"],"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":"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":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf","Warn: Project is vulnerable to: GHSA-cx63-2mw6-8hw5","Warn: Project is vulnerable to: PYSEC-2024-187 / GHSA-rqc4-2hc7-8c8v","Warn: Project is vulnerable to: GHSA-jfmj-5v4g-7637"],"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-21T18:16:13.914Z","repository_id":57427544,"created_at":"2025-08-21T18:16:13.914Z","updated_at":"2025-08-21T18:16:13.914Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000741,"owners_count":26082932,"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-10-09T02:00:07.460Z","response_time":59,"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":[],"created_at":"2024-10-15T06:11:57.225Z","updated_at":"2025-10-09T05:35:51.330Z","avatar_url":"https://github.com/mtkennerly.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# exesexe\nInspired by programs that return 1 on success, exesexe lets you wrap a call\nto an executable and selectively override its return codes. This allows you,\nfor example, to use an aberrant installer with configuration management\nsoftware that expects programs to return 0 when successful.\n\nexesexe will use the first argument it receives as its own directive, but all\nother arguments will be executed without modification. The directive is a\ncomma-separated list, where each segment may have one of these forms:\n\n```\n1      whitelist 1 (convert to 0)\n-1=2   substitute -1 with 2\n5:8=9  substitute 5, 6, 7, and 8 with 9\n!1     blacklist 1 (don't convert 1 at all; convert everything else to 0)\n*=3    substitute all others with 3\n```\n\nExamples:\n  * `1,-1,2=3`\n    * Convert 1 and -1 to 0.\n    * Convert 2 to 3.\n\n  * `!2`\n    * Don't convert 2.\n    * Convert everything else to 0.\n\n  * `!-4=2`\n    * Don't convert -4.\n    * Convert everything else to 2.\n\n  * `*=10`\n    * Return 10 no matter what.\n\nThe precedence order is whitelists, specific substitutions, blacklists,\nthen *-substitutions, so `*=4,1=2,!3` would convert 1 to 2 rather than 4 or 0.\nThe lexical order only matters for overlapping segments, like `1=0,1=2`,\nwhere the rightmost segment overrides the left segments.\n\nSuppose you want to run the executable `foo`. You could issue any of these:\n\n```\nexesexe 1 foo         # return 0 if foo returns 1\nexesexe 3=4 foo       # return 4 if foo returns 3\nexesexe *=0 foo       # always return 0\nexesexe !2 foo        # return 0 if foo does not return 2\nexesexe !2,3=4 foo    # if foo returns 3, return 4;\n                      # else, if foo does not return 2, return 0;\n                      # else, pass back foo's real return code\n```\n\nYou can also use exesexe as a library:\n\n```python\nimport exesexe\nwhitelist, blacklist, substitutions = exesexe.parse_directive(\"1,!2,3=4\")\nexesexe.interpret(\n    \"foo --bar\",\n    whitelist=[1],\n    blacklist=[2],\n    substitutions={3: 4, \"*\": 1}\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtkennerly%2Fexesexe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtkennerly%2Fexesexe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtkennerly%2Fexesexe/lists"}