@cantinasecurity/apex-cli 0.1.43 → 0.1.44
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 +2 -0
- 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 +22 -9
- package/dist/help.js +2 -0
- package/dist/mcp.js +3 -1
- package/package.json +1 -1
- package/skills/apex-cli/SKILL.md +2 -0
|
@@ -62,6 +62,8 @@ If the Apex MCP server is not configured, fall back to the local CLI:
|
|
|
62
62
|
- `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.
|
|
63
63
|
- 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.
|
|
64
64
|
- 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.
|
|
65
|
+
- Cantina company access requires current, activated membership; pending invitations and removed or disabled memberships do not grant access. After membership changes, refresh the account with `apex login` in a terminal, checking `apex-trial-status` first and preserving the claim-first workflow above. For temporary company-access verification failures, keep credentials and retry after recovery.
|
|
66
|
+
- For GitHub connection, use `apex-connect-provider` with `provider: "github"` and pass the returned URL unchanged to the user. They must open it in the browser signed in to the same Cantina account as the CLI and complete GitHub authorization. After an organization owner approves an installation request, call the tool again to finish company linking. CLI fallback: `apex connect github`. Automation must not assume the returned URL is hosted on github.com.
|
|
65
67
|
- Service-key creation, listing, and revocation have no MCP tools. Never ask a user to paste a service key into a prompt, and never place one in a tool argument, tool result, source file, or log. Hosted MCP clients may read it from a secret-backed environment variable for the HTTP Authorization header.
|
|
66
68
|
- 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 query credit availability or 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.
|
|
67
69
|
- For a hosted MCP client, connect to `https://ai.cantina.xyz/mcp` and send `APEX_SERVICE_KEY` as a Bearer header. The service key authenticates hosted MCP, but not the local CLI or stdio MCP; those use device login.
|
|
@@ -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.44"
|
|
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.44"
|
|
18
18
|
},
|
|
19
19
|
"description": "Run Apex security scans and review findings from Claude Code.",
|
|
20
|
-
"version": "0.1.
|
|
20
|
+
"version": "0.1.44",
|
|
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.44 apex-mcp
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
That keeps marketplace installs independent of a user's global `apex` install.
|
package/README.md
CHANGED
|
@@ -166,30 +166,30 @@ unclaimed local trial proof so `apex claim` can still use it.
|
|
|
166
166
|
Agent-safe copy/paste prompt (substitute the issued code):
|
|
167
167
|
|
|
168
168
|
```text
|
|
169
|
-
Install and run Cantina Apex CLI 0.1.
|
|
169
|
+
Install and run Cantina Apex CLI 0.1.44 to start one free standard security scan of this repository immediately.
|
|
170
170
|
|
|
171
171
|
Use this trial code only where <TRIAL_CODE> appears below: SPBT-DEVREL-XXXXXXXX
|
|
172
172
|
|
|
173
173
|
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`.
|
|
174
174
|
|
|
175
175
|
Use this exact command prefix for every Apex command:
|
|
176
|
-
npx -y -p @cantinasecurity/apex-cli@0.1.
|
|
176
|
+
npx -y -p @cantinasecurity/apex-cli@0.1.44 apex
|
|
177
177
|
|
|
178
178
|
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.
|
|
179
179
|
2. Redeem, with at most one response-loss recovery retry:
|
|
180
|
-
npx -y -p @cantinasecurity/apex-cli@0.1.
|
|
180
|
+
npx -y -p @cantinasecurity/apex-cli@0.1.44 apex redeem <TRIAL_CODE> --json
|
|
181
181
|
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. Parse the JSON from stdout only; do not merge stderr into stdout, because npm may write warnings to stderr. Continue when the command exits 0 and stdout is JSON with `redeemed: true` and `outcome` equal to `redeemed` or `idempotent`. `idempotent` means the existing guest session resumed and it may already own a workspace. 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.
|
|
182
182
|
3. Immediately start exactly one scan; do not wait for another instruction:
|
|
183
|
-
npx -y -p @cantinasecurity/apex-cli@0.1.
|
|
183
|
+
npx -y -p @cantinasecurity/apex-cli@0.1.44 apex scan --mode standard --non-interactive --no-open --json
|
|
184
184
|
The CLI validates the complete guest local archive before it reserves a workspace. An unbound renamed checkout may recover only the sole empty guest workspace when no explicit workspace name was supplied. 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.
|
|
185
185
|
4. About every 60 seconds, poll that exact scan:
|
|
186
|
-
npx -y -p @cantinasecurity/apex-cli@0.1.
|
|
186
|
+
npx -y -p @cantinasecurity/apex-cli@0.1.44 apex status --scan <SCAN_ID> --json
|
|
187
187
|
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.
|
|
188
188
|
5. Fetch that exact scan's findings:
|
|
189
|
-
npx -y -p @cantinasecurity/apex-cli@0.1.
|
|
189
|
+
npx -y -p @cantinasecurity/apex-cli@0.1.44 apex findings --scan <SCAN_ID> --json
|
|
190
190
|
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.
|
|
191
191
|
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:
|
|
192
|
-
npx -y -p @cantinasecurity/apex-cli@0.1.
|
|
192
|
+
npx -y -p @cantinasecurity/apex-cli@0.1.44 apex claim
|
|
193
193
|
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.
|
|
194
194
|
|
|
195
195
|
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.
|
|
@@ -503,6 +503,19 @@ Useful flags:
|
|
|
503
503
|
|
|
504
504
|
Unauthenticated `--json`, `--non-interactive`, and non-TTY commands fail immediately with `apex login` guidance. Run login explicitly before automation. Temporary refresh/network failures preserve credentials; retry after the service recovers. Provider connection commands return URLs without opening browsers in automation.
|
|
505
505
|
|
|
506
|
+
Cantina company access requires a current, activated membership. Removed or
|
|
507
|
+
disabled members and pending invitations do not grant access. After membership
|
|
508
|
+
changes, run `apex login` again to refresh the company snapshot. If company-access
|
|
509
|
+
verification is temporarily unavailable, keep the saved credentials and retry
|
|
510
|
+
after the service recovers.
|
|
511
|
+
|
|
512
|
+
For `apex connect github`, open the returned URL in a browser signed in to the
|
|
513
|
+
same Cantina account as the CLI, then complete GitHub authorization. After an
|
|
514
|
+
organization owner approves an installation request, run `apex connect github`
|
|
515
|
+
again to finish linking the installation to the selected company. Local MCP
|
|
516
|
+
users repeat `apex-connect-provider` with `provider: "github"` to obtain the new
|
|
517
|
+
URL; automation must not assume the URL points directly to github.com.
|
|
518
|
+
|
|
506
519
|
`auto` is the default. `remote` requires Apex to materialize from a remote repository. `local` forces a local snapshot upload even when a clean remote path is available.
|
|
507
520
|
|
|
508
521
|
Audit scans use `audit` as the scan mode and still require provider-backed GitHub, GitLab or company-enabled Forgejo repositories that Apex can materialize remotely without a local snapshot fallback. `ultra` remains accepted as a backwards-compatible alias.
|
|
@@ -695,7 +708,7 @@ Telemetry event posts do not include bearer tokens. The telemetry endpoint is `P
|
|
|
695
708
|
{
|
|
696
709
|
"schemaVersion": 1,
|
|
697
710
|
"event": "apex.invocation.completed",
|
|
698
|
-
"cliVersion": "0.1.
|
|
711
|
+
"cliVersion": "0.1.44",
|
|
699
712
|
"invocation": {
|
|
700
713
|
"surface": "mcp",
|
|
701
714
|
"command": "apex-scan",
|
|
@@ -726,7 +739,7 @@ The npm package also includes marketplace-ready plugin artifacts:
|
|
|
726
739
|
- `.claude-plugin/plugin.json` and `.mcp.claude.json` for Claude Code plugin installs
|
|
727
740
|
- `.claude-plugin/marketplace.json` for a Claude marketplace entry backed by the public npm package
|
|
728
741
|
|
|
729
|
-
These plugin installs launch the pinned npm package with `npx -y -p @cantinasecurity/apex-cli@0.1.
|
|
742
|
+
These plugin installs launch the pinned npm package with `npx -y -p @cantinasecurity/apex-cli@0.1.44 apex-mcp`, so users do not need to install `apex` globally before enabling the plugin.
|
|
730
743
|
|
|
731
744
|
The repository also includes `.agents/plugins/marketplace.json` for local Codex marketplace testing from a checkout.
|
|
732
745
|
|
package/dist/help.js
CHANGED
|
@@ -104,6 +104,8 @@ Tips:
|
|
|
104
104
|
An unbound renamed checkout may recover only the sole empty guest workspace unless you pass --workspace-name.
|
|
105
105
|
After a guest scan, run apex claim on the same machine within the displayed claim deadline to keep the results.
|
|
106
106
|
Claim moves trial results into the selected Cantina workspace when you can run scans there, or into your existing personal workspace.
|
|
107
|
+
Cantina company access requires current, activated membership. After membership changes, run apex login again.
|
|
108
|
+
For GitHub connection, use the same Cantina account in the browser. After owner approval, rerun apex connect github to finish linking.
|
|
107
109
|
Service-key commands require an existing login; run apex login first when needed.
|
|
108
110
|
APEX_SERVICE_KEY authenticates https://ai.cantina.xyz/mcp and hosted REST; it does not replace apex login for local CLI or stdio MCP commands.
|
|
109
111
|
Apex automatically selects your company when only one is available. With multiple companies, choose one interactively or pass --company.
|
package/dist/mcp.js
CHANGED
|
@@ -30,6 +30,8 @@ Suggested workflow:
|
|
|
30
30
|
Notes:
|
|
31
31
|
- Pass cwd explicitly for repository-specific operations. repoPaths accepts exact files, directories, or HTTPS repository URLs; remote URLs never fall back to uploading cwd. Use Standard for local changes and unconnected public repositories.
|
|
32
32
|
- Tool calls are always non-interactive and never auto-open a browser.
|
|
33
|
+
- Cantina company access requires current, activated membership. After membership changes, check apex-trial-status and preserve the claim-first workflow before refreshing account login. Temporary membership-verification failures should be retried after recovery without discarding credentials.
|
|
34
|
+
- For GitHub, return the apex-connect-provider URL unchanged. The user must open it in the browser signed in to the same Cantina account as the CLI and complete GitHub authorization. After an organization owner approves an installation request, call apex-connect-provider again to finish company linking.
|
|
33
35
|
- 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.
|
|
34
36
|
- 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 a prompt or tool argument. A hosted MCP client supplies it only as the HTTP Authorization header.
|
|
35
37
|
- Production agents that do not need local filesystem access can connect to https://ai.cantina.xyz/mcp over Streamable HTTP with Authorization: Bearer <service-key>. Serverless and cron applications can instead use the REST API documented at https://ai.cantina.xyz/docs/apex-api. This local stdio server continues to use device login.
|
|
@@ -905,7 +907,7 @@ function registerTools(server, auditSetupEnabled = false) {
|
|
|
905
907
|
}));
|
|
906
908
|
server.registerTool("apex-connect-provider", {
|
|
907
909
|
title: "Get Apex Provider Connection URL",
|
|
908
|
-
description: "Return the browser URL a user needs to connect GitHub, GitLab or company-enabled Forgejo access for Apex. This tool never opens a browser.",
|
|
910
|
+
description: "Return the browser URL a user needs to connect GitHub, GitLab or company-enabled Forgejo access for Apex. This tool never opens a browser. For GitHub, use the same Cantina account as the CLI in the browser and repeat this tool after organization-owner approval to finish linking.",
|
|
909
911
|
inputSchema: {
|
|
910
912
|
cwd: z.string().optional(),
|
|
911
913
|
company: z.string().optional(),
|
package/package.json
CHANGED
package/skills/apex-cli/SKILL.md
CHANGED
|
@@ -67,6 +67,8 @@ Guidelines:
|
|
|
67
67
|
- Do not rely on interactive CLI prompts. The MCP tools are intentionally non-interactive.
|
|
68
68
|
- The MCP-only `apex-trial-status` tool may report local guest and claim deadlines, but it must never return a trial code or claim token. `claimAvailable` becomes false at a known passed deadline; missing or invalid local deadline metadata remains conservative and server-authoritative. There is intentionally no MCP redemption or claim tool.
|
|
69
69
|
- When MCP remains available after a guest scan, remind the user to run `apex claim` on the same machine while `claimAvailable` is true; after a known passed deadline, continue with normal account login.
|
|
70
|
+
- Cantina company access requires current, activated membership; pending invitations and removed or disabled memberships do not grant access. After membership changes, refresh the account with `apex login` in a terminal, checking `apex-trial-status` first and preserving the claim-first workflow above. For temporary company-access verification failures, keep credentials and retry after recovery.
|
|
71
|
+
- For GitHub connection, use `apex-connect-provider` with `provider: "github"` and pass the returned URL unchanged to the user. They must open it in the browser signed in to the same Cantina account as the CLI and complete GitHub authorization. After an organization owner approves an installation request, call the tool again to finish company linking. CLI fallback: `apex connect github`. Automation must not assume the returned URL is hosted on github.com.
|
|
70
72
|
- Service-key creation, listing, and revocation have no MCP tools. Never ask a user to paste a service key into a prompt, and never place one in a tool argument, tool result, source file, or log. Hosted MCP clients may read it from a secret-backed environment variable for the HTTP Authorization header.
|
|
71
73
|
- 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 query credit availability or 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.
|
|
72
74
|
- For a hosted MCP client, connect to `https://ai.cantina.xyz/mcp` and send `APEX_SERVICE_KEY` as a Bearer header. The service key authenticates hosted MCP, but not the local CLI or stdio MCP; those use device login.
|