@brokkai/slopcop 0.0.17 → 0.0.19
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 +98 -32
- package/native/darwin_amd64/slopcop +0 -0
- package/native/darwin_arm64/slopcop +0 -0
- package/native/linux_amd64/slopcop +0 -0
- package/native/linux_arm64/slopcop +0 -0
- package/native/windows_amd64/slopcop.exe +0 -0
- package/native/windows_arm64/slopcop.exe +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -164,20 +164,23 @@ The binary carries two agent skills. `slopcop` teaches a coding agent how
|
|
|
164
164
|
to check a change. `slopcop-audit` audits code that has already landed: it
|
|
165
165
|
splits a commit range into module slices and checks them in parallel with
|
|
166
166
|
hosted checks, then triages the findings into a fix plan. The binary also
|
|
167
|
-
carries
|
|
168
|
-
|
|
169
|
-
directories below and names what it did:
|
|
167
|
+
carries automatic check and push-gate hooks for Claude Code, Codex and Grok.
|
|
168
|
+
Run `slopcop init` once for the machine. It installs both skills into the
|
|
169
|
+
user-level directories below and names what it did:
|
|
170
170
|
|
|
171
171
|
| Location | Harness |
|
|
172
172
|
| --- | --- |
|
|
173
|
-
|
|
|
174
|
-
|
|
|
173
|
+
| `~/.agents/skills/slopcop/`, `~/.agents/skills/slopcop-audit/` | Codex, Grok and other agents |
|
|
174
|
+
| `~/.claude/skills/slopcop/`, `~/.claude/skills/slopcop-audit/` | Claude Code and other agents |
|
|
175
175
|
|
|
176
|
-
|
|
177
|
-
|
|
176
|
+
It leaves tracked files alone. A command run inside a checkout also removes
|
|
177
|
+
the hooks, skills and `.git/info/exclude` entries written by the earlier
|
|
178
|
+
per-repository releases. Other existing checkouts migrate themselves the first
|
|
179
|
+
time their old hook runs the upgraded binary, so setup does not have to be
|
|
180
|
+
repeated repository by repository.
|
|
178
181
|
|
|
179
182
|
A skill that is already there is left alone by init, so running it again is
|
|
180
|
-
safe. A check updates copies already
|
|
183
|
+
safe. A check updates copies already installed, but creates none; login
|
|
181
184
|
does not install the skill. An existing copy is rewritten when it differs from
|
|
182
185
|
the skill bundled into the binary, so an agent follows the instructions of the
|
|
183
186
|
slopcop version it runs. Each install records the version that wrote it, and
|
|
@@ -197,25 +200,25 @@ notice says where. A check's `json` and `sarif` reports carry the same update
|
|
|
197
200
|
(see below). `slopcop init --no-skill` skips the install and any update of
|
|
198
201
|
it.
|
|
199
202
|
|
|
200
|
-
Init also adds a static-only `Stop` hook
|
|
201
|
-
leaves everything else in
|
|
203
|
+
Init also adds a static-only `Stop` hook and a `PreToolUse` push gate for
|
|
204
|
+
Claude Code, Codex and Grok, and leaves everything else in each file as it was:
|
|
202
205
|
|
|
203
206
|
| File | Harness |
|
|
204
207
|
| --- | --- |
|
|
205
|
-
|
|
|
206
|
-
|
|
|
208
|
+
| `settings.json` under `CLAUDE_CONFIG_DIR`, or `~/.claude` | Claude Code |
|
|
209
|
+
| `hooks.json` under `CODEX_HOME`, or `~/.codex` | Codex |
|
|
210
|
+
| `hooks/slopcop.json` under `GROK_HOME`, or `~/.grok` | Grok |
|
|
207
211
|
|
|
208
|
-
The
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
212
|
+
The push gate blocks `git push`, `gh pr create`, and the GitHub MCP tools that
|
|
213
|
+
push files or open a pull request until HEAD's tree has a passing check or
|
|
214
|
+
valid override. It is installed machine-wide but only enforces a repository
|
|
215
|
+
after SlopCop has created review state there. A repository that has never been
|
|
216
|
+
checked is left alone.
|
|
213
217
|
|
|
214
|
-
Codex
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
same from one release to the next, so an update does not ask for it again.
|
|
218
|
+
Codex runs a new or changed user-level hook only once you trust it: open Codex
|
|
219
|
+
and review it with `/hooks`. Init never writes that trust itself. The hook
|
|
220
|
+
stays the same from one release to the next, so an update does not ask for it
|
|
221
|
+
again.
|
|
219
222
|
|
|
220
223
|
When the agent stops, the hook checks the working tree through the same
|
|
221
224
|
hosted API, but only when all of these hold:
|
|
@@ -276,9 +279,9 @@ put `slopcop` on `PATH`, and each user still signs in.
|
|
|
276
279
|
`managed-settings.d/`): a `Stop` group with `"type": "command"`,
|
|
277
280
|
`"command": "slopcop hook claude || true"`, `"timeout": 720` and
|
|
278
281
|
`"statusMessage": "Checking the change with SlopCop"`. Under
|
|
279
|
-
`allowManagedHooksOnly` the hooks init writes to
|
|
280
|
-
|
|
281
|
-
|
|
282
|
+
`allowManagedHooksOnly` the user-level hooks init writes to
|
|
283
|
+
`settings.json`, the push gate included, are blocked, so the managed hook is
|
|
284
|
+
the only one that runs. Claude Code runs
|
|
282
285
|
an identical handler from several settings files once.
|
|
283
286
|
- **Codex:** define the `Stop` hook under `[hooks]` in the managed
|
|
284
287
|
`requirements.toml` (`command = "slopcop hook codex || true"`,
|
|
@@ -459,24 +462,60 @@ similarity, pass `--policy-id slopcop.similarity`.
|
|
|
459
462
|
For this check, function source from the change is sent to third-party
|
|
460
463
|
embedding and model providers used by the hosted service.
|
|
461
464
|
|
|
465
|
+
A finding of the hosted `slopcop.dependencies.known-vulnerability` check is a
|
|
466
|
+
known-vulnerable dependency version the change brings in. Its location is the
|
|
467
|
+
lockfile entry, and the report adds the package, how it is installed and the
|
|
468
|
+
fix:
|
|
469
|
+
|
|
470
|
+
```text
|
|
471
|
+
[error] slopcop.dependencies.known-vulnerability: lodash 4.17.20 has a known vulnerability
|
|
472
|
+
Location: package-lock.json:12
|
|
473
|
+
Certainty: definite
|
|
474
|
+
ID: 6b1f0c0e-0000-4000-8000-000000000003
|
|
475
|
+
Package: npm lodash@4.17.20, direct, from package.json
|
|
476
|
+
Advisory: GHSA-29mw-wpgm-hmr9 (CVE-2020-28500) https://osv.dev/vulnerability/GHSA-29mw-wpgm-hmr9
|
|
477
|
+
Fixed in: 4.17.21
|
|
478
|
+
Fix: npm install lodash@4.17.21 --save-exact (run at the repository root)
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
A transitive dependency adds a `Via:` line, from the direct dependency down
|
|
482
|
+
to the package. `json` passes the same fields through as the finding's
|
|
483
|
+
`dependency` object, and `sarif` puts it in the result's
|
|
484
|
+
`slopcop.dependency` property. The client never reads lockfiles or asks an
|
|
485
|
+
advisory database itself, and drops a `dependency` object that is malformed,
|
|
486
|
+
oversized or unsafe to print, keeping the finding. `slopcop ignore` takes the
|
|
487
|
+
finding's id like any other.
|
|
488
|
+
|
|
462
489
|
### Modes and local review
|
|
463
490
|
|
|
464
491
|
`slopcop check` runs hosted static analysis and local LLM review concurrently
|
|
465
492
|
by default. Use `--mode static` or `--static` for only the hosted check; use
|
|
466
493
|
`--mode ai` or `--ai` for only local review. A single captured snapshot
|
|
467
494
|
includes committed, uncommitted, and untracked work, except ignored files.
|
|
468
|
-
Reviewers read
|
|
495
|
+
Reviewers read the captured diff after the same large-data filter used for
|
|
496
|
+
the hosted patch. The full snapshot still identifies the tree approved for push.
|
|
469
497
|
|
|
470
498
|
Reviewers, in priority order, are GPT Terra (`terra`) and GPT Sol (`sol`) through
|
|
471
499
|
Codex ACP, DeepSeek Flash (`flash`) through dsh ACP, and Claude Haiku (`haiku`)
|
|
472
500
|
through Claude ACP. Each uses the newest model of its family at high effort.
|
|
473
501
|
`slopcop init` probes each family once when reviewers are not configured and
|
|
474
|
-
mode is not static, then saves the first two that work (or one)
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
502
|
+
mode is not static, then saves the first two that work (or one) as reviewers
|
|
503
|
+
and the rest that work as `review.fallbacks`. Configured reviewers are left
|
|
504
|
+
alone; unset `review.reviewers` and run init to pick again.
|
|
505
|
+
`slopcop init --no-reviewers` skips probing. A reviewer that cannot start does
|
|
506
|
+
not stop the others. One that ends without a verdict runs once more in a fresh
|
|
507
|
+
session; if it still fails, the next unused fallback stands in for it,
|
|
508
|
+
preferring another provider. The review is clean when at least
|
|
509
|
+
`review.minCompleted` reviewers (default 2, at most the number of reviewers)
|
|
510
|
+
finished clean, and fails with exit `2` when fewer did. Findings from any
|
|
511
|
+
reviewer count. The minimum only tolerates a failure when more reviewers can
|
|
512
|
+
run than it requires, so configure fallbacks on another provider than the
|
|
513
|
+
reviewers: one outage or empty account then cannot fail every check. Set the
|
|
514
|
+
ordered list (1–4
|
|
478
515
|
entries; duplicates allowed) with `slopcop config set review.reviewers terra,sol`.
|
|
479
|
-
Set `review.
|
|
516
|
+
Set `review.fallbacks` (ordered, like `review.reviewers`), `review.timeout`
|
|
517
|
+
(default `20m`), `review.minCompleted` (1 up to the number of reviewers) or
|
|
518
|
+
`mode` with `slopcop config set`;
|
|
480
519
|
adapter commands are under `review.adapters.<codex|dsh|claude>.command`.
|
|
481
520
|
The prompt carries the captured diff. Reviewers read repository content,
|
|
482
521
|
which is untrusted. Claude and DeepSeek reviewers may only read and search
|
|
@@ -504,6 +543,27 @@ files, deletions, renames, mode changes, and binary content. Git-ignored files
|
|
|
504
543
|
stay out, except selected `.slopcop/policies` rules, which must travel because
|
|
505
544
|
the service evaluates them from the patched checkout.
|
|
506
545
|
|
|
546
|
+
By default, changed JSON data (`.json`, `.jsonl`, `.ndjson`, case-insensitive)
|
|
547
|
+
and Git-detected binary files are omitted when either the base or captured
|
|
548
|
+
version exceeds **500,000 bytes (0.5 MB)**. Source files and smaller JSON
|
|
549
|
+
configurations remain in scope. The filter runs before generating the upload
|
|
550
|
+
or local review diff, covers deletions and both sides of renames, and never
|
|
551
|
+
changes your files or index. Every report discloses omitted files: human output
|
|
552
|
+
names each path with its size and reason, JSON carries `omittedFiles`, and SARIF
|
|
553
|
+
carries `slopcop.omittedFiles`. Their contents were not analyzed; a passing
|
|
554
|
+
result covers the retained scope. If every change is omitted, the check is
|
|
555
|
+
`skipped`, sends nothing, and records no push approval.
|
|
556
|
+
|
|
557
|
+
Use repeatable `--include` paths or globs to opt particular data files back in:
|
|
558
|
+
|
|
559
|
+
```console
|
|
560
|
+
slopcop check --include config/settings.json --include 'models/**/*.json'
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
Patterns are relative to the repository root; quote globs so the shell does
|
|
564
|
+
not expand them. They only override the size filter and do not exclude other
|
|
565
|
+
changed source files. Service payload limits still apply to the resulting patch.
|
|
566
|
+
|
|
507
567
|
A check run by a Claude Code, Codex or OpenCode agent also sends which models wrote the
|
|
508
568
|
change, so the service can tie each finding to the model that wrote its file.
|
|
509
569
|
The CLI finds the agent's session from its environment and reads that
|
|
@@ -530,7 +590,13 @@ decides a check. `--verbose` prints it.
|
|
|
530
590
|
|
|
531
591
|
The service owns the limits on what a check accepts. When a change is too
|
|
532
592
|
large or touches too many files, the service's `payload_too_large` response is
|
|
533
|
-
printed verbatim
|
|
593
|
+
printed verbatim, and so is `repository_too_large` when the repository itself is
|
|
594
|
+
over the service's size limit; the CLI does not impose its own limits. The
|
|
595
|
+
service names no paths, so when it refuses a repository as too large, or answers
|
|
596
|
+
that its checkout is near the limit (`repositorySize.nearLimit`), the CLI lists
|
|
597
|
+
the base tree's largest paths itself, after what `.bifrostignore` and `[check]
|
|
598
|
+
exclude` already leave out, with a `[check] exclude` snippet to keep the
|
|
599
|
+
generated or data paths among them out of checks.
|
|
534
600
|
|
|
535
601
|
Every check with a static half also runs the hosted catalog. Rules under
|
|
536
602
|
`.slopcop/policies/**/*.rqlp` are added automatically unless
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|