lockpicks 0.4.0 → 0.5.0
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/README.md +36 -8
- package/dist/lockpick.mjs +17473 -14374
- package/package.json +15 -15
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# lockpicks
|
|
2
2
|
|
|
3
|
-
Read your Lockpick results from the terminal, and give coding agents the same access over MCP: sites, scans, findings, repair briefs and recheck comparisons. If you allow it, the CLI and agents can also run a free quick check, add a site, start a Pulse
|
|
3
|
+
Read your Lockpick results from the terminal, and give coding agents the same access over MCP: sites, scans, findings, repair briefs and recheck comparisons. If you allow it, the CLI and agents can also run a free quick check, add a site, start a Pulse scan, check a DNS finding again and prepare a Deep scan that you approve in Lockpick. Master Key scans only start in the Lockpick web app, and the CLI never cancels or deletes anything.
|
|
4
4
|
|
|
5
5
|
## Sign in
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ Read your Lockpick results from the terminal, and give coding agents the same ac
|
|
|
8
8
|
npx lockpicks login --host https://<your-lockpick>
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
The browser opens a device page. Confirm the code, pick a workspace and approve. To let the key start Pulse
|
|
11
|
+
The browser opens a device page. Confirm the code, pick a workspace and approve. To let the key start Pulse scans, tick **Start Pulse scans on sites I own or may test** under **Also allow**; that box is your statement that you own the workspace's sites or may test them, and each Pulse started with the key is recorded under your name. Without it the key only reads. **Add and switch sites** lets the key add sites (`lockpick sites add`) and switch your free site. **Prepare Deep scans I approve** lets the key prepare Deep scans (`lockpick deep`); each still needs a verified ownership proof and your approval of that exact scan in Lockpick. `lockpick login --pulse --sites --deep` marks what the terminal asks for, but the browser never ticks anything for you and the key gets exactly what you tick. `lockpick whoami` shows what the key can do. The terminal receives a key bound to that workspace, stored in your OS keychain (or `~/.config/lockpick/config.json`, mode 0600, when no keychain is available). Each use extends the key; an idle key expires after the workspace's lifetime (30 days by default). Revoke it with `lockpick logout` or in the web app under **Workspace settings → CLI & agent access**.
|
|
12
12
|
|
|
13
13
|
After an `npx` login, the CLI offers to install itself so you can type `lockpick` (or `lockpicks`) instead of `npx lockpicks`. To do it yourself:
|
|
14
14
|
|
|
@@ -26,24 +26,24 @@ Use HTTPS for a remote Lockpick host; a host without a scheme (`lockpick.app`) m
|
|
|
26
26
|
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
27
27
|
| `lockpick whoami` | The user, workspace and key this terminal uses |
|
|
28
28
|
| `lockpick doctor` | Checks Node.js, the selected host, connection, key, workspace and agent API without starting a scan |
|
|
29
|
-
| `lockpick projects` | Projects with their latest Pulse and
|
|
29
|
+
| `lockpick projects` | Projects with their latest Pulse and box |
|
|
30
30
|
| `lockpick status [project]` | One project's report, or an overview of all of them |
|
|
31
|
-
| `lockpick runs` | Pulse assessments and
|
|
31
|
+
| `lockpick runs` | Pulse assessments and boxs, newest first |
|
|
32
32
|
| `lockpick run <runId>` | One run: status, open findings, coverage and limits |
|
|
33
33
|
| `lockpick watch <runId>` | Follows a run until it finishes |
|
|
34
34
|
| `lockpick check <url>` | A free quick check of a website's homepage and public DNS; needs no site (key allowed to start Pulses) |
|
|
35
|
-
| `lockpick sites` | Sites with their latest Pulse and
|
|
35
|
+
| `lockpick sites` | Sites with their latest Pulse and box |
|
|
36
36
|
| `lockpick sites add <url>` | Adds a site you own or may test (key allowed to add sites); adding does not scan it |
|
|
37
37
|
| `lockpick sites switch <site> --yes` | Removes the site holding this month's free Pulse so another site can use it (key allowed to add sites and start Pulses); `--check <id>` also starts a Pulse on that quick check's site |
|
|
38
38
|
| `lockpick pulse <project>` | Starts a Pulse (a recheck of the latest one when possible) and waits for the result |
|
|
39
|
-
| `lockpick recheck <site>` | A full recheck: a new Pulse that uses one
|
|
39
|
+
| `lockpick recheck <site>` | A full recheck: a new Pulse that uses one Pulse scan from the allowance, then waits for it |
|
|
40
40
|
| `lockpick recheck <runId> --dns <id>` | Free: reads the public DNS records behind one DNS finding again; never contacts the site and never changes the grade |
|
|
41
41
|
| `lockpick deps <site>` | Sends this folder's package names and exact versions (never code) to a site and lists the advisories that affect them (key allowed to add sites); `--dry-run` shows what would be sent, `--forget` removes the list |
|
|
42
42
|
| `lockpick verify <site>` | Verifies you own a site once: the site's value and where to publish it (`--method dns`, `file` or `meta`); `--wait` looks for it for about five minutes |
|
|
43
43
|
| `lockpick deep verify <site>` | The same proof, under `deep` |
|
|
44
44
|
| `lockpick deep check <site> <id>` | Looks once for the published proof; each check uses one of its attempts |
|
|
45
45
|
| `lockpick deep prepare <site> <id>` | Prepares a Deep scan with a verified proof and opens its approval page; nothing starts until you approve |
|
|
46
|
-
| `lockpick deep start <operationId>` | Starts the Deep scan you approved (one
|
|
46
|
+
| `lockpick deep start <operationId>` | Starts the Deep scan you approved (one Deep scan from the allowance) and waits for it |
|
|
47
47
|
| `lockpick findings <runId>` | Findings that need attention (`--all` for informational ones) |
|
|
48
48
|
| `lockpick finding <runId> <findingId>` | One finding with its evidence |
|
|
49
49
|
| `lockpick brief <runId>` | One brief that fixes everything needing attention (`--finding <id>` for one finding, `--agent <name>` to tailor it, `--out brief.md` to save it) |
|
|
@@ -66,7 +66,7 @@ Text from scanned sites and saved briefs can carry terminal escape sequences. Th
|
|
|
66
66
|
|
|
67
67
|
`pulse` and a full `recheck` started in a project folder with a lockfile ask once whether to send its package names and versions, and remember the answer for that folder (in the CLI's config folder, never in the project). `--lockfile` sends them for one run and `--no-lockfile` skips them; a script with no remembered answer never sends. Lockpick reads `package-lock.json`, `npm-shrinkwrap.json`, `pnpm-lock.yaml`, `yarn.lock`, `requirements.txt` (pinned lines only) and `poetry.lock` in the folder itself, not its subfolders.
|
|
68
68
|
|
|
69
|
-
Each Pulse, and each full recheck, uses one of your account's
|
|
69
|
+
Each Pulse, and each full recheck, uses one of your account's Pulse scans, the same as starting it in the web app. A quick check and the DNS check again are free; quick checks are limited per account each hour and day.
|
|
70
70
|
|
|
71
71
|
## Coding agents (MCP)
|
|
72
72
|
|
|
@@ -94,3 +94,31 @@ Agents set up for CLI 0.2.0 keep working: `lockpick_list_projects`, `lockpick_pr
|
|
|
94
94
|
| `LOCKPICK_ACTION_REF` | The GitHub Action `ci init --action` refers to |
|
|
95
95
|
|
|
96
96
|
Requires Node.js 20.9 or later.
|
|
97
|
+
|
|
98
|
+
## Check an assessment during development
|
|
99
|
+
|
|
100
|
+
After deploying your repair and running an authorized scan, evaluate its exact run id:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
lockpick ci check run_123 --fail-on high --max-age-hours 24 --min-coverage 80 --json
|
|
104
|
+
lockpick report run_123 --out assessment.md
|
|
105
|
+
lockpick report run_123 --json --out assessment.json
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
These commands read existing results and consume no scan allowance. `ci check` defaults to `--fail-on high`; freshness and coverage requirements are optional. It exits 3 for an unfinished/unsuccessful run or unmet freshness/coverage, 8 for findings at the severity threshold, and 0 when the selected policy passes. Missing or future completion timestamps fail a freshness requirement; unknown coverage fails any explicit coverage requirement, including zero. JSON includes the policy, reasons and public run data. This checks the recorded deployment, not your current local code or commit.
|
|
109
|
+
|
|
110
|
+
`report` exports all public findings, including passing and unknown checks, with coverage limitations. Markdown labels finding content as untrusted data; JSON contains the public run and finding projections. Active runs must finish before export; failed and incomplete reports retain their status. `--out` refuses existing paths and requests mode 0600 on Unix; Windows uses the destination folder’s inherited ACLs. Without it, the report goes to stdout. A successful export says nothing about whether the assessment passed a policy.
|
|
111
|
+
|
|
112
|
+
The same policy is available through local and hosted MCP as `lockpick_evaluate_scan`:
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"scanId": "run_123",
|
|
117
|
+
"failOn": "high",
|
|
118
|
+
"maxAgeHours": 24,
|
|
119
|
+
"minCoverage": 80,
|
|
120
|
+
"format": "json"
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
It uses read permission, reads the existing scan once, and returns `passed`, `exitCode`, `policy`, `reasons` and the public run in the standard `{ data, error }` envelope. Policy failures are normal results (`passed: false`), while authorization and transport failures remain errors. The evaluator is shared with `ci check`; no scans start and no scan allowance is consumed. For report content, read `lockpick://scans/{scanId}/report` and follow any findings pagination. Saving that content is the calling client's responsibility.
|