@sentriflow/cli 0.6.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/README.md +5 -77
- package/dist/index.js +14068 -2912
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -106,88 +106,16 @@ Supported vendors: `cisco-ios`, `juniper-junos`, `palo-alto`, `fortinet`, `arist
|
|
|
106
106
|
| `--extract-ips` | Extract and display all IP addresses/subnets from configuration |
|
|
107
107
|
| `--copy-ips` | Copy extracted IPs to clipboard (requires xclip/pbcopy) |
|
|
108
108
|
|
|
109
|
-
###
|
|
109
|
+
### Rule Packs and Plugins
|
|
110
110
|
|
|
111
111
|
| Option | Description |
|
|
112
112
|
|--------|-------------|
|
|
113
|
-
| `--
|
|
114
|
-
| `--
|
|
115
|
-
| `--strict-packs` | Fail if encrypted pack cannot be loaded |
|
|
113
|
+
| `--pack <path...>` | Path(s) to rule pack module(s) (`.js`/`.ts`), or formats a plugin handles |
|
|
114
|
+
| `--strict-packs` | Deprecated no-op: a pack or JSON rules file that fails to load always exits 2 |
|
|
116
115
|
|
|
117
|
-
|
|
116
|
+
The CLI loads plain JS/TS rule packs. Encrypted pack files (`.grx2`, `.grpx`) are rejected with `unsupported pack format (encrypted packs need the SentriFlow licensing plugin)` and exit code 2, unless a plugin has registered a loader for them.
|
|
118
117
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
| Option | Description |
|
|
122
|
-
|--------|-------------|
|
|
123
|
-
| `--grx2-pack <path...>` | Path(s) to extended encrypted rule pack(s) (.grx2) |
|
|
124
|
-
| `--strict-grx2` | Fail immediately if any GRX2 pack cannot be loaded |
|
|
125
|
-
| `--show-machine-id` | Display the current machine ID (for license binding support) |
|
|
126
|
-
|
|
127
|
-
**Environment Variable:**
|
|
128
|
-
- `SENTRIFLOW_LICENSE_KEY` - License key for decrypting packs
|
|
129
|
-
|
|
130
|
-
**Offline Usage:**
|
|
131
|
-
|
|
132
|
-
GRX2 packs contain embedded wrapped keys, allowing complete offline operation:
|
|
133
|
-
|
|
134
|
-
```bash
|
|
135
|
-
# Scan with portable pack (no network required)
|
|
136
|
-
SENTRIFLOW_LICENSE_KEY=ey... sentriflow --grx2-pack ./enterprise-rules.grx2 router.conf
|
|
137
|
-
|
|
138
|
-
# Scan with multiple packs
|
|
139
|
-
sentriflow --grx2-pack pack1.grx2 pack2.grx2 --license-key ey... configs/
|
|
140
|
-
|
|
141
|
-
# Strict mode: fail on pack load errors
|
|
142
|
-
sentriflow --grx2-pack rules.grx2 --strict-grx2 router.conf
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
**Machine-Bound vs Portable Packs:**
|
|
146
|
-
|
|
147
|
-
- **Portable packs**: Work on any machine with a valid license key
|
|
148
|
-
- **Machine-bound packs**: Tied to a specific machine ID for additional security
|
|
149
|
-
|
|
150
|
-
Use `--show-machine-id` to display your machine ID when requesting machine-bound packs:
|
|
151
|
-
|
|
152
|
-
```bash
|
|
153
|
-
sentriflow --show-machine-id
|
|
154
|
-
# Output: Machine ID: a1b2c3d4...
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
### Cloud Licensing Commands
|
|
158
|
-
|
|
159
|
-
Cloud licensing features require the `@sentriflow/licensing` package, which is provided to customers after purchasing a license. Visit [sentriflow.com.au/pricing](https://sentriflow.com.au/pricing) for more information.
|
|
160
|
-
|
|
161
|
-
| Command | Description |
|
|
162
|
-
|---------|-------------|
|
|
163
|
-
| `sentriflow activate --license-key <key>` | Activate license and download entitled packs |
|
|
164
|
-
| `sentriflow update` | Check for and download pack updates |
|
|
165
|
-
| `sentriflow offline --bundle <path>` | Create offline bundle for air-gapped environments |
|
|
166
|
-
| `sentriflow license` | Show license status and entitled feeds |
|
|
167
|
-
|
|
168
|
-
**Activate a license:**
|
|
169
|
-
|
|
170
|
-
```bash
|
|
171
|
-
# Activate license and download all entitled packs
|
|
172
|
-
sentriflow activate --license-key eyJhbGciOiJIUzI1Ni...
|
|
173
|
-
|
|
174
|
-
# Or use environment variable
|
|
175
|
-
export SENTRIFLOW_LICENSE_KEY=eyJhbGciOiJIUzI1Ni...
|
|
176
|
-
sentriflow activate
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
**Check for updates:**
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
# Check and download available pack updates
|
|
183
|
-
sentriflow update
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
**Offline mode:**
|
|
187
|
-
|
|
188
|
-
Downloaded packs are cached in `~/.sentriflow/cache/` and work offline for 72 hours (entitlement cache). The pack files themselves work indefinitely once downloaded.
|
|
189
|
-
|
|
190
|
-
If `@sentriflow/licensing` is not installed, these commands display a message with information on how to obtain access.
|
|
118
|
+
Plugins are ES modules the CLI imports before parsing the command line: `@sentriflow/licensing/cli` if it is installed, plus any listed in `SENTRIFLOW_PLUGINS` (comma-separated package names or file paths). 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).
|
|
191
119
|
|
|
192
120
|
### Directory Scanning
|
|
193
121
|
|