repopilot 0.11.0 → 0.13.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 +109 -354
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -7,102 +7,46 @@
|
|
|
7
7
|
[](LICENSE)
|
|
8
8
|
[](https://github.com/MykytaStel/repopilot)
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
and ship safer changes without sending source code to a hosted scanner.
|
|
10
|
+
**Local-first repository audits for safer human and AI-assisted code changes.**
|
|
12
11
|
|
|
13
|
-
RepoPilot is a
|
|
14
|
-
and framework health checks. It gives developers useful terminal reports, CI gates,
|
|
15
|
-
SARIF for GitHub Code Scanning, and Markdown briefs that can be pasted into Claude
|
|
16
|
-
Code, ChatGPT, Cursor, or another coding assistant.
|
|
12
|
+
RepoPilot is a fast Rust CLI that scans a repository locally, ranks evidence-backed risks, supports baseline adoption, reviews branches, and creates AI-ready remediation context without uploading source code.
|
|
17
13
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
filters, and tightens the `doctor -> scan/review -> ai context -> CI gate` loop
|
|
21
|
-
while keeping all scans local.
|
|
22
|
-
|
|
23
|
-
## Why RepoPilot?
|
|
24
|
-
|
|
25
|
-
Most linters and audit tools stop at the terminal. RepoPilot bridges the gap to your AI assistant:
|
|
26
|
-
|
|
27
|
-
| | SonarQube / CodeClimate | ESLint / language linters | **RepoPilot** |
|
|
28
|
-
|---|---|---|---|
|
|
29
|
-
| Runs offline | ❌ | ✅ | ✅ |
|
|
30
|
-
| No code upload | ❌ | ✅ | ✅ |
|
|
31
|
-
| Cross-language architecture analysis | ✅ | ❌ | ✅ |
|
|
32
|
-
| LLM-ready output | ❌ | ❌ | ✅ |
|
|
33
|
-
| Fits in a model context window | ❌ | ❌ | ✅ |
|
|
34
|
-
| CI gate on new findings only | ✅ | partial | ✅ |
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
repopilot ai context . | pbcopy # macOS: paste into your coding assistant
|
|
14
|
+
```text
|
|
15
|
+
scan -> review risk -> baseline adoption -> CI evidence -> local AI context
|
|
38
16
|
```
|
|
39
17
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
- Repository scanning for projects, folders, and individual files
|
|
43
|
-
- Gitignore-aware walking with built-in ignores for common build, cache, vendor, and native platform directories
|
|
44
|
-
- Architecture findings: oversized files, deep nesting, deep relative imports, risky barrel files, too many modules per directory
|
|
45
|
-
- Coupling analysis: excessive fan-out, high-instability hubs, circular dependencies
|
|
46
|
-
- Code quality findings: cyclomatic complexity density, long functions, TODO/FIXME/HACK markers
|
|
47
|
-
- Security findings: hardcoded secret candidates, committed private keys, committed `.env` files
|
|
48
|
-
- Testing findings: missing test folder, source files without test counterparts
|
|
49
|
-
- Framework findings for JavaScript, React, React Native, Expo, and Django projects
|
|
50
|
-
- React Native architecture profile: project kind, New Architecture, Hermes, Codegen, platform mismatch, and package manager signals
|
|
51
|
-
- Workspace scanning (`--workspace`) for npm, yarn, pnpm, and Cargo workspaces with per-package risk summary — parallel per-package scans
|
|
52
|
-
- Evidence-backed findings with stable rule IDs, severity, file paths, line numbers, and snippets
|
|
53
|
-
- 46 built-in rules with titles, descriptions, recommendations, and docs links
|
|
54
|
-
- `repopilot.toml` configuration generated by `repopilot init`
|
|
55
|
-
- Configuration presets (`--preset strict|balanced|lenient`) for quick threshold tuning
|
|
56
|
-
- Baseline workflow for accepting existing findings in legacy repositories
|
|
57
|
-
- CI-friendly failure thresholds with `--fail-on`
|
|
58
|
-
- Git diff-aware review mode for prioritizing findings introduced by changed lines
|
|
59
|
-
- Doctor adoption guidance for config, baseline, CI gate, report, and receipt readiness
|
|
60
|
-
- Audit receipt JSON from `repopilot scan --receipt` for reproducible scan evidence
|
|
61
|
-
- Console, JSON, Markdown, HTML, and SARIF (2.1.0) scan output — SARIF includes per-result category and workspace package properties
|
|
62
|
-
- First-party GitHub Action wrapper for `scan`, `review`, `compare`, and `ai` workflows, with optional SARIF upload and receipt output for scans
|
|
63
|
-
- Compare mode for diffing two JSON scan reports
|
|
64
|
-
- **`repopilot ai context`** — formats scan output as LLM-ready markdown, paste into Claude Code or ChatGPT to start remediating
|
|
65
|
-
- **`repopilot ai plan`** — turns findings into a prioritized remediation plan
|
|
66
|
-
- **`repopilot ai prompt`** — exports an AI-ready remediation prompt with RepoPilot context
|
|
67
|
-
|
|
68
|
-
See [docs/rulesets.md](docs/rulesets.md) for the full list of rules and severity levels.
|
|
18
|
+
RepoPilot is not a replacement for language linters, formatters, type checkers, or dedicated security scanners. It complements them with repository-level evidence: secrets, runtime footguns, architecture risk, review blast radius, baseline status, and report formats that work in CI.
|
|
69
19
|
|
|
70
20
|
## Install
|
|
71
21
|
|
|
22
|
+
Choose one install method.
|
|
23
|
+
|
|
24
|
+
Cargo:
|
|
25
|
+
|
|
72
26
|
```bash
|
|
73
27
|
cargo install repopilot
|
|
74
28
|
```
|
|
75
29
|
|
|
76
|
-
|
|
30
|
+
npm:
|
|
77
31
|
|
|
78
32
|
```bash
|
|
79
33
|
npm install -g repopilot
|
|
80
34
|
```
|
|
81
35
|
|
|
82
|
-
|
|
36
|
+
Homebrew:
|
|
83
37
|
|
|
84
38
|
```bash
|
|
85
39
|
brew tap mykytastel/repopilot
|
|
86
40
|
brew install repopilot
|
|
87
41
|
```
|
|
88
42
|
|
|
89
|
-
|
|
43
|
+
Installer:
|
|
90
44
|
|
|
91
45
|
```bash
|
|
92
46
|
curl -fsSL https://raw.githubusercontent.com/MykytaStel/repopilot/main/install.sh | bash
|
|
93
47
|
```
|
|
94
48
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
Upgrade:
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
cargo install repopilot --force
|
|
101
|
-
npm update -g repopilot
|
|
102
|
-
brew update && brew upgrade repopilot
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Build from source:
|
|
49
|
+
From source:
|
|
106
50
|
|
|
107
51
|
```bash
|
|
108
52
|
git clone https://github.com/MykytaStel/repopilot.git
|
|
@@ -110,377 +54,188 @@ cd repopilot
|
|
|
110
54
|
cargo build --release
|
|
111
55
|
```
|
|
112
56
|
|
|
57
|
+
More: [docs/install.md](docs/install.md).
|
|
58
|
+
|
|
113
59
|
## Quick Start
|
|
114
60
|
|
|
115
|
-
|
|
61
|
+
Run a local scan:
|
|
116
62
|
|
|
117
63
|
```bash
|
|
118
64
|
repopilot scan .
|
|
65
|
+
repopilot doctor .
|
|
119
66
|
```
|
|
120
67
|
|
|
121
|
-
|
|
68
|
+
Adopt RepoPilot in an existing repository without failing CI on old debt:
|
|
122
69
|
|
|
123
70
|
```bash
|
|
124
|
-
repopilot
|
|
125
|
-
repopilot
|
|
71
|
+
repopilot baseline create . --output .repopilot/baseline.json
|
|
72
|
+
repopilot scan . --baseline .repopilot/baseline.json --fail-on new-high
|
|
126
73
|
```
|
|
127
74
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
### Going deeper
|
|
131
|
-
|
|
132
|
-
Once you want CI integration, baseline tracking, or tighter configuration:
|
|
75
|
+
Review a branch:
|
|
133
76
|
|
|
134
77
|
```bash
|
|
135
|
-
repopilot
|
|
136
|
-
repopilot doctor . # check CI / baseline readiness
|
|
137
|
-
repopilot scan . --min-priority p2 --rule security.secret-candidate
|
|
138
|
-
repopilot ai context . --focus security # prepare local AI context
|
|
139
|
-
repopilot baseline create . # accept existing findings as known debt
|
|
140
|
-
repopilot review . --base origin/main --fail-on-priority p1 # CI gate on high-priority risk
|
|
78
|
+
repopilot review . --base origin/main
|
|
141
79
|
```
|
|
142
80
|
|
|
143
|
-
|
|
81
|
+
Generate local AI context:
|
|
144
82
|
|
|
145
83
|
```bash
|
|
146
|
-
repopilot
|
|
84
|
+
repopilot ai context . --budget 4k
|
|
147
85
|
```
|
|
148
86
|
|
|
149
|
-
|
|
87
|
+
Save CI evidence:
|
|
150
88
|
|
|
151
89
|
```bash
|
|
152
|
-
repopilot scan . --
|
|
153
|
-
repopilot scan . --
|
|
154
|
-
repopilot scan . --
|
|
90
|
+
repopilot scan . --format markdown --output repopilot-report.md
|
|
91
|
+
repopilot scan . --format json --output repopilot-report.json --receipt .repopilot/receipt.json
|
|
92
|
+
repopilot scan . --format sarif --output repopilot.sarif
|
|
155
93
|
```
|
|
156
94
|
|
|
157
|
-
|
|
95
|
+
## What It Checks
|
|
158
96
|
|
|
159
|
-
|
|
97
|
+
| Area | Examples |
|
|
98
|
+
|---|---|
|
|
99
|
+
| Security | secret candidates, private keys, committed `.env` files |
|
|
100
|
+
| Runtime risk | Rust panic/unwrap paths, JavaScript/Python/Go/JVM/.NET process exits |
|
|
101
|
+
| Architecture | circular dependencies, excessive fan-out, instability hubs |
|
|
102
|
+
| Review risk | changed files, branch context, blast radius |
|
|
103
|
+
| Adoption | baselines, new-vs-existing findings, CI gates |
|
|
104
|
+
| Evidence | JSON, Markdown, SARIF, receipts, report envelopes |
|
|
105
|
+
| AI context | local, budgeted, evidence-backed Markdown for coding assistants |
|
|
160
106
|
|
|
161
|
-
|
|
162
|
-
that you decide where to paste.
|
|
107
|
+
## Trust Mode
|
|
163
108
|
|
|
164
|
-
|
|
109
|
+
Default scans are intentionally quiet. They keep high-trust security, runtime, and import-graph findings visible while summarizing broad maintainability and testing suggestions as strict-only noise.
|
|
165
110
|
|
|
166
111
|
```bash
|
|
167
|
-
|
|
168
|
-
repopilot
|
|
169
|
-
|
|
170
|
-
# Focus on security only, keep it short
|
|
171
|
-
repopilot ai context . --focus security --budget 2k
|
|
172
|
-
|
|
173
|
-
# Save to file
|
|
174
|
-
repopilot ai context . --output repopilot-context.md
|
|
175
|
-
|
|
176
|
-
# Pipe directly into clipboard (macOS)
|
|
177
|
-
repopilot ai context . --no-header | pbcopy
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
## Example Output
|
|
181
|
-
|
|
112
|
+
repopilot scan . # compact default output
|
|
113
|
+
repopilot scan . --output-style full
|
|
114
|
+
repopilot scan . --profile strict # full audit output
|
|
182
115
|
```
|
|
183
|
-
$ repopilot ai context .
|
|
184
|
-
|
|
185
|
-
# RepoPilot Vibe Check — my-app
|
|
186
116
|
|
|
187
|
-
|
|
188
|
-
**Tech Stack:** React Native (New Arch), Expo, TypeScript
|
|
189
|
-
**Size:** 94 files · 8,340 LOC · ~42k tokens
|
|
190
|
-
**Health:** 18 findings · 2.2/kloc — 4 high, 9 medium
|
|
117
|
+
Use strict mode for cleanup passes, rule development, and release hardening. Use the default profile for day-to-day local checks and CI gates.
|
|
191
118
|
|
|
192
|
-
|
|
193
|
-
1. [HIGH] Possible secret detected — `src/config/api.ts:12`
|
|
194
|
-
```
|
|
195
|
-
const API_KEY = "sk_live_…"
|
|
196
|
-
```
|
|
197
|
-
> **Fix:** Move to environment variables or a secrets manager.
|
|
119
|
+
More: [docs/trust-mode.md](docs/trust-mode.md).
|
|
198
120
|
|
|
199
|
-
##
|
|
200
|
-
1. [HIGH] Circular dependency detected — `src/store/index.ts`
|
|
201
|
-
> **Fix:** Extract shared types to a separate module to break the cycle.
|
|
121
|
+
## Core Commands
|
|
202
122
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
2. **Break circular dependency** (src/store/index.ts) — extract shared types
|
|
206
|
-
|
|
207
|
-
---
|
|
208
|
-
*~3.8k tokens (budget: 4k) · scanned in 312ms — paste into Claude Code, Cursor, or ChatGPT*
|
|
123
|
+
```text
|
|
124
|
+
scan | review | baseline | compare | doctor | inspect | ai | init | cache
|
|
209
125
|
```
|
|
210
126
|
|
|
211
|
-
|
|
212
|
-
repositories, start with one focus area instead of asking for every finding at
|
|
213
|
-
once.
|
|
214
|
-
|
|
215
|
-
## Recommended Remediation Loop
|
|
216
|
-
|
|
217
|
-
RepoPilot is a local-first safety layer for AI-assisted and vibe-coded changes. Run it after generating or refactoring code to catch newly introduced high-risk findings, workspace hotspots, missing tests, and architecture drift without uploading source code to an external service.
|
|
127
|
+
Common workflows:
|
|
218
128
|
|
|
219
129
|
```bash
|
|
220
|
-
repopilot
|
|
221
|
-
repopilot
|
|
222
|
-
repopilot
|
|
223
|
-
repopilot
|
|
224
|
-
repopilot
|
|
130
|
+
repopilot scan .
|
|
131
|
+
repopilot review . --base origin/main
|
|
132
|
+
repopilot baseline create .
|
|
133
|
+
repopilot compare before.json after.json
|
|
134
|
+
repopilot inspect rules
|
|
135
|
+
repopilot inspect eval-rules --format json
|
|
136
|
+
repopilot ai context .
|
|
225
137
|
```
|
|
226
138
|
|
|
227
|
-
|
|
139
|
+
More: [docs/commands.md](docs/commands.md) and [docs/cli.md](docs/cli.md).
|
|
228
140
|
|
|
229
|
-
|
|
230
|
-
|---------|-------|-------------|
|
|
231
|
-
| `repopilot scan <path>` | `s` | Scan a project, folder, or file for findings |
|
|
232
|
-
| `repopilot review [path]` | `r` | Review findings that touch changed Git diff lines |
|
|
233
|
-
| `repopilot ai context <path>` | — | LLM-ready context from a scan |
|
|
234
|
-
| `repopilot ai plan <path>` | — | Prioritized remediation plan |
|
|
235
|
-
| `repopilot ai prompt <path>` | — | AI-ready remediation prompt |
|
|
236
|
-
| `repopilot compare <before> <after>` | `cmp` | Compare two JSON scan reports and show what changed |
|
|
237
|
-
| `repopilot baseline create <path>` | `bl` | Scan a path and store current findings as accepted debt |
|
|
238
|
-
| `repopilot doctor [path]` | `d` | Diagnose audit readiness |
|
|
239
|
-
| `repopilot init` | — | Generate a default `repopilot.toml` configuration file |
|
|
141
|
+
## Baseline Adoption
|
|
240
142
|
|
|
241
|
-
|
|
143
|
+
A baseline records current findings as accepted existing debt. Future scans can fail only on newly introduced risk:
|
|
242
144
|
|
|
243
145
|
```bash
|
|
244
|
-
repopilot --
|
|
245
|
-
|
|
246
|
-
repopilot
|
|
247
|
-
repopilot baseline create --help
|
|
146
|
+
repopilot baseline create . --output .repopilot/baseline.json
|
|
147
|
+
git add .repopilot/baseline.json
|
|
148
|
+
repopilot scan . --baseline .repopilot/baseline.json --fail-on new-high
|
|
248
149
|
```
|
|
249
150
|
|
|
250
|
-
|
|
151
|
+
Review baseline updates like code changes. A baseline is not a suppression file; it is a CI adoption contract.
|
|
251
152
|
|
|
252
|
-
|
|
153
|
+
## Rule Quality
|
|
253
154
|
|
|
254
|
-
|
|
155
|
+
Rules move through a lifecycle:
|
|
255
156
|
|
|
256
157
|
```text
|
|
257
|
-
|
|
158
|
+
experimental -> preview -> stable
|
|
258
159
|
```
|
|
259
160
|
|
|
260
|
-
|
|
161
|
+
Before a rule becomes stable or default-visible, it should have metadata, true-positive and false-positive fixtures, stable finding IDs, concrete evidence, false-positive notes, recommendations, and clean local evaluation:
|
|
261
162
|
|
|
262
163
|
```bash
|
|
263
|
-
repopilot
|
|
264
|
-
repopilot init --force
|
|
265
|
-
repopilot init --path ./repopilot.toml
|
|
164
|
+
repopilot inspect eval-rules --format json
|
|
266
165
|
```
|
|
267
166
|
|
|
268
|
-
|
|
167
|
+
More: [docs/rule-quality-gate.md](docs/rule-quality-gate.md).
|
|
269
168
|
|
|
270
|
-
|
|
271
|
-
repopilot scan . --config repopilot.toml
|
|
272
|
-
```
|
|
169
|
+
## Local-First
|
|
273
170
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
```toml
|
|
277
|
-
[scan]
|
|
278
|
-
ignore = [
|
|
279
|
-
".git",
|
|
280
|
-
".github",
|
|
281
|
-
".repopilot",
|
|
282
|
-
"target",
|
|
283
|
-
"node_modules",
|
|
284
|
-
"dist",
|
|
285
|
-
"build",
|
|
286
|
-
".next",
|
|
287
|
-
".nuxt",
|
|
288
|
-
".cache",
|
|
289
|
-
"coverage",
|
|
290
|
-
"vendor",
|
|
291
|
-
"Pods",
|
|
292
|
-
"DerivedData"
|
|
293
|
-
]
|
|
294
|
-
max_file_bytes = 2097152
|
|
295
|
-
|
|
296
|
-
[architecture]
|
|
297
|
-
max_file_lines = 300
|
|
298
|
-
huge_file_lines = 1000
|
|
299
|
-
max_directory_modules = 20
|
|
300
|
-
max_directory_depth = 5
|
|
301
|
-
max_function_lines = 50
|
|
302
|
-
max_fan_out = 15
|
|
303
|
-
instability_hub_min_fan_in = 5
|
|
304
|
-
instability_hub_min_instability_pct = 75
|
|
305
|
-
|
|
306
|
-
[testing]
|
|
307
|
-
detect_missing_tests = true
|
|
308
|
-
|
|
309
|
-
[security]
|
|
310
|
-
detect_secret_like_names = true
|
|
311
|
-
|
|
312
|
-
[output]
|
|
313
|
-
default_format = "console"
|
|
314
|
-
```
|
|
171
|
+
RepoPilot does not upload source code, run a hosted scanner, call LLM APIs implicitly, send telemetry, or require a SaaS account.
|
|
315
172
|
|
|
316
|
-
|
|
173
|
+
AI commands only format local scan evidence as Markdown for tools such as Claude Code, ChatGPT, Cursor, Zed, or another assistant.
|
|
317
174
|
|
|
318
|
-
|
|
319
|
-
repopilot scan . --max-file-loc 500
|
|
320
|
-
repopilot scan . --max-directory-modules 25
|
|
321
|
-
repopilot scan . --max-directory-depth 6
|
|
322
|
-
repopilot scan . --max-file-size 1mb
|
|
323
|
-
repopilot scan . --max-files 1000
|
|
324
|
-
repopilot scan . --exclude generated
|
|
325
|
-
repopilot scan . --include-low-signal
|
|
326
|
-
```
|
|
175
|
+
## Reports
|
|
327
176
|
|
|
328
|
-
|
|
177
|
+
| Format | Use case |
|
|
178
|
+
|---|---|
|
|
179
|
+
| Console | fast local feedback |
|
|
180
|
+
| Markdown | PR comments and human-readable reports |
|
|
181
|
+
| JSON | automation and internal tooling |
|
|
182
|
+
| SARIF | GitHub Code Scanning |
|
|
183
|
+
| HTML | shareable local reports |
|
|
184
|
+
| Receipt | compact release/CI evidence |
|
|
329
185
|
|
|
330
|
-
|
|
186
|
+
More: [docs/reports.md](docs/reports.md).
|
|
331
187
|
|
|
332
|
-
##
|
|
188
|
+
## CI
|
|
333
189
|
|
|
334
|
-
|
|
190
|
+
Minimal baseline-aware gate:
|
|
335
191
|
|
|
336
192
|
```bash
|
|
337
|
-
repopilot baseline create .
|
|
338
|
-
repopilot scan . --baseline .repopilot/baseline.json
|
|
339
193
|
repopilot scan . --baseline .repopilot/baseline.json --fail-on new-high
|
|
340
194
|
```
|
|
341
195
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
Baseline files store accepted existing findings. Future scans can mark findings as `new` or `existing`, which is useful for legacy repositories and CI. Do not refresh a baseline blindly unless the team accepts those findings as technical debt.
|
|
345
|
-
|
|
346
|
-
## Review Workflow
|
|
347
|
-
|
|
348
|
-
Use `review` when you want RepoPilot to focus on findings that touch changed Git diff lines.
|
|
349
|
-
|
|
350
|
-
```bash
|
|
351
|
-
repopilot review .
|
|
352
|
-
repopilot review . --format json --output review.json
|
|
353
|
-
repopilot review . --baseline .repopilot/baseline.json --fail-on new-high
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
By default, `review` compares the working tree against `HEAD`, including staged, unstaged, and untracked files. For branch or CI review, pass a base ref:
|
|
357
|
-
|
|
358
|
-
```bash
|
|
359
|
-
repopilot review . --base origin/main
|
|
360
|
-
repopilot review . --base origin/main --head HEAD --format markdown
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
Review mode still scans the repository with the normal rules, but separates findings into in-diff and out-of-diff groups. When import coupling data is available, it also shows blast radius: files that import changed files and may need extra review. When `--fail-on` is used, the CI gate evaluates only in-diff findings.
|
|
364
|
-
|
|
365
|
-
## Output Formats
|
|
196
|
+
GitHub Code Scanning:
|
|
366
197
|
|
|
367
198
|
```bash
|
|
368
|
-
repopilot scan . --format console
|
|
369
|
-
repopilot scan . --format json --output report.json
|
|
370
|
-
repopilot scan . --format markdown --output report.md
|
|
371
|
-
repopilot scan . --format html --output report.html
|
|
372
199
|
repopilot scan . --format sarif --output repopilot.sarif
|
|
373
200
|
```
|
|
374
201
|
|
|
375
|
-
|
|
202
|
+
Release smoke:
|
|
376
203
|
|
|
377
204
|
```bash
|
|
378
|
-
|
|
205
|
+
./scripts/smoke-product.sh
|
|
379
206
|
```
|
|
380
207
|
|
|
381
|
-
|
|
208
|
+
More: [docs/integrations/github-code-scanning.md](docs/integrations/github-code-scanning.md).
|
|
382
209
|
|
|
383
|
-
|
|
384
|
-
repopilot scan . --format sarif > repopilot.sarif
|
|
385
|
-
```
|
|
386
|
-
|
|
387
|
-
Use JSON when custom scripts need to parse RepoPilot results. Console, Markdown, and HTML reports include the RepoPilot version, risk summary, top risk clusters, top rules, and grouped findings for human review. Use SARIF for CI and code scanning integrations, including GitHub Code Scanning.
|
|
388
|
-
Use `--receipt <path>` with `scan` when CI or release processes need compact evidence of the exact RepoPilot version, git state, scan scope, finding counts, language counts, and health score.
|
|
210
|
+
## Documentation
|
|
389
211
|
|
|
390
|
-
|
|
212
|
+
| Document | Purpose |
|
|
213
|
+
|---|---|
|
|
214
|
+
| [Install](docs/install.md) | Cargo, npm, Homebrew, curl, and source builds |
|
|
215
|
+
| [Commands](docs/commands.md) | Task-oriented workflows |
|
|
216
|
+
| [CLI](docs/cli.md) | Complete command and flag reference |
|
|
217
|
+
| [Configuration](docs/configuration.md) | `repopilot.toml`, presets, ignores, and baselines |
|
|
218
|
+
| [Rulesets](docs/rulesets.md) | Built-in rules, lifecycle, severity, and confidence |
|
|
219
|
+
| [Trust Mode](docs/trust-mode.md) | Default vs strict visibility policy |
|
|
220
|
+
| [Reports](docs/reports.md) | JSON, SARIF, Markdown, HTML, receipts, and schema fields |
|
|
221
|
+
| [Release Process](docs/release.md) | Local and CI release gates |
|
|
391
222
|
|
|
392
|
-
|
|
223
|
+
## Development
|
|
393
224
|
|
|
394
225
|
```bash
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
226
|
+
cargo fmt --all -- --check
|
|
227
|
+
cargo clippy --all-targets --all-features -- -D warnings
|
|
228
|
+
cargo test --all
|
|
229
|
+
npm run test:npm
|
|
230
|
+
./scripts/smoke-product.sh
|
|
400
231
|
```
|
|
401
232
|
|
|
402
|
-
|
|
233
|
+
Run rule evaluation from source:
|
|
403
234
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
When `--fail-on new-*` is used without `--baseline`, RepoPilot treats all current findings as new. For baseline-based adoption, commit an accepted baseline and scan against it in CI.
|
|
407
|
-
|
|
408
|
-
To upload RepoPilot findings to GitHub Code Scanning, generate SARIF and use `github/codeql-action/upload-sarif`. The workflow must include `security-events: write`.
|
|
409
|
-
The first-party action can also run `command: doctor`, `command: ai-context`, `command: ai-plan`, or `command: ai-prompt`; AI commands emit Markdown and do not produce SARIF. Prefer typed action inputs such as `path`, `config`, `baseline`, `fail-on`, `fail-on-priority`, `min-priority`, `rule`, `timing`, `focus`, `budget`, `output`, and `receipt`; `args` remains available for advanced flags.
|
|
410
|
-
|
|
411
|
-
```yaml
|
|
412
|
-
name: RepoPilot
|
|
413
|
-
|
|
414
|
-
on:
|
|
415
|
-
pull_request:
|
|
416
|
-
|
|
417
|
-
permissions:
|
|
418
|
-
contents: read
|
|
419
|
-
security-events: write
|
|
420
|
-
|
|
421
|
-
jobs:
|
|
422
|
-
repopilot:
|
|
423
|
-
runs-on: ubuntu-latest
|
|
424
|
-
|
|
425
|
-
steps:
|
|
426
|
-
- uses: actions/checkout@v5
|
|
427
|
-
|
|
428
|
-
- name: Install Rust
|
|
429
|
-
uses: dtolnay/rust-toolchain@stable
|
|
430
|
-
|
|
431
|
-
- name: Install RepoPilot
|
|
432
|
-
run: cargo install repopilot
|
|
433
|
-
|
|
434
|
-
- name: Run RepoPilot
|
|
435
|
-
run: repopilot scan . --baseline .repopilot/baseline.json --fail-on new-high --receipt repopilot-receipt.json
|
|
436
|
-
|
|
437
|
-
- name: Run RepoPilot (SARIF)
|
|
438
|
-
run: repopilot scan . --format sarif --output repopilot.sarif
|
|
439
|
-
|
|
440
|
-
- name: Upload to GitHub Code Scanning
|
|
441
|
-
uses: github/codeql-action/upload-sarif@v4
|
|
442
|
-
if: always()
|
|
443
|
-
with:
|
|
444
|
-
sarif_file: repopilot.sarif
|
|
445
|
-
|
|
446
|
-
- name: Upload audit receipt
|
|
447
|
-
uses: actions/upload-artifact@v4
|
|
448
|
-
if: always()
|
|
449
|
-
with:
|
|
450
|
-
name: repopilot-receipt
|
|
451
|
-
path: repopilot-receipt.json
|
|
235
|
+
```bash
|
|
236
|
+
cargo run -- inspect eval-rules --format json
|
|
452
237
|
```
|
|
453
238
|
|
|
454
|
-
## Roadmap
|
|
455
|
-
|
|
456
|
-
These are planned ideas, not current features:
|
|
457
|
-
|
|
458
|
-
- Change Risk Map
|
|
459
|
-
- Better architecture drift detection
|
|
460
|
-
|
|
461
|
-
## Documentation
|
|
462
|
-
|
|
463
|
-
| Document | Description |
|
|
464
|
-
|---|---|
|
|
465
|
-
| [docs/install.md](docs/install.md) | Installation options for Cargo, npm, Homebrew, curl, and source builds |
|
|
466
|
-
| [docs/ai-workflows.md](docs/ai-workflows.md) | Claude Code, ChatGPT, Cursor, and AI remediation workflows |
|
|
467
|
-
| [docs/security.md](docs/security.md) | Local-first trust model, installer security, and vulnerability reporting |
|
|
468
|
-
| [docs/configuration.md](docs/configuration.md) | `repopilot.toml`, presets, ignore files, and baseline adoption |
|
|
469
|
-
| [docs/language-support.md](docs/language-support.md) | Supported language/framework tiers, rule families, and limitations |
|
|
470
|
-
| [docs/risk-engine.md](docs/risk-engine.md) | Risk scoring, priority buckets, signals, and calibration policy |
|
|
471
|
-
| [docs/cli.md](docs/cli.md) | Complete CLI reference — all commands, flags, and exit codes |
|
|
472
|
-
| [docs/commands.md](docs/commands.md) | Task-oriented command guide and common patterns |
|
|
473
|
-
| [docs/rulesets.md](docs/rulesets.md) | Implemented audit rules, categories, and severity levels |
|
|
474
|
-
| [docs/react-native.md](docs/react-native.md) | React Native and Expo detection, findings, and limitations |
|
|
475
|
-
| [docs/integrations/github-code-scanning.md](docs/integrations/github-code-scanning.md) | GitHub Code Scanning SARIF workflow |
|
|
476
|
-
| [docs/release.md](docs/release.md) | Manual release process |
|
|
477
|
-
| [docs/release-announcement-0.11.md](docs/release-announcement-0.11.md) | 0.11.0 launch post and post-publish checks |
|
|
478
|
-
| [docs/release-checklist-0.11.md](docs/release-checklist-0.11.md) | 0.11.0 release readiness checklist |
|
|
479
|
-
| [docs/release-checklist-0.10.md](docs/release-checklist-0.10.md) | 0.10.0 release readiness checklist |
|
|
480
|
-
| [docs/distribution.md](docs/distribution.md) | Distribution channels |
|
|
481
|
-
| [docs/github-ruleset.md](docs/github-ruleset.md) | GitHub branch ruleset configuration |
|
|
482
|
-
| [CHANGELOG.md](CHANGELOG.md) | Version history |
|
|
483
|
-
|
|
484
239
|
## License
|
|
485
240
|
|
|
486
|
-
RepoPilot is licensed under MIT OR Apache-2.0
|
|
241
|
+
RepoPilot is licensed under **MIT OR Apache-2.0**.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repopilot",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Local-first CLI for repository audit, architecture risk detection, baseline tracking, and CI-friendly code review.",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"LICENSE"
|
|
27
27
|
],
|
|
28
28
|
"optionalDependencies": {
|
|
29
|
-
"@repopilot/darwin-arm64": "0.
|
|
30
|
-
"@repopilot/darwin-x64": "0.
|
|
31
|
-
"@repopilot/linux-arm64-gnu": "0.
|
|
32
|
-
"@repopilot/linux-x64-gnu": "0.
|
|
33
|
-
"@repopilot/win32-x64-msvc": "0.
|
|
29
|
+
"@repopilot/darwin-arm64": "0.13.0",
|
|
30
|
+
"@repopilot/darwin-x64": "0.13.0",
|
|
31
|
+
"@repopilot/linux-arm64-gnu": "0.13.0",
|
|
32
|
+
"@repopilot/linux-x64-gnu": "0.13.0",
|
|
33
|
+
"@repopilot/win32-x64-msvc": "0.13.0"
|
|
34
34
|
},
|
|
35
35
|
"keywords": [
|
|
36
36
|
"cli",
|