openfix-cli 0.0.0-stage → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Markus Weldon
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,28 @@
1
- # Temporary Holding Version
1
+ # openfix-cli
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ **Turn scanner findings into verified fixes, with any model, under your policy.**
4
+
5
+ OpenFix reads the reports your scanners already write (Semgrep, CodeQL, Snyk, Trivy, OSV-Scanner, Gitleaks,
6
+ Dependabot or any SARIF), has the model you choose patch each finding in a throwaway checkout, then checks the
7
+ patch without trusting the model. A fix only counts when the scanner, your tests and a new regression test all
8
+ agree, and every fix ships with a signed receipt.
9
+
10
+ ```bash
11
+ npx openfix-cli plan semgrep.sarif # what your policy will do with each finding; no model calls
12
+ npx openfix-cli fix semgrep.sarif # fix, verify, and write receipts
13
+ ```
14
+
15
+ OpenFix itself is a Python tool, published on PyPI as [`openfix-cli`](https://pypi.org/project/openfix-cli/).
16
+ This npm package is a launcher with the same name as the Python package: it runs it through [`uvx`](https://docs.astral.sh/uv/) (or `pipx` if you don't have
17
+ uv), so you need one of those installed. Python users can skip it:
18
+
19
+ ```bash
20
+ pip install "openfix-cli[all]"
21
+ ```
22
+
23
+ Set `OPENFIX_SPEC` to pin a version, for example `OPENFIX_SPEC="openfix-cli[all]==0.4.0"`.
24
+
25
+ - Site: <https://openfix.dev>
26
+ - Docs and source: <https://github.com/markusweldon/openfix>
27
+
28
+ MIT licensed.
package/bin/openfix.js ADDED
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env node
2
+ // Runs the OpenFix CLI, which is a Python package (openfix-cli on PyPI), through uvx or pipx.
3
+ // Every argument is passed through unchanged, and the exit code is OpenFix's.
4
+ import { spawn, spawnSync } from "node:child_process";
5
+
6
+ const SPEC = process.env.OPENFIX_SPEC || "openfix-cli[all]";
7
+ const args = process.argv.slice(2);
8
+
9
+ const has = (cmd) => spawnSync(cmd, ["--version"], { stdio: "ignore", shell: process.platform === "win32" }).status === 0;
10
+
11
+ let cmd;
12
+ let cmdArgs;
13
+ if (has("uvx")) {
14
+ cmd = "uvx";
15
+ cmdArgs = ["--from", SPEC, "openfix", ...args];
16
+ } else if (has("pipx")) {
17
+ cmd = "pipx";
18
+ cmdArgs = ["run", "--spec", SPEC, "openfix", ...args];
19
+ } else {
20
+ process.stderr.write(
21
+ [
22
+ "openfix: OpenFix is a Python tool, and this launcher needs uv or pipx to run it.",
23
+ "",
24
+ " Install uv: https://docs.astral.sh/uv/getting-started/installation/",
25
+ ' Or use pip: pip install "openfix-cli[all]" (then run `openfix` directly)',
26
+ "",
27
+ "Docs: https://github.com/markusweldon/openfix",
28
+ "",
29
+ ].join("\n"),
30
+ );
31
+ process.exit(127);
32
+ }
33
+
34
+ const child = spawn(cmd, cmdArgs, { stdio: "inherit", shell: process.platform === "win32" });
35
+ for (const sig of ["SIGINT", "SIGTERM", "SIGHUP"]) {
36
+ process.on(sig, () => child.kill(sig));
37
+ }
38
+ child.on("error", (err) => {
39
+ process.stderr.write(`openfix: could not start ${cmd}: ${err.message}\n`);
40
+ process.exit(127);
41
+ });
42
+ child.on("exit", (code, signal) => {
43
+ if (signal) process.kill(process.pid, signal);
44
+ else process.exit(code ?? 1);
45
+ });
package/package.json CHANGED
@@ -1,6 +1,37 @@
1
1
  {
2
2
  "name": "openfix-cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.4.0",
4
+ "description": "Turn scanner findings into verified fixes, with any model, under your policy. Runs the OpenFix CLI through uvx or pipx.",
5
+ "keywords": [
6
+ "security",
7
+ "remediation",
8
+ "sarif",
9
+ "appsec",
10
+ "autofix",
11
+ "semgrep",
12
+ "snyk",
13
+ "codeql",
14
+ "llm"
15
+ ],
16
+ "homepage": "https://openfix.dev",
17
+ "bugs": "https://github.com/markusweldon/openfix/issues",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/markusweldon/openfix.git",
21
+ "directory": "packaging/npm"
22
+ },
23
+ "license": "MIT",
24
+ "author": "Markus Weldon",
25
+ "type": "module",
26
+ "bin": {
27
+ "openfix": "bin/openfix.js"
28
+ },
29
+ "files": [
30
+ "bin/",
31
+ "README.md",
32
+ "LICENSE"
33
+ ],
34
+ "engines": {
35
+ "node": ">=18"
36
+ }
37
+ }