@cantinasecurity/apex-cli 0.1.21 → 0.1.22
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/.claude/skills/apex-cli/SKILL.md +1 -1
- package/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.mcp.claude.json +1 -1
- package/.mcp.codex.json +1 -1
- package/MARKETPLACE.md +1 -1
- package/README.md +18 -10
- package/dist/mcp.js +1 -1
- package/dist/setup.js +4 -3
- package/package.json +1 -1
- package/skills/apex-cli/SKILL.md +1 -1
|
@@ -70,7 +70,7 @@ If the Apex MCP server is not configured, fall back to the local CLI:
|
|
|
70
70
|
- Use `sourceMode: "remote"` only when the user explicitly wants to forbid local snapshot fallbacks.
|
|
71
71
|
- When checking a scan that is not the workspace binding's latest scan, pass `scanId` to `apex-status`; use `apex scans` or `apex-scans` first if you need to discover scan IDs.
|
|
72
72
|
- Use `apex-workspace-findings` when the user asks for findings across a workspace instead of one scan. Pass `filters: ["status:open"]` for all open findings; supported filter facets are `severity`, `scan`, `status`, `validation`, and `visibility`, and a leading `!` negates a filter. In CLI-only flows, use `apex findings --workspace --filter status:open`.
|
|
73
|
-
- Finding comments, feedback, and fix review scan starts use the same Apex device-login credentials as read tools. If a write tool reports missing auth, re-run `apex-auth-status`, check `apex-trial-status`, and complete `apex-auth-start` / `apex-auth-wait` only when no unexpired local claim proof is available
|
|
73
|
+
- Finding comments, feedback, and fix review scan starts use the same Apex device-login credentials as read tools. If a write tool reports missing auth, re-run `apex-auth-status`, check `apex-trial-status`, and complete `apex-auth-start` / `apex-auth-wait` only when no unexpired local claim proof is available. Never ask for browser cookies or `CANTINA_AUTH_TOKEN`; an error requiring that variable proves the MCP server is outdated, so update Apex CLI, re-run `apex setup <client>`, restart the client, and retry.
|
|
74
74
|
- Anonymous telemetry records only sanitized command/tool metadata such as command names, enum modes, counts, durations, success/failure categories, CLI version, and client integration. It must not include raw repository paths, scan IDs, finding IDs, comments, file paths, PR URLs, trial codes, claim tokens, onboarding fingerprints, or bearer tokens.
|
|
75
75
|
- Invalid finding feedback requires `dismissalReason`; valid feedback can include `suggestedSeverity`, including `extreme`.
|
|
76
76
|
- PR-based fix reviews can pass `fixPrUrls` directly to `apex-finding-fix-review`; agents that also need to record fixed feedback can first call `apex-finding-feedback` with `status: "valid"`, `labels: ["fixed"]`, and `fixPrUrls`.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Cantina agent plugins for security review workflows.",
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.22"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"source": {
|
|
15
15
|
"source": "npm",
|
|
16
16
|
"package": "@cantinasecurity/apex-cli",
|
|
17
|
-
"version": "0.1.
|
|
17
|
+
"version": "0.1.22"
|
|
18
18
|
},
|
|
19
19
|
"description": "Run Apex security scans and review findings from Claude Code.",
|
|
20
|
-
"version": "0.1.
|
|
20
|
+
"version": "0.1.22",
|
|
21
21
|
"author": {
|
|
22
22
|
"name": "Cantina",
|
|
23
23
|
"email": "support@cantina.xyz"
|
package/.mcp.claude.json
CHANGED
package/.mcp.codex.json
CHANGED
package/MARKETPLACE.md
CHANGED
|
@@ -13,7 +13,7 @@ This package is prepared as both a Claude Code plugin and a Codex plugin. The pu
|
|
|
13
13
|
The plugin MCP configs launch the pinned npm CLI package with:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
npx -y -p @cantinasecurity/apex-cli@0.1.
|
|
16
|
+
npx -y -p @cantinasecurity/apex-cli@0.1.22 apex-mcp
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
That keeps marketplace installs independent of a user's global `apex` install.
|
package/README.md
CHANGED
|
@@ -54,7 +54,11 @@ git pull --ff-only
|
|
|
54
54
|
pnpm install
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
For published installs, setup-managed MCP registrations launch the current npm
|
|
58
|
+
release, so restarting the client picks up the current server instead of keeping
|
|
59
|
+
an old global `apex-mcp` process indefinitely. Re-run `apex setup` after
|
|
60
|
+
upgrading to refresh copied skill files, and run `apex setup claude` in each
|
|
61
|
+
repository where you want the Claude project skill.
|
|
58
62
|
|
|
59
63
|
Restart any already-running MCP client after an Apex CLI upgrade before using
|
|
60
64
|
trial redemption or claim. A process that loaded an older credential writer
|
|
@@ -141,30 +145,30 @@ unclaimed local trial proof so `apex claim` can still use it.
|
|
|
141
145
|
Agent-safe copy/paste prompt (substitute the issued code):
|
|
142
146
|
|
|
143
147
|
```text
|
|
144
|
-
Install and run Cantina Apex CLI 0.1.
|
|
148
|
+
Install and run Cantina Apex CLI 0.1.22 to start one free standard security scan of this repository immediately.
|
|
145
149
|
|
|
146
150
|
Use this trial code only where <TRIAL_CODE> appears below: SPBT-DEVREL-XXXXXXXX
|
|
147
151
|
|
|
148
152
|
Run the commands yourself from the repository root; do not stop after setup or only explain the steps. Use terminal CLI commands only. Do not use an Apex MCP tool or run `apex setup`, `apex mcp`, `apex login`, `apex-auth-start`, or `apex-auth-wait`. Never use `--replace` or `--force`.
|
|
149
153
|
|
|
150
154
|
Use this exact command prefix for every Apex command:
|
|
151
|
-
npx -y -p @cantinasecurity/apex-cli@0.1.
|
|
155
|
+
npx -y -p @cantinasecurity/apex-cli@0.1.22 apex
|
|
152
156
|
|
|
153
157
|
1. Before redeeming, confirm every command will use the same persistent, user-accessible machine or container, HOME, filesystem, and repository root. Confirm Node.js 20+ and npx are available. If `APEX_BASE_URL` is set, continue only when its origin is `https://ai.cantina.xyz`. Run the exact prefix with `--help` and continue only if help lists both `redeem` and `claim`. If any check fails, STOP before sending the code; do not install system packages.
|
|
154
158
|
2. Redeem, with at most one response-loss recovery retry:
|
|
155
|
-
npx -y -p @cantinasecurity/apex-cli@0.1.
|
|
159
|
+
npx -y -p @cantinasecurity/apex-cli@0.1.22 apex redeem <TRIAL_CODE> --json
|
|
156
160
|
This terminal command is the only allowed tool call containing the code. Never echo or restate the code, store it in a file or environment variable, put it in a URL or MCP call, or include it in your response. Continue when the command exits 0 and stdout is JSON with `redeemed: true` and `outcome` equal to `redeemed` or `idempotent`. If and only if the first attempt ends with an ambiguous transport/connection failure or an interrupted/missing response and no typed server error code, retry this exact same command once on the same machine, HOME, and repository root. Never retry a typed server rejection and never make more than one recovery retry. If the allowed retry does not return a successful JSON outcome, STOP.
|
|
157
161
|
3. Immediately start exactly one scan; do not wait for another instruction:
|
|
158
|
-
npx -y -p @cantinasecurity/apex-cli@0.1.
|
|
162
|
+
npx -y -p @cantinasecurity/apex-cli@0.1.22 apex scan --mode standard --non-interactive --no-open --json
|
|
159
163
|
On any error or nonzero exit, STOP. After a successful scan JSON response, inspect `localPersistence.workspaceBindingSaved`. If it is `false`, the server scan already started: capture and report `binding.lastScanId`, then STOP; do not run status or findings until local repository permissions are repaired. Otherwise capture `binding.lastScanId` from the JSON as <SCAN_ID>; if it is absent, STOP.
|
|
160
164
|
4. About every 60 seconds, poll that exact scan:
|
|
161
|
-
npx -y -p @cantinasecurity/apex-cli@0.1.
|
|
165
|
+
npx -y -p @cantinasecurity/apex-cli@0.1.22 apex status --scan <SCAN_ID> --json
|
|
162
166
|
Read `progress.progress.status`. Wait while it is `created`, `pending`, `queued`, `starting`, `running`, `in_progress`, or `processing`. Continue on `completed`. STOP on `failed`, `cancelled`, a missing or unknown status, or a command failure.
|
|
163
167
|
5. Fetch that exact scan's findings:
|
|
164
|
-
npx -y -p @cantinasecurity/apex-cli@0.1.
|
|
168
|
+
npx -y -p @cantinasecurity/apex-cli@0.1.22 apex findings --scan <SCAN_ID> --json
|
|
165
169
|
On success, summarize findings by severity, most severe first, including identifier, title, status, and confidence. This command does not return file locations, so do not invent them. On failure, STOP.
|
|
166
170
|
6. Do not claim automatically. Tell me the claim deadline from step 2 and remind me to run this exact command myself from the same repository root, machine, and HOME:
|
|
167
|
-
npx -y -p @cantinasecurity/apex-cli@0.1.
|
|
171
|
+
npx -y -p @cantinasecurity/apex-cli@0.1.22 apex claim
|
|
168
172
|
It may open a browser so I can create or sign in to a Cantina account and keep the results. Claim moves the trial into the currently selected Cantina workspace when I can run scans there, or into my existing personal workspace. If the selected workspace cannot run scans, tell me to switch to one that can and retry before the claim deadline.
|
|
169
173
|
|
|
170
174
|
Never paste raw command transcripts. For any failure, report only the step, exit code, and sanitized error. Redact the trial code and every `apex_at_`, `apex_rt_`, or `apex_ct_` value from all reports.
|
|
@@ -354,6 +358,10 @@ Identifiers such as `KERN2-25` are resolved against the selected or latest scan
|
|
|
354
358
|
|
|
355
359
|
Finding comments, valid/invalid feedback, and fix review scan starts use the same Apex login credentials as read commands. In MCP clients, call `apex-auth-start`, then pass both its returned `deviceCode` and opaque `credentialGeneration` to `apex-auth-wait` to authenticate these write tools safely.
|
|
356
360
|
|
|
361
|
+
Never copy a browser cookie or set `CANTINA_AUTH_TOKEN` for these tools. If an
|
|
362
|
+
MCP server asks for that variable, it is an outdated pre-device-auth server.
|
|
363
|
+
Update Apex CLI, re-run `apex setup <client>`, restart the client, and retry.
|
|
364
|
+
|
|
357
365
|
Invalid feedback requires a dismissal reason. Valid feedback can include `--suggested-severity extreme|critical|high|medium|low|informational`.
|
|
358
366
|
|
|
359
367
|
Fix review scans can review either a Fix PR or the current repository state:
|
|
@@ -533,7 +541,7 @@ Telemetry event posts do not include bearer tokens. The telemetry endpoint is `P
|
|
|
533
541
|
{
|
|
534
542
|
"schemaVersion": 1,
|
|
535
543
|
"event": "apex.invocation.completed",
|
|
536
|
-
"cliVersion": "0.1.
|
|
544
|
+
"cliVersion": "0.1.22",
|
|
537
545
|
"invocation": {
|
|
538
546
|
"surface": "mcp",
|
|
539
547
|
"command": "apex-scan",
|
|
@@ -564,7 +572,7 @@ The npm package also includes marketplace-ready plugin artifacts:
|
|
|
564
572
|
- `.claude-plugin/plugin.json` and `.mcp.claude.json` for Claude Code plugin installs
|
|
565
573
|
- `.claude-plugin/marketplace.json` for a Claude marketplace entry backed by the public npm package
|
|
566
574
|
|
|
567
|
-
These plugin installs launch the pinned npm package with `npx -y -p @cantinasecurity/apex-cli@0.1.
|
|
575
|
+
These plugin installs launch the pinned npm package with `npx -y -p @cantinasecurity/apex-cli@0.1.22 apex-mcp`, so users do not need to install `apex` globally before enabling the plugin.
|
|
568
576
|
|
|
569
577
|
The repository also includes `.agents/plugins/marketplace.json` for local Codex marketplace testing from a checkout.
|
|
570
578
|
|
package/dist/mcp.js
CHANGED
|
@@ -27,7 +27,7 @@ Suggested workflow:
|
|
|
27
27
|
Notes:
|
|
28
28
|
- Pass cwd explicitly for repository-specific operations.
|
|
29
29
|
- Tool calls are always non-interactive and never auto-open a browser.
|
|
30
|
-
- Finding write tools use the same Apex device-login credentials as read tools.
|
|
30
|
+
- Finding write tools use the same Apex device-login credentials as read tools. Never ask for browser cookies or CANTINA_AUTH_TOKEN. An error requiring CANTINA_AUTH_TOKEN proves the MCP server is outdated; update Apex CLI, re-run apex setup for this client, restart it, and retry.
|
|
31
31
|
- Organization service-key creation, listing, and revocation are intentionally scripted-CLI-only and are not exposed as MCP tools. Never ask a user to paste a service key into an MCP prompt or tool call.
|
|
32
32
|
- HTTP-only serverless and cron integrations should use the hosted API documented at https://ai.cantina.xyz/docs/apex-api instead of launching this stdio server.
|
|
33
33
|
- Use mode "audit" for audit scans; "ultra" remains accepted as a legacy alias. Use mode "lite" only for beta-enabled provider-backed Lite scans, and mode "pr" for GitHub pull request scans.
|
package/dist/setup.js
CHANGED
|
@@ -11,6 +11,7 @@ const CODEX_SKILL_NAME = "apex-cli";
|
|
|
11
11
|
const MCP_SERVER_NAME = "apex";
|
|
12
12
|
const MCP_CLIENT_ENV_NAME = "APEX_MCP_CLIENT";
|
|
13
13
|
const MCP_CLIENT_INTEGRATION_ENV_NAME = "APEX_CLIENT_INTEGRATION";
|
|
14
|
+
const PACKAGE_NAME = "@cantinasecurity/apex-cli";
|
|
14
15
|
const execFile = promisify(execFileCallback);
|
|
15
16
|
const SETUP_CLIENTS = ["codex", "claude", "copilot"];
|
|
16
17
|
function quoteShellArg(value) {
|
|
@@ -64,9 +65,9 @@ async function resolveMcpLaunchSpec(packageRoot = PACKAGE_ROOT) {
|
|
|
64
65
|
};
|
|
65
66
|
}
|
|
66
67
|
return {
|
|
67
|
-
command: "
|
|
68
|
-
args: [],
|
|
69
|
-
label:
|
|
68
|
+
command: "npx",
|
|
69
|
+
args: ["-y", "-p", `${PACKAGE_NAME}@latest`, "apex-mcp"],
|
|
70
|
+
label: `npx -y -p ${PACKAGE_NAME}@latest apex-mcp`,
|
|
70
71
|
};
|
|
71
72
|
}
|
|
72
73
|
function getCodexHome() {
|
package/package.json
CHANGED
package/skills/apex-cli/SKILL.md
CHANGED
|
@@ -75,7 +75,7 @@ Guidelines:
|
|
|
75
75
|
- When checking a scan that is not the workspace binding's latest scan, pass `scanId` to `apex-status`; use `apex-scans` first if you need to discover scan IDs.
|
|
76
76
|
- Prefer `apex-findings` for quick inspection and `apex-export-findings` when the user needs a file artifact.
|
|
77
77
|
- Use `apex-workspace-findings` when the user asks for findings across a workspace instead of one scan. Pass `filters: ["status:open"]` for all open findings; supported filter facets are `severity`, `scan`, `status`, `validation`, and `visibility`, and a leading `!` negates a filter.
|
|
78
|
-
- Finding comments, feedback, and fix review scan starts use the same Apex device-login credentials as read tools. If a write tool reports missing auth, re-run `apex-auth-status`, check `apex-trial-status`, and complete `apex-auth-start` / `apex-auth-wait` only when no unexpired local claim proof is available
|
|
78
|
+
- Finding comments, feedback, and fix review scan starts use the same Apex device-login credentials as read tools. If a write tool reports missing auth, re-run `apex-auth-status`, check `apex-trial-status`, and complete `apex-auth-start` / `apex-auth-wait` only when no unexpired local claim proof is available. Never ask for browser cookies or `CANTINA_AUTH_TOKEN`; an error requiring that variable proves the MCP server is outdated, so update Apex CLI, re-run `apex setup <client>`, restart the client, and retry.
|
|
79
79
|
- Anonymous telemetry records only sanitized command/tool metadata such as command names, enum modes, counts, durations, success/failure categories, CLI version, and client integration. It must not include raw repository paths, scan IDs, finding IDs, comments, file paths, PR URLs, trial codes, claim tokens, onboarding fingerprints, or bearer tokens.
|
|
80
80
|
- Invalid finding feedback requires `dismissalReason`; valid feedback can include `suggestedSeverity`, including `extreme`.
|
|
81
81
|
- PR-based fix reviews can pass `fixPrUrls` directly to `apex-finding-fix-review`; agents that also need to record fixed feedback can first call `apex-finding-feedback` with `status: "valid"`, `labels: ["fixed"]`, and `fixPrUrls`.
|