@mondoohq/xgrep 0.28.1 → 0.29.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 +53 -21
- package/index.js +1 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -10,27 +10,46 @@ code-intelligence and AI-agent features on top of scanning.
|
|
|
10
10
|
This npm package ships prebuilt `xgrep` binaries for Linux, macOS, and Windows
|
|
11
11
|
(amd64 and arm64; the macOS binaries are signed and notarized).
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Install
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
Install globally to add the `xgrep` command to your `PATH` — the recommended way
|
|
16
|
+
to use it interactively:
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
npm install -g @mondoohq/xgrep
|
|
20
|
+
xgrep scan .
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
Or add it as a project dev dependency:
|
|
24
|
+
|
|
23
25
|
```bash
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
npm install --save-dev @mondoohq/xgrep
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Prefer zero-install? Run any command below through `npx @mondoohq/xgrep …`
|
|
30
|
+
instead of `xgrep …` (handy for one-offs and CI). Pin a version
|
|
31
|
+
(`@mondoohq/xgrep@<version>`) for reproducible builds.
|
|
32
|
+
|
|
33
|
+
## Quick start
|
|
34
|
+
|
|
35
|
+
xgrep ships with a built-in rule corpus, so no rules file is needed to get
|
|
36
|
+
started:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Scan the current directory with the built-in rules. `xgrep scan` with no path
|
|
40
|
+
# defaults to the current directory.
|
|
41
|
+
xgrep scan
|
|
42
|
+
|
|
43
|
+
# Choose a category (default: security, secrets)
|
|
44
|
+
xgrep scan --category correctness .
|
|
26
45
|
|
|
27
46
|
# Machine-readable output
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
47
|
+
xgrep scan --json .
|
|
48
|
+
xgrep scan --sarif . # GitHub Code Scanning
|
|
49
|
+
xgrep scan --gitlab -o gl-sast-report.json . # GitLab SAST
|
|
31
50
|
|
|
32
51
|
# Bring your own rules: point -f at a rule file or a directory of rules
|
|
33
|
-
|
|
52
|
+
xgrep scan -f rules.yaml src/
|
|
34
53
|
```
|
|
35
54
|
|
|
36
55
|
A scan target can also be a **remote git repository** — xgrep clones it
|
|
@@ -38,20 +57,33 @@ A scan target can also be a **remote git repository** — xgrep clones it
|
|
|
38
57
|
needed:
|
|
39
58
|
|
|
40
59
|
```bash
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
60
|
+
xgrep scan github.com/mondoohq/xgrep # host/owner/repo shorthand
|
|
61
|
+
xgrep scan https://github.com/mondoohq/xgrep # or a full HTTPS/SSH URL
|
|
62
|
+
xgrep scan github.com/mondoohq/xgrep --ref v1.2.0 # a branch, tag, or commit
|
|
44
63
|
```
|
|
45
64
|
|
|
46
|
-
##
|
|
65
|
+
## Add it to CI
|
|
47
66
|
|
|
48
|
-
|
|
67
|
+
Scaffold a ready-to-commit CI workflow for your provider (GitHub Actions, GitLab,
|
|
68
|
+
or Azure Pipelines) — it installs xgrep and runs a diff-aware scan on every pull
|
|
69
|
+
request:
|
|
49
70
|
|
|
50
71
|
```bash
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
xgrep scan .
|
|
72
|
+
xgrep ci --init
|
|
73
|
+
```
|
|
54
74
|
|
|
55
|
-
|
|
56
|
-
|
|
75
|
+
## AI-agent skills (Claude Code)
|
|
76
|
+
|
|
77
|
+
xgrep bundles [Claude Code](https://www.claude.com/product/claude-code) skills for
|
|
78
|
+
triaging findings, fixing them, and navigating code with the code graph. Install
|
|
79
|
+
them into your Claude Code environment:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
xgrep skill list # see the bundled skills
|
|
83
|
+
xgrep skill install # install them (into ~/.claude/plugins/)
|
|
57
84
|
```
|
|
85
|
+
|
|
86
|
+
The skills are Claude Code plugins today. To drive fixes with another agent
|
|
87
|
+
without the skills, `xgrep fix --agent codex` (or a custom command) works
|
|
88
|
+
directly. See the [documentation](https://github.com/mondoohq/xgrep) for the full
|
|
89
|
+
scan → triage → fix workflow.
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
const path = require('path');
|
|
3
3
|
const child_process = require('child_process');
|
|
4
|
-
const mapping = {
|
|
4
|
+
const mapping = { win32_arm64: { name: [ '@mondoohq', 'xgrep_windows_arm64' ], bin: 'xgrep.exe' }, linux_x64: { name: [ '@mondoohq', 'xgrep_linux_amd64' ], bin: 'xgrep' }, linux_arm64: { name: [ '@mondoohq', 'xgrep_linux_arm64' ], bin: 'xgrep' }, win32_x64: { name: [ '@mondoohq', 'xgrep_windows_amd64' ], bin: 'xgrep.exe' }, darwin_x64: { name: [ '@mondoohq', 'xgrep_darwin_amd64' ], bin: 'xgrep' }, darwin_arm64: { name: [ '@mondoohq', 'xgrep_darwin_arm64' ], bin: 'xgrep' } };
|
|
5
5
|
const definition = mapping[process.platform + '_' + process.arch];
|
|
6
6
|
const packageJsonPath = require.resolve(path.join(...definition.name, 'package.json'));
|
|
7
7
|
const packagePath = path.join(path.dirname(packageJsonPath), definition.bin);
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mondoohq/xgrep",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"bin": {
|
|
5
5
|
"xgrep": "index.js"
|
|
6
6
|
},
|
|
7
7
|
"optionalDependencies": {
|
|
8
|
-
"@mondoohq/
|
|
9
|
-
"@mondoohq/xgrep_linux_amd64": "0.
|
|
10
|
-
"@mondoohq/
|
|
11
|
-
"@mondoohq/xgrep_windows_amd64": "0.
|
|
12
|
-
"@mondoohq/xgrep_darwin_amd64": "0.
|
|
13
|
-
"@mondoohq/xgrep_darwin_arm64": "0.
|
|
8
|
+
"@mondoohq/xgrep_windows_arm64": "0.29.0",
|
|
9
|
+
"@mondoohq/xgrep_linux_amd64": "0.29.0",
|
|
10
|
+
"@mondoohq/xgrep_linux_arm64": "0.29.0",
|
|
11
|
+
"@mondoohq/xgrep_windows_amd64": "0.29.0",
|
|
12
|
+
"@mondoohq/xgrep_darwin_amd64": "0.29.0",
|
|
13
|
+
"@mondoohq/xgrep_darwin_arm64": "0.29.0"
|
|
14
14
|
},
|
|
15
15
|
"os": [
|
|
16
|
-
"linux",
|
|
17
16
|
"win32",
|
|
17
|
+
"linux",
|
|
18
18
|
"darwin"
|
|
19
19
|
],
|
|
20
20
|
"cpu": [
|