mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Add uvx as a supported package manager so that `uvx` commands are routed through safe-chain's MITM proxy for malware detection, just like `uv`. Previously, `uvx` bypassed all safe-chain protections. The uvx package manager reuses the existing uv command runner since uvx is functionally equivalent to `uv tool run`. Fixes #268 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
14 lines
600 B
JavaScript
14 lines
600 B
JavaScript
import { test } from "node:test";
|
|
import assert from "node:assert";
|
|
import { createUvxPackageManager } from "./createUvxPackageManager.js";
|
|
|
|
test("createUvxPackageManager returns valid package manager interface", () => {
|
|
const pm = createUvxPackageManager();
|
|
|
|
assert.ok(pm);
|
|
assert.strictEqual(typeof pm.runCommand, "function");
|
|
assert.strictEqual(typeof pm.isSupportedCommand, "function");
|
|
assert.strictEqual(typeof pm.getDependencyUpdatesForCommand, "function");
|
|
assert.strictEqual(pm.isSupportedCommand(), false);
|
|
assert.deepStrictEqual(pm.getDependencyUpdatesForCommand(), []);
|
|
});
|