@sentriflow/core 0.1.4 → 0.1.5
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 -6
- package/package.json +60 -60
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @sentriflow/core
|
|
2
2
|
|
|
3
|
-
Core engine for SentriFlow - a network configuration
|
|
3
|
+
Core engine for SentriFlow - a network configuration compliance validator.
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
`@sentriflow/core` provides the fundamental building blocks for parsing
|
|
7
|
+
`@sentriflow/core` provides the fundamental building blocks for parsing and analyzing network device configurations across multiple vendors, checking them against compliance rules—whether industry best practices or your organization's specific requirements.
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
@@ -18,7 +18,7 @@ bun add @sentriflow/core
|
|
|
18
18
|
|
|
19
19
|
- **Multi-vendor support**: Cisco IOS/NX-OS, Juniper JunOS, Arista EOS, Fortinet FortiGate, Palo Alto PAN-OS, and more
|
|
20
20
|
- **AST-based parsing**: Converts configurations into a vendor-agnostic Abstract Syntax Tree
|
|
21
|
-
- **Extensible rule engine**:
|
|
21
|
+
- **Extensible rule engine**: Define compliance rules for best practices or organization-specific policies
|
|
22
22
|
- **TypeScript native**: Full type safety with comprehensive type definitions
|
|
23
23
|
|
|
24
24
|
## Supported Vendors
|
|
@@ -53,7 +53,7 @@ interface GigabitEthernet0/1
|
|
|
53
53
|
|
|
54
54
|
const ast = parse(config, { vendor: 'cisco-ios' });
|
|
55
55
|
|
|
56
|
-
//
|
|
56
|
+
// Check compliance against rules
|
|
57
57
|
const results = validate(ast, defaultRules);
|
|
58
58
|
|
|
59
59
|
for (const issue of results) {
|
|
@@ -69,7 +69,7 @@ Parses a network configuration string into an AST.
|
|
|
69
69
|
|
|
70
70
|
### `validate(ast: AST, rules: Rule[]): ValidationResult[]`
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
Checks an AST for compliance against a set of rules.
|
|
73
73
|
|
|
74
74
|
### `detect(config: string): VendorInfo | null`
|
|
75
75
|
|
|
@@ -78,7 +78,7 @@ Auto-detects the vendor/platform from configuration content.
|
|
|
78
78
|
## Related Packages
|
|
79
79
|
|
|
80
80
|
- [`@sentriflow/cli`](https://github.com/sentriflow/sentriflow/tree/main/packages/cli) - Command-line interface
|
|
81
|
-
- [`@sentriflow/rules-default`](https://github.com/sentriflow/sentriflow/tree/main/packages/rules-default) - Default
|
|
81
|
+
- [`@sentriflow/rules-default`](https://github.com/sentriflow/sentriflow/tree/main/packages/rules-default) - Default compliance rules
|
|
82
82
|
- [`@sentriflow/rule-helpers`](https://github.com/sentriflow/sentriflow/tree/main/packages/rule-helpers) - Helper functions for rule development
|
|
83
83
|
|
|
84
84
|
## License
|
package/package.json
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@sentriflow/core",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "SentriFlow core engine for network configuration validation",
|
|
5
|
-
"license": "Apache-2.0",
|
|
6
|
-
"module": "src/index.ts",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": "./src/index.ts",
|
|
10
|
-
"./helpers": "./src/helpers/index.ts",
|
|
11
|
-
"./helpers/common": "./src/helpers/common/index.ts",
|
|
12
|
-
"./helpers/arista": "./src/helpers/arista/index.ts",
|
|
13
|
-
"./helpers/aruba": "./src/helpers/aruba/index.ts",
|
|
14
|
-
"./helpers/cisco": "./src/helpers/cisco/index.ts",
|
|
15
|
-
"./helpers/cumulus": "./src/helpers/cumulus/index.ts",
|
|
16
|
-
"./helpers/extreme": "./src/helpers/extreme/index.ts",
|
|
17
|
-
"./helpers/fortinet": "./src/helpers/fortinet/index.ts",
|
|
18
|
-
"./helpers/huawei": "./src/helpers/huawei/index.ts",
|
|
19
|
-
"./helpers/juniper": "./src/helpers/juniper/index.ts",
|
|
20
|
-
"./helpers/mikrotik": "./src/helpers/mikrotik/index.ts",
|
|
21
|
-
"./helpers/nokia": "./src/helpers/nokia/index.ts",
|
|
22
|
-
"./helpers/paloalto": "./src/helpers/paloalto/index.ts",
|
|
23
|
-
"./helpers/vyos": "./src/helpers/vyos/index.ts"
|
|
24
|
-
},
|
|
25
|
-
"repository": {
|
|
26
|
-
"type": "git",
|
|
27
|
-
"url": "git+https://github.com/sentriflow/sentriflow.git",
|
|
28
|
-
"directory": "packages/core"
|
|
29
|
-
},
|
|
30
|
-
"homepage": "https://github.com/sentriflow/sentriflow#readme",
|
|
31
|
-
"bugs": {
|
|
32
|
-
"url": "https://github.com/sentriflow/sentriflow/issues"
|
|
33
|
-
},
|
|
34
|
-
"keywords": [
|
|
35
|
-
"network",
|
|
36
|
-
"configuration",
|
|
37
|
-
"validation",
|
|
38
|
-
"security",
|
|
39
|
-
"cisco",
|
|
40
|
-
"juniper",
|
|
41
|
-
"arista",
|
|
42
|
-
"firewall",
|
|
43
|
-
"linter",
|
|
44
|
-
"helpers"
|
|
45
|
-
],
|
|
46
|
-
"files": [
|
|
47
|
-
"src",
|
|
48
|
-
"LICENSE",
|
|
49
|
-
"README.md"
|
|
50
|
-
],
|
|
51
|
-
"publishConfig": {
|
|
52
|
-
"access": "public"
|
|
53
|
-
},
|
|
54
|
-
"devDependencies": {
|
|
55
|
-
"bun-types": "latest"
|
|
56
|
-
},
|
|
57
|
-
"peerDependencies": {
|
|
58
|
-
"typescript": "^5.0.0"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@sentriflow/core",
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"description": "SentriFlow core engine for network configuration validation",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"module": "src/index.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./src/index.ts",
|
|
10
|
+
"./helpers": "./src/helpers/index.ts",
|
|
11
|
+
"./helpers/common": "./src/helpers/common/index.ts",
|
|
12
|
+
"./helpers/arista": "./src/helpers/arista/index.ts",
|
|
13
|
+
"./helpers/aruba": "./src/helpers/aruba/index.ts",
|
|
14
|
+
"./helpers/cisco": "./src/helpers/cisco/index.ts",
|
|
15
|
+
"./helpers/cumulus": "./src/helpers/cumulus/index.ts",
|
|
16
|
+
"./helpers/extreme": "./src/helpers/extreme/index.ts",
|
|
17
|
+
"./helpers/fortinet": "./src/helpers/fortinet/index.ts",
|
|
18
|
+
"./helpers/huawei": "./src/helpers/huawei/index.ts",
|
|
19
|
+
"./helpers/juniper": "./src/helpers/juniper/index.ts",
|
|
20
|
+
"./helpers/mikrotik": "./src/helpers/mikrotik/index.ts",
|
|
21
|
+
"./helpers/nokia": "./src/helpers/nokia/index.ts",
|
|
22
|
+
"./helpers/paloalto": "./src/helpers/paloalto/index.ts",
|
|
23
|
+
"./helpers/vyos": "./src/helpers/vyos/index.ts"
|
|
24
|
+
},
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "git+https://github.com/sentriflow/sentriflow.git",
|
|
28
|
+
"directory": "packages/core"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "https://github.com/sentriflow/sentriflow#readme",
|
|
31
|
+
"bugs": {
|
|
32
|
+
"url": "https://github.com/sentriflow/sentriflow/issues"
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"network",
|
|
36
|
+
"configuration",
|
|
37
|
+
"validation",
|
|
38
|
+
"security",
|
|
39
|
+
"cisco",
|
|
40
|
+
"juniper",
|
|
41
|
+
"arista",
|
|
42
|
+
"firewall",
|
|
43
|
+
"linter",
|
|
44
|
+
"helpers"
|
|
45
|
+
],
|
|
46
|
+
"files": [
|
|
47
|
+
"src",
|
|
48
|
+
"LICENSE",
|
|
49
|
+
"README.md"
|
|
50
|
+
],
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"access": "public"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"bun-types": "latest"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"typescript": "^5.0.0"
|
|
59
|
+
}
|
|
60
|
+
}
|