@stacksjs/types 0.75.627 → 0.75.628

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.
Files changed (2) hide show
  1. package/dist/security.d.ts +27 -0
  2. package/package.json +6 -6
@@ -18,9 +18,36 @@ export declare interface ApiSecurityOptions {
18
18
  export declare interface RateLimitSecurityOptions {
19
19
  scale: number
20
20
  }
21
+ /** One reviewed WAF rule exclusion. Guardian's exclusion wizard writes these. */
22
+ export declare interface WafRuleExclusion {
23
+ ruleId: number
24
+ pathPattern?: string
25
+ reason: string
26
+ }
27
+ /**
28
+ * The web application firewall (zig-waf) in front of the app.
29
+ *
30
+ * On box deploys it becomes ts-cloud's `infrastructure.compute.waf`; anything `config/cloud.ts`
31
+ * sets there explicitly still wins, field by field. On AWS deploys the options AWS WAF cannot
32
+ * express are reported rather than silently dropped.
33
+ *
34
+ * The default mode is `detection`: rules score and log, nothing is refused. Switching to
35
+ * `blocking` is a deliberate change after reading the detection log; nothing does it for you.
36
+ */
37
+ export declare interface WafSecurityOptions {
38
+ mode?: 'off' | 'detection' | 'blocking'
39
+ paranoiaLevel?: 1 | 2 | 3 | 4
40
+ inboundThreshold?: number
41
+ outboundThreshold?: number
42
+ maxBodyBytes?: number
43
+ bypassPaths?: string[]
44
+ exclusions?: WafRuleExclusion[]
45
+ forward?: { url: string, token: string, intervalSeconds?: number }
46
+ }
21
47
  export declare interface SecurityOptions {
22
48
  driver: 'aws'
23
49
  firewall: FirewallOptions
50
+ waf?: WafSecurityOptions
24
51
  api: ApiSecurityOptions
25
52
  rateLimit: RateLimitSecurityOptions
26
53
  trustedProxies?: readonly string[]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/types",
3
3
  "type": "module",
4
- "version": "0.75.627",
4
+ "version": "0.75.628",
5
5
  "description": "The Stacks framework types.",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": [
@@ -70,8 +70,8 @@
70
70
  "dependencies": {
71
71
  "@stacksjs/bunpress": "^0.2.15",
72
72
  "@stacksjs/clapp": "^0.2.17",
73
- "@stacksjs/events": "0.75.627",
74
- "@stacksjs/strings": "0.75.627",
73
+ "@stacksjs/events": "0.75.628",
74
+ "@stacksjs/strings": "0.75.628",
75
75
  "@stacksjs/stx": "^0.2.908",
76
76
  "@stacksjs/ts-validation": "^0.5.7",
77
77
  "bun-query-builder": "^0.6.2",
@@ -79,7 +79,7 @@
79
79
  "stripe": "23.0.0"
80
80
  },
81
81
  "devDependencies": {
82
- "@stacksjs/validation": "0.75.627",
82
+ "@stacksjs/validation": "0.75.628",
83
83
  "better-dx": "^0.2.39"
84
84
  },
85
85
  "sideEffects": false,
@@ -111,7 +111,7 @@
111
111
  }
112
112
  },
113
113
  "peerDependencies": {
114
- "@stacksjs/actions": "0.75.627",
115
- "@stacksjs/scheduler": "0.75.627"
114
+ "@stacksjs/actions": "0.75.628",
115
+ "@stacksjs/scheduler": "0.75.628"
116
116
  }
117
117
  }