@chain305/x-security 0.4.0 → 0.4.1
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 +10 -10
- package/bin/x-security.mjs +8 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,16 +10,16 @@ npx @chain305/x-security --help
|
|
|
10
10
|
|
|
11
11
|
| Command | What it does |
|
|
12
12
|
| --- | --- |
|
|
13
|
-
| `
|
|
14
|
-
| `
|
|
15
|
-
| `
|
|
16
|
-
| `
|
|
17
|
-
| `
|
|
18
|
-
| `
|
|
19
|
-
| `
|
|
20
|
-
| `
|
|
21
|
-
|
|
22
|
-
Run `
|
|
13
|
+
| `x-security generate <spec> --target <t>` | Compile an annotated OpenAPI spec into gateway config (`kong`, `coraza`, `bunkerweb`, `openappsec`, `firewall`, `envoy`) |
|
|
14
|
+
| `x-security validate <spec> --target kong --gateway <url\|file>` | Detect drift between the spec and a running/exported gateway config |
|
|
15
|
+
| `x-security test <spec> --target <t>` | Closed-loop test: generate config, spin up Docker, send traffic, assert |
|
|
16
|
+
| `x-security verify <spec> --target <t> --gateway <addr>` | Read-only post-deploy check that the gateway loaded the emitted artifacts |
|
|
17
|
+
| `x-security report <spec>` | OWASP API Top 10 coverage and annotation reports |
|
|
18
|
+
| `x-security diff <old> <new> --target <t>` | Diff the generated config for two spec versions |
|
|
19
|
+
| `x-security init <spec>` | Add empty `x-security` blocks to operations missing them |
|
|
20
|
+
| `x-security migrate <spec> --from 0.4 --to 0.5` | Rewrite a spec between schema versions |
|
|
21
|
+
|
|
22
|
+
Run `x-security <command> --help` for full flags.
|
|
23
23
|
|
|
24
24
|
## Requirements
|
|
25
25
|
|
package/bin/x-security.mjs
CHANGED
|
@@ -62062,7 +62062,7 @@ ${plan.yaml}`,
|
|
|
62062
62062
|
endpoint: "(gateway)",
|
|
62063
62063
|
rule: "load-coverage",
|
|
62064
62064
|
verdict: "FAIL",
|
|
62065
|
-
message: "x-security-emitted artifacts are not loaded by the gateway (
|
|
62065
|
+
message: "x-security-emitted artifacts are not loaded by the gateway (x-security verify reported <90%). Aborting traffic phase \u2014 the results would be unattributable.",
|
|
62066
62066
|
durationMs: 0
|
|
62067
62067
|
});
|
|
62068
62068
|
} else {
|
|
@@ -73959,11 +73959,18 @@ function firstExisting(candidates) {
|
|
|
73959
73959
|
}
|
|
73960
73960
|
function loadConfig2(cwd = process.cwd(), home = os3.homedir()) {
|
|
73961
73961
|
const homeFile = firstExisting([
|
|
73962
|
+
path28.join(home, ".config", "x-security", "config.yaml"),
|
|
73963
|
+
path28.join(home, ".config", "x-security", "config.yml"),
|
|
73964
|
+
path28.join(home, ".config", "x-security", "config.json"),
|
|
73962
73965
|
path28.join(home, ".config", "xsecurity", "config.yaml"),
|
|
73963
73966
|
path28.join(home, ".config", "xsecurity", "config.yml"),
|
|
73964
73967
|
path28.join(home, ".config", "xsecurity", "config.json")
|
|
73965
73968
|
]);
|
|
73966
73969
|
const projectFile = firstExisting([
|
|
73970
|
+
path28.join(cwd, ".x-securityrc.yaml"),
|
|
73971
|
+
path28.join(cwd, ".x-securityrc.yml"),
|
|
73972
|
+
path28.join(cwd, ".x-securityrc.json"),
|
|
73973
|
+
path28.join(cwd, ".x-securityrc"),
|
|
73967
73974
|
path28.join(cwd, ".xsecurityrc.yaml"),
|
|
73968
73975
|
path28.join(cwd, ".xsecurityrc.yml"),
|
|
73969
73976
|
path28.join(cwd, ".xsecurityrc.json"),
|
package/package.json
CHANGED