@sentriflow/cli 0.11.0-rc.3 → 0.12.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 +6 -3
- package/dist/index.js +4283 -1134
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -47,6 +47,9 @@ sentriflow --list-rules --category Authentication
|
|
|
47
47
|
# List all categories
|
|
48
48
|
sentriflow --list-categories
|
|
49
49
|
|
|
50
|
+
# Print a copy of a config that is safe to share
|
|
51
|
+
sentriflow sanitize router.conf > router.sanitised.cfg
|
|
52
|
+
|
|
50
53
|
# Read from stdin
|
|
51
54
|
cat router.conf | sentriflow -
|
|
52
55
|
```
|
|
@@ -124,11 +127,11 @@ JSON and SARIF output include an `ipSummary` of the IP addresses and subnets fou
|
|
|
124
127
|
|
|
125
128
|
A rule source you name must load, or the CLI prints the reason and exits with code 2 before scanning: a `--pack`, `--json-rules` or `--rules` entry that is missing, invalid or unsafe, and the `rules`, `rulePacks` and `jsonRules` entries of a config file.
|
|
126
129
|
|
|
127
|
-
The CLI loads plain JS/TS rule packs
|
|
130
|
+
The CLI loads plain JS/TS rule packs (`.js`, `.ts`, `.mjs`, `.cjs`). Any other pack file is rejected with `unsupported pack format: <file>` and exit code 2, unless a plugin has registered a loader for it.
|
|
128
131
|
|
|
129
|
-
Plugins are ES modules the CLI imports before parsing the command line
|
|
132
|
+
Plugins are ES modules the CLI imports before parsing the command line, only from `SENTRIFLOW_PLUGINS` (comma-separated package names or file paths); no plugin is loaded when it is unset. A plugin exports `registerCommands(program, context)`; it may add commands and options to `program` and call `context.registerPackLoader({ name, canLoad, load })` to handle extra pack formats. Plugins are trusted code. The contract is documented in [`src/plugins.ts`](src/plugins.ts).
|
|
130
133
|
|
|
131
|
-
A plugin that fails to load stops the run with exit code 2 and a message such as `Failed to load plugin './my-plugin.js': <reason>`, naming the plugin as written in `SENTRIFLOW_PLUGINS`.
|
|
134
|
+
A plugin that fails to load stops the run with exit code 2 and a message such as `Failed to load plugin './my-plugin.js': <reason>`, naming the plugin as written in `SENTRIFLOW_PLUGINS`.
|
|
132
135
|
|
|
133
136
|
### Directory Scanning
|
|
134
137
|
|