@cantinasecurity/apex-cli 0.1.20 → 0.1.21
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 -18
- package/dist/api-client.js +5 -1
- package/dist/help.js +2 -2
- package/package.json +1 -1
- package/skills/apex-cli/SKILL.md +1 -1
|
@@ -50,7 +50,7 @@ If the Apex MCP server is not configured, fall back to the local CLI:
|
|
|
50
50
|
- 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.
|
|
51
51
|
- `apex-trial-status` is MCP-only; do not invoke it as a CLI command. In a CLI-only flow, use the `claimDeadline` returned by `apex redeem <code> --json` without repeating or persisting the secret code.
|
|
52
52
|
- After a guest scan, tell the user to run `apex claim` on the same machine before that returned claim deadline. If the deadline is unavailable or uncertain, do not guess or start a replacement login; run `apex claim` and let the server validate the proof.
|
|
53
|
-
- Claim
|
|
53
|
+
- Claim moves the guest workspace, scans, and findings into the currently selected Cantina workspace when the account can run scans there. Personal workspace owners receive the trial in their existing workspace instead of a duplicate. If the selected workspace cannot run scans, tell the user to switch to one that can and retry before the claim deadline.
|
|
54
54
|
- Service-key management has no MCP tools. Never ask a user to paste a service key into a prompt, and never place one in an MCP call, tool result, source file, or log.
|
|
55
55
|
- If a user explicitly needs a new service key, tell them to run `apex login` if needed, then run `apex service-key create --name <name> --scope <scope[,scope]>` directly in their own terminal. Use only the required scopes: `scans:create` to trigger, `scans:read` to poll status, and `findings:read` to retrieve findings. A P1-only adapter can use `--scope scans:read,findings:read`; omitting `--scope` grants all three. The CLI automatically selects the company when only one is available and prompts when there are several; use `--company <id-or-handle>` to skip that prompt or resolve a non-interactive command. Service-key commands never initiate login, and the secret is shown once.
|
|
56
56
|
- For a headless HTTP adapter, read the service key from a secret-backed environment variable, send it as a bearer token to `/api/apex/v1`, and redact it from errors and logs. Do not shell out to `apex` or launch MCP from the adapter.
|
|
@@ -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.21"
|
|
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.21"
|
|
18
18
|
},
|
|
19
19
|
"description": "Run Apex security scans and review findings from Claude Code.",
|
|
20
|
-
"version": "0.1.
|
|
20
|
+
"version": "0.1.21",
|
|
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.21 apex-mcp
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
That keeps marketplace installs independent of a user's global `apex` install.
|
package/README.md
CHANGED
|
@@ -107,14 +107,14 @@ fingerprint before the first request, exchanges the code for a seven-day guest
|
|
|
107
107
|
session, and stores the single-use claim proof only in the mode-0600 Apex
|
|
108
108
|
credentials file. A one-way code hash distinguishes safe same-code retries
|
|
109
109
|
without retaining the trial code. `apex claim` is the one onboarding command
|
|
110
|
-
that may open a browser; it creates or signs into a Cantina account, then
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
deadline.
|
|
110
|
+
that may open a browser; it creates or signs into a Cantina account, then moves
|
|
111
|
+
the guest workspace, scans, and findings into the currently selected Cantina
|
|
112
|
+
workspace when that account can run scans there. Personal workspace owners
|
|
113
|
+
receive the trial in their existing workspace instead of getting a duplicate.
|
|
114
|
+
Run it on the same machine within 30 days. Unclaimed guest data is retained only
|
|
115
|
+
for the limited period disclosed during redemption and is then queued for
|
|
116
|
+
deletion. If the selected Cantina workspace cannot run scans, switch to one
|
|
117
|
+
that can and retry before the claim deadline.
|
|
118
118
|
Trial redemption, claim, and revocation are hosted-only and fail before sending
|
|
119
119
|
any onboarding secret when `APEX_BASE_URL` is not `https://ai.cantina.xyz`.
|
|
120
120
|
|
|
@@ -141,31 +141,31 @@ unclaimed local trial proof so `apex claim` can still use it.
|
|
|
141
141
|
Agent-safe copy/paste prompt (substitute the issued code):
|
|
142
142
|
|
|
143
143
|
```text
|
|
144
|
-
Install and run Cantina Apex CLI 0.1.
|
|
144
|
+
Install and run Cantina Apex CLI 0.1.21 to start one free standard security scan of this repository immediately.
|
|
145
145
|
|
|
146
146
|
Use this trial code only where <TRIAL_CODE> appears below: SPBT-DEVREL-XXXXXXXX
|
|
147
147
|
|
|
148
148
|
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
149
|
|
|
150
150
|
Use this exact command prefix for every Apex command:
|
|
151
|
-
npx -y -p @cantinasecurity/apex-cli@0.1.
|
|
151
|
+
npx -y -p @cantinasecurity/apex-cli@0.1.21 apex
|
|
152
152
|
|
|
153
153
|
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
154
|
2. Redeem, with at most one response-loss recovery retry:
|
|
155
|
-
npx -y -p @cantinasecurity/apex-cli@0.1.
|
|
155
|
+
npx -y -p @cantinasecurity/apex-cli@0.1.21 apex redeem <TRIAL_CODE> --json
|
|
156
156
|
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
157
|
3. Immediately start exactly one scan; do not wait for another instruction:
|
|
158
|
-
npx -y -p @cantinasecurity/apex-cli@0.1.
|
|
158
|
+
npx -y -p @cantinasecurity/apex-cli@0.1.21 apex scan --mode standard --non-interactive --no-open --json
|
|
159
159
|
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
160
|
4. About every 60 seconds, poll that exact scan:
|
|
161
|
-
npx -y -p @cantinasecurity/apex-cli@0.1.
|
|
161
|
+
npx -y -p @cantinasecurity/apex-cli@0.1.21 apex status --scan <SCAN_ID> --json
|
|
162
162
|
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
163
|
5. Fetch that exact scan's findings:
|
|
164
|
-
npx -y -p @cantinasecurity/apex-cli@0.1.
|
|
164
|
+
npx -y -p @cantinasecurity/apex-cli@0.1.21 apex findings --scan <SCAN_ID> --json
|
|
165
165
|
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
166
|
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.
|
|
168
|
-
It may open a browser so I can create or sign in to a Cantina account and keep the results.
|
|
167
|
+
npx -y -p @cantinasecurity/apex-cli@0.1.21 apex claim
|
|
168
|
+
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
169
|
|
|
170
170
|
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.
|
|
171
171
|
```
|
|
@@ -533,7 +533,7 @@ Telemetry event posts do not include bearer tokens. The telemetry endpoint is `P
|
|
|
533
533
|
{
|
|
534
534
|
"schemaVersion": 1,
|
|
535
535
|
"event": "apex.invocation.completed",
|
|
536
|
-
"cliVersion": "0.1.
|
|
536
|
+
"cliVersion": "0.1.21",
|
|
537
537
|
"invocation": {
|
|
538
538
|
"surface": "mcp",
|
|
539
539
|
"command": "apex-scan",
|
|
@@ -564,7 +564,7 @@ The npm package also includes marketplace-ready plugin artifacts:
|
|
|
564
564
|
- `.claude-plugin/plugin.json` and `.mcp.claude.json` for Claude Code plugin installs
|
|
565
565
|
- `.claude-plugin/marketplace.json` for a Claude marketplace entry backed by the public npm package
|
|
566
566
|
|
|
567
|
-
These plugin installs launch the pinned npm package with `npx -y -p @cantinasecurity/apex-cli@0.1.
|
|
567
|
+
These plugin installs launch the pinned npm package with `npx -y -p @cantinasecurity/apex-cli@0.1.21 apex-mcp`, so users do not need to install `apex` globally before enabling the plugin.
|
|
568
568
|
|
|
569
569
|
The repository also includes `.agents/plugins/marketplace.json` for local Codex marketplace testing from a checkout.
|
|
570
570
|
|
package/dist/api-client.js
CHANGED
|
@@ -91,7 +91,11 @@ function getFriendlyApiErrorMessage(error) {
|
|
|
91
91
|
case "CLAIM_INVALID":
|
|
92
92
|
return "This trial claim proof is invalid or already consumed. Local trial state was cleared; run `apex login` to use the claimed Cantina account, or contact Cantina support if the results are missing.";
|
|
93
93
|
case "CLAIM_PERSONAL_TENANT_EXISTS":
|
|
94
|
-
return "
|
|
94
|
+
return "The claim reached a legacy attachment path for an existing personal workspace. Wait a moment and run `apex claim` again; if it repeats, contact Cantina support before the trial claim deadline.";
|
|
95
|
+
case "CLAIM_TARGET_UNAUTHORIZED":
|
|
96
|
+
return "The selected Cantina workspace cannot receive this trial. Switch to a workspace where you can run scans, then run `apex claim` again.";
|
|
97
|
+
case "CLAIM_TARGET_PREFIX_EXHAUSTED":
|
|
98
|
+
return "The selected Cantina workspace could not allocate a workspace prefix. Contact Cantina support before the trial claim deadline.";
|
|
95
99
|
case "EMAIL_UNVERIFIED":
|
|
96
100
|
return "Verify your email, then run `apex claim` again. Your guest trial remains recoverable on this machine.";
|
|
97
101
|
case "FINGERPRINT_MISMATCH":
|
package/dist/help.js
CHANGED
|
@@ -84,7 +84,7 @@ Tips:
|
|
|
84
84
|
Trial redemption, claim, and revocation require https://ai.cantina.xyz and reject other APEX_BASE_URL origins before sending secrets.
|
|
85
85
|
apex redeem never starts device login or opens a browser; apex claim is the only onboarding command that may open one.
|
|
86
86
|
After a guest scan, run apex claim on the same machine within the displayed claim deadline to keep the results.
|
|
87
|
-
Claim
|
|
87
|
+
Claim moves trial results into the selected Cantina workspace when you can run scans there, or into your existing personal workspace.
|
|
88
88
|
Service-key commands require an existing login; run apex login first when needed.
|
|
89
89
|
Apex automatically selects your company when only one is available. With multiple companies, choose one interactively or pass --company.
|
|
90
90
|
Service-key creation also requires --name and reveals the secret only once; omit --scope to grant all hosted API scopes.
|
|
@@ -156,7 +156,7 @@ Tips:
|
|
|
156
156
|
/findings comment, /findings feedback, and /findings fix-review use the current Apex login.
|
|
157
157
|
/findings workspace status:open returns all open findings in the workspace browser scan set.
|
|
158
158
|
/claim is the only onboarding command that may open a browser. Trial redemption stays scripted-only and is not exposed through MCP.
|
|
159
|
-
|
|
159
|
+
/claim moves trial results into the selected Cantina workspace when you can run scans there, or into your existing personal workspace.
|
|
160
160
|
Service-key commands automatically use your company when only one is available. With multiple companies, choose one interactively or pass --company.
|
|
161
161
|
Service-key secrets are shown once. Run these commands in your terminal, not in the interactive shell or through MCP.
|
|
162
162
|
Invalid finding feedback requires a dismissal reason.
|
package/package.json
CHANGED
package/skills/apex-cli/SKILL.md
CHANGED
|
@@ -50,7 +50,7 @@ If the Apex MCP server is not configured, fall back to the local CLI:
|
|
|
50
50
|
- 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.
|
|
51
51
|
- `apex-trial-status` is MCP-only; do not invoke it as a CLI command. In a CLI-only flow, use the `claimDeadline` returned by `apex redeem <code> --json` without repeating or persisting the secret code.
|
|
52
52
|
- After a guest scan, tell the user to run `apex claim` on the same machine before that returned claim deadline. If the deadline is unavailable or uncertain, do not guess or start a replacement login; run `apex claim` and let the server validate the proof.
|
|
53
|
-
- Claim
|
|
53
|
+
- Claim moves the guest workspace, scans, and findings into the currently selected Cantina workspace when the account can run scans there. Personal workspace owners receive the trial in their existing workspace instead of a duplicate. If the selected workspace cannot run scans, tell the user to switch to one that can and retry before the claim deadline.
|
|
54
54
|
|
|
55
55
|
Guidelines:
|
|
56
56
|
|