Lines 392-436javascript
395 const id = requireId(args[1]);
396 await client.postJson(`/v1/admin/keys/${id}/revoke`);
397 console.log(`Revoked key ${id}.`);
401 throw new Error(`Unknown keys subcommand: ${sub}`);
404function requireId(id) {
405 if (!id || id.startsWith("--")) throw new Error("a key id is required");
410import { deployProfileChecks as deployProfileChecks2, PROVIDER_REGISTRY } from "@modelgov/policy-engine";
411import { copyFileSync, existsSync as existsSync2, readFileSync as readFileSync3, unlinkSync } from "fs";
412import { basename, resolve as resolve2 } from "path";
413import { spawn as spawn2 } from "child_process";
414import { parse as parseYaml } from "yaml";
417import { spawn } from "child_process";
418var DEFAULT_CONSOLE_PORT = 5174;
419function buildAutoconnectConsoleUrl(apiUrl, apiKey, consolePort = DEFAULT_CONSOLE_PORT) {
420 const params = new URLSearchParams({ url: apiUrl, token: apiKey });
421 return `http://localhost:${consolePort}/login?${params.toString()}`;
423function browserOpenCommand(platform, url) {
424 if (platform === "darwin") return { cmd: "open", args: [url] };
425 if (platform === "win32") return { cmd: "cmd", args: ["/c", "start", "", url] };
426 return { cmd: "xdg-open", args: [url] };
428function maybeOpenBrowser(url) {
429 if (process.env.CI || process.env.MODELGOV_NO_OPEN || !process.stdout.isTTY) return false;
430 try {
HighSame File Env Network Execution
A single source file combines environment access, network access, and code or shell execution; review context before blocking.
dist/index.jsView on unpkg · L416 HighCommand Output Exfiltration
Source combines command execution, command-output handling, and outbound requests; review data flow before blocking.
dist/index.jsView on unpkg · L416 431 const { cmd, args } = browserOpenCommand(process.platform, url);
432 const child = spawn(cmd, args, { stdio: "ignore", detached: true });
433 child.on("error", () => {