lockpicks 0.5.0 → 0.7.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/LICENSE +12 -0
- package/README.md +67 -0
- package/THIRD-PARTY-NOTICES.txt +3823 -0
- package/dist/local/safe-io-darwin-arm64.node +0 -0
- package/dist/local/safe-io-darwin-arm64.provenance.json +37 -0
- package/dist/local/safe-io-darwin-x64.node +0 -0
- package/dist/local/safe-io-darwin-x64.provenance.json +37 -0
- package/dist/local/safe-io-linux-arm64.node +0 -0
- package/dist/local/safe-io-linux-arm64.provenance.json +35 -0
- package/dist/local/safe-io-linux-x64.node +0 -0
- package/dist/local/safe-io-linux-x64.provenance.json +35 -0
- package/dist/local/scan-worker.mjs +93318 -0
- package/dist/lockpick.mjs +96493 -24209
- package/package.json +5 -21
package/LICENSE
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Copyright (c) 2026 Lockpick. All rights reserved.
|
|
2
|
+
|
|
3
|
+
The Lockpick CLI and its deterministic Deep Local scanner are proprietary
|
|
4
|
+
software. Their availability through a public package registry does not grant
|
|
5
|
+
an open-source license. Use is subject to the applicable Lockpick service
|
|
6
|
+
terms and entitlement. No right to redistribute Lockpick's proprietary code
|
|
7
|
+
is granted by this notice.
|
|
8
|
+
|
|
9
|
+
Third-party components retain their respective licenses. Their required
|
|
10
|
+
copyright notices and license texts are included in THIRD-PARTY-NOTICES.txt
|
|
11
|
+
or in the separately installed dependency packages. This proprietary notice
|
|
12
|
+
does not restrict rights granted by those third-party licenses.
|
package/README.md
CHANGED
|
@@ -86,6 +86,7 @@ Agents set up for CLI 0.2.0 keep working: `lockpick_list_projects`, `lockpick_pr
|
|
|
86
86
|
| Variable | Use |
|
|
87
87
|
| --------------------- | ---------------------------------------------------------- |
|
|
88
88
|
| `LOCKPICK_HOST` | The Lockpick URL, instead of `--host` or your last login |
|
|
89
|
+
| `LOCKPICK_LANG` | The language of the text the CLI prints (see below) |
|
|
89
90
|
| `LOCKPICK_KEY` | A key to use without logging in (CI) |
|
|
90
91
|
| `LOCKPICK_CONFIG_DIR` | Where the config file lives (default `~/.config/lockpick`) |
|
|
91
92
|
| `LOCKPICK_KEYCHAIN=0` | Skip the OS keychain and use the config file |
|
|
@@ -93,6 +94,12 @@ Agents set up for CLI 0.2.0 keep working: `lockpick_list_projects`, `lockpick_pr
|
|
|
93
94
|
| `FORCE_COLOR=1` | Colour even when output is not a terminal (CI logs) |
|
|
94
95
|
| `LOCKPICK_ACTION_REF` | The GitHub Action `ci init --action` refers to |
|
|
95
96
|
|
|
97
|
+
### Language
|
|
98
|
+
|
|
99
|
+
The CLI prints in English, Japanese (`ja`), Korean (`ko`), French (`fr`), Spanish (`es`), German (`de`) or Brazilian Portuguese (`pt-BR`). Precedence: `--lang <code>` (or `--lang=<code>`, anywhere on the command line), then `LOCKPICK_LANG`, then `LC_ALL`, `LC_MESSAGES` and `LANG`, else English. The first one that is set decides; POSIX values such as `ja_JP.UTF-8` are read, `pt-PT` means `pt-BR`, and a set value that is not one of these languages (or `C`/`POSIX`) prints English.
|
|
100
|
+
|
|
101
|
+
The language changes human text only. With `--json`, keys, `code` and `errorCode` fields, statuses, severities, ids, data values from Lockpick, and exit codes are identical in every language; only human-readable fields (such as `error`, and the text of checks) follow the chosen language. Command names, flags, and every value that came from a scan or a site are never translated, and the workflow YAML that `ci init` writes stays in English. The CLI sends the same language to Lockpick as `Accept-Language`, so messages from the server come back in it too.
|
|
102
|
+
|
|
96
103
|
Requires Node.js 20.9 or later.
|
|
97
104
|
|
|
98
105
|
## Check an assessment during development
|
|
@@ -122,3 +129,63 @@ The same policy is available through local and hosted MCP as `lockpick_evaluate_
|
|
|
122
129
|
```
|
|
123
130
|
|
|
124
131
|
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.
|
|
132
|
+
|
|
133
|
+
## Deep Local (candidate; rollout controlled)
|
|
134
|
+
|
|
135
|
+
`lockpick deep local` runs deterministic checks on your computer after the API confirms project access and a Deep, Master Key or valid early-access entitlement. Local runs do not consume hosted scan credits. Request the separate permission with `lockpick login --local`.
|
|
136
|
+
|
|
137
|
+
```sh
|
|
138
|
+
lockpick deep local /absolute/repository --project <project-id> --json
|
|
139
|
+
lockpick deep local /absolute/repository --project <project-id> --browser-artifacts .next/static --env-file .env.local --fail-on high
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
A project-bound CI key supplies its own project when `--project` is omitted. Personal keys require an explicit project.
|
|
143
|
+
|
|
144
|
+
`lockpick whoami` and `/api/cli/v1/me` report every granted permission, including `local`. The canonical hosted agent identity reports hosted permissions only, keeping older clients compatible when a key also grants local scanning. This response filtering does not change the key's authority or the fresh local admission check.
|
|
145
|
+
|
|
146
|
+
Launch a trusted installed CLI from outside an untrusted repository. Supply the physical absolute path of the selected root, with no symlink components; `pwd -P` in a trusted terminal at that location shows the physical path. The scanner does not resolve root symlinks automatically. Browser artifact directories and explicit environment files are relative to the selected root and may be repeated. The scanner never runs a build, target script or credential-validity request. Source and findings stay local; the admission request contains only versions and check IDs.
|
|
147
|
+
|
|
148
|
+
Reports describe current tracked working-tree bytes, including unstaged changes. Explicit environment files can add untracked inputs. They do not prove production exposure or credential validity. JSON contains the same coverage and findings as terminal output; no source excerpts or secret values are returned. Missing, unsupported or incomplete checks stay explicit. Exit 3 means required coverage is incomplete; exit 8 means completed findings met an explicitly selected `--fail-on` threshold. Without that flag, findings alone do not change a completed run's exit code.
|
|
149
|
+
|
|
150
|
+
Public-variable checks ignore comments, unrelated strings and arbitrary objects. Supported `process.env`/`import.meta.env` assignments and exported Next.js `env` configuration are parsed without executing configuration. Multiline dotenv text is kept inside its original value. Dynamic values, custom Vite configuration and unsupported syntax stay incomplete. Reports include sanitized explicit input paths, source inventory format/status, root framework context and migration order; exclusions are reported per check. An interrupted scan marks unknown inspection progress explicitly.
|
|
151
|
+
|
|
152
|
+
This candidate implements current secrets, parsed dotenv and JS/TS public assignments for root-declared Next.js/Vite projects, explicitly supplied browser assets, and embedded source in `.map` files selected with `--source-maps`. Map findings identify the map container at line 1 and the exact embedded source line/UTF-16 column and index. Source names are sanitized; absolute paths and URLs receive an index label. Maps without embedded content are not applicable; malformed maps, unsupported external sections and missing map inputs are explicit incomplete results. Inline data maps remain unsupported. Add `supabase-client` or `actions-injection` to `--checks` for the implemented AST-based source checks. Supabase resolves exact imports and immutable literals or explicitly supplied env declarations; unresolved origin/browser context becomes a review item. The workflow rule covers direct attacker-controlled event interpolation in supported Bash/sh blocks and records unsupported parser/shell/flow context. Neither rule executes source. Docker ARG/ENV scanning is implemented via `docker-values`, with literal credentials separated from sensitive-name review items. Supply repeatable `--dockerfile` paths and matching `--build-context` paths (in the same order, `.` for the root) to add explicit-context `docker-files` checks. Applicable ignore rules and COPY stage locations are inspected without building an image; unsupported syntax and unresolved contexts stay incomplete. Context candidates cover sensitive filenames and credentials already detected by selected source checks. Untracked candidate contents stay unread unless supplied with `--env-file`; name-only cases are review items with unresolved context. Add `supabase-migrations` to inspect tracked `supabase/migrations/*.sql` in filename order, or repeat `--migration-file` to supply an explicit ordered set. Missing RLS and clearly permissive policies are source-level review items, with table/policy/role context; no SQL executes and no database exposure is claimed. Partial history, dynamic SQL and unsupported statements remain explicit. The embedded PostgreSQL parser is bounded and requires no download. Use `--history` to inspect at most 200 commits reachable from the pinned HEAD. Loose and packed SHA-1/SHA-256 objects are read locally without invoking Git or fetching anything. Historical credentials retain commit/path evidence and rotation guidance. Shallow history, missing/oversized objects, unsupported metadata and limits remain incomplete. Other branch tips, reflogs and unreachable objects are outside this scope. Platform/native packaging and staging verification are still in progress; public API admission remains disabled for the candidate. The candidate reader supports local APFS on macOS and ext-family/tmpfs on Linux, with x64/ARM64 native readers. Windows local scans and network/FUSE/overlay filesystems remain explicitly unsupported. Tracked-file inventory supports Git index v2/v3/v4; validated linked worktrees use their own index/HEAD and bounded common Git metadata. Split/sparse indexes and unsafe metadata pointers remain unsupported. Root and source symlinks are refused. This section is not an announcement that the scanner is live.
|
|
153
|
+
|
|
154
|
+
Local MCP scanning is explicitly enabled with `lockpick mcp --local-root /absolute/repository`; repeat the flag for additional permitted roots. For generated client configuration, use `lockpick mcp config <client> --local-root /absolute/repository` (and `--apply` to install it). This cannot be combined with `--hosted`. The default MCP configuration does not expose `lockpick_scan_local`.
|
|
155
|
+
|
|
156
|
+
The local tool takes a project ID, an absolute repository path within a configured root, check IDs and the same explicit relative inputs as the CLI. It uses the same admission/worker coordinator, rechecks authorization on every call, permits one local scan at a time and forwards cancellation to the worker. Results are not uploaded to Lockpick, but the calling MCP agent or model can see the redacted findings and paths. Do not enable local MCP if that disclosure is inappropriate for the repository.
|
|
157
|
+
|
|
158
|
+
### Project dismissal policies (0.7.0)
|
|
159
|
+
|
|
160
|
+
Pull a policy using a project manager account with the sites scope:
|
|
161
|
+
|
|
162
|
+
```sh
|
|
163
|
+
lockpick dismissals --project <project-id> --file .lockpick-dismissals.json
|
|
164
|
+
lockpick deep local ./project --project <project-id> --dismissals .lockpick-dismissals.json
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Pull refuses to overwrite a file. Add local finding identities, categories and
|
|
168
|
+
reasons to the version-1 policy, then explicitly sync metadata with
|
|
169
|
+
`lockpick dismissals --project <project-id> --file .lockpick-dismissals.json --push`.
|
|
170
|
+
Sync does not upload source files or local reports. Review reasons before
|
|
171
|
+
committing a policy: they are free text and may contain private details.
|
|
172
|
+
|
|
173
|
+
The file contains `version`, `projectId` and `dismissals`. Each entry contains
|
|
174
|
+
`fingerprint`, `codeHash`, `ruleVersion`, `severity`, `category`, `reason`,
|
|
175
|
+
`dismissedAt` and `dismissedBy`. Unknown fields and duplicate fingerprints are
|
|
176
|
+
rejected. Import records the authenticated importer as actor. Legacy marks
|
|
177
|
+
without identity/version/reason metadata cannot be exported as durable policies.
|
|
178
|
+
Use report identities to create local entries; never copy source into this file.
|
|
179
|
+
Categories: `false_positive`, `accepted_risk`, `mitigated_elsewhere`,
|
|
180
|
+
`intentionally_public`, `third_party`. Changed code hashes, rule versions or
|
|
181
|
+
severity reopen findings with the original reason. Accepted findings do not fail
|
|
182
|
+
local severity gates; incomplete coverage still fails its existing gate.
|
|
183
|
+
|
|
184
|
+
Hosted reports show adjusted scores and separate accepted findings. Deep Local
|
|
185
|
+
has its own deterministic coverage and no fabricated hosted numeric score.
|
|
186
|
+
Online admission still occurs; local source and reports stay local.
|
|
187
|
+
|
|
188
|
+
A policy is an explicit snapshot. Pull a fresh file after dashboard edits or undo,
|
|
189
|
+
and review it before the next local run. Push upserts the listed entries; it
|
|
190
|
+
does not delete dashboard dismissals absent from the file. Use project settings
|
|
191
|
+
to undo a stored dismissal.
|