@waftester/cli 2.9.30 → 2.9.31

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 CHANGED
@@ -96,6 +96,23 @@ $ waf-tester assess -u https://target.com -fp -o assessment.json
96
96
 
97
97
  Includes benign traffic corpus testing (Leipzig integration) for false positive measurement.
98
98
 
99
+ ### Service Presets
100
+
101
+ Use service presets for platform-specific testing. Presets add known endpoints and attack surface hints to improve discovery coverage.
102
+
103
+ ```bash
104
+ # Test an Authentik identity provider
105
+ waf-tester auto -u https://sso.example.com -service authentik
106
+
107
+ # Test an n8n automation instance
108
+ waf-tester discover -u https://automation.example.com -service n8n
109
+
110
+ # Custom presets — drop JSON files in presets/ directory
111
+ WAF_TESTER_PRESET_DIR=./my-presets waf-tester auto -u https://target.com -service myapp
112
+ ```
113
+
114
+ Built-in presets: `authentik`, `n8n`, `immich`, `webapp`, `intranet`. Create custom presets by adding JSON files — see the [Examples Guide](https://github.com/waftester/waftester/blob/main/docs/EXAMPLES.md#service-presets).
115
+
99
116
  ### Targeted Scanning
100
117
 
101
118
  ```bash
@@ -280,6 +297,7 @@ ARM64 platforms with x64 emulation (Rosetta 2, Windows WoW) are supported as fal
280
297
  |---|---|
281
298
  | `WAF_TESTER_BINARY_PATH` | Override binary path (skip platform resolution) |
282
299
  | `WAF_TESTER_PAYLOAD_DIR` | Override bundled payload directory |
300
+ | `WAF_TESTER_PRESET_DIR` | Override bundled service preset directory |
283
301
  | `WAF_TESTER_TEMPLATE_DIR` | Override bundled template directory |
284
302
 
285
303
  ## License
package/bin/cli.js CHANGED
@@ -116,6 +116,9 @@ const cliDir = path.resolve(__dirname, "..");
116
116
  if (!process.env.WAF_TESTER_PAYLOAD_DIR) {
117
117
  process.env.WAF_TESTER_PAYLOAD_DIR = path.join(cliDir, "payloads");
118
118
  }
119
+ if (!process.env.WAF_TESTER_PRESET_DIR) {
120
+ process.env.WAF_TESTER_PRESET_DIR = path.join(cliDir, "presets");
121
+ }
119
122
  if (!process.env.WAF_TESTER_TEMPLATE_DIR) {
120
123
  process.env.WAF_TESTER_TEMPLATE_DIR = path.join(
121
124
  cliDir,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@waftester/cli",
3
- "version": "2.9.30",
3
+ "version": "2.9.31",
4
4
  "description": "WAFtester — the most comprehensive WAF testing CLI & MCP server",
5
5
  "license": "BUSL-1.1",
6
6
  "repository": {
@@ -35,6 +35,7 @@
35
35
  "files": [
36
36
  "bin/",
37
37
  "payloads/",
38
+ "presets/",
38
39
  "templates/",
39
40
  "LICENSE",
40
41
  "LICENSE-COMMUNITY"
@@ -43,11 +44,11 @@
43
44
  "node": ">=16"
44
45
  },
45
46
  "optionalDependencies": {
46
- "@waftester/darwin-x64": "2.9.30",
47
- "@waftester/darwin-arm64": "2.9.30",
48
- "@waftester/linux-x64": "2.9.30",
49
- "@waftester/linux-arm64": "2.9.30",
50
- "@waftester/win32-x64": "2.9.30",
51
- "@waftester/win32-arm64": "2.9.30"
47
+ "@waftester/darwin-x64": "2.9.31",
48
+ "@waftester/darwin-arm64": "2.9.31",
49
+ "@waftester/linux-x64": "2.9.31",
50
+ "@waftester/linux-arm64": "2.9.31",
51
+ "@waftester/win32-x64": "2.9.31",
52
+ "@waftester/win32-arm64": "2.9.31"
52
53
  }
53
54
  }
@@ -74,7 +74,7 @@ Legitimate traffic validation (should NOT be blocked):
74
74
  - HTML content in JSON
75
75
  - Email addresses
76
76
  - Code/formula content
77
- - Service-specific endpoints (n8n, Immich, Authentik, AgreementPulse)
77
+ - Service-specific endpoints (n8n, Immich, Authentik)
78
78
 
79
79
  ## Usage
80
80
 
@@ -205,23 +205,5 @@
205
205
  "severity_hint": "Low",
206
206
  "notes": "Authentik authentication flow - MUST NOT be blocked",
207
207
  "category": "Regression"
208
- },
209
- {
210
- "id": "LEGIT-AGREEMENTPULSE-001",
211
- "payload": "GET /api/health",
212
- "tags": ["regression", "agreementpulse", "health", "quick"],
213
- "expected_block": false,
214
- "severity_hint": "Low",
215
- "notes": "AgreementPulse health check - MUST NOT be blocked",
216
- "category": "Regression"
217
- },
218
- {
219
- "id": "LEGIT-AGREEMENTPULSE-002",
220
- "payload": "POST /api/contracts HTTP/1.1\r\nContent-Type: application/json\r\n\r\n{\"title\":\"Service Agreement\",\"parties\":[\"Company A\",\"Company B\"]}",
221
- "tags": ["regression", "agreementpulse", "contract", "quick"],
222
- "expected_block": false,
223
- "severity_hint": "Low",
224
- "notes": "AgreementPulse contract creation - MUST NOT be blocked",
225
- "category": "Regression"
226
208
  }
227
209
  ]
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "authentik",
3
+ "description": "Authentik identity provider — OAuth2, SAML, LDAP authentication platform",
4
+ "endpoints": [
5
+ "/-/health/ready/",
6
+ "/-/health/live/",
7
+ "/api/v3/core/applications/",
8
+ "/api/v3/core/groups/",
9
+ "/api/v3/core/users/",
10
+ "/api/v3/core/tokens/",
11
+ "/api/v3/flows/executor/",
12
+ "/api/v3/policies/",
13
+ "/application/o/authorize/",
14
+ "/application/o/token/",
15
+ "/application/o/userinfo/",
16
+ "/source/saml/",
17
+ "/source/oauth/",
18
+ "/if/flow/default-authentication-flow/",
19
+ "/if/admin/",
20
+ "/if/user/",
21
+ "/ws/"
22
+ ],
23
+ "attack_surface": {
24
+ "has_auth_endpoints": true,
25
+ "has_oauth": true,
26
+ "has_saml": true
27
+ }
28
+ }
@@ -0,0 +1,19 @@
1
+ // Package presets embeds all bundled service preset files for distribution.
2
+ //
3
+ // This ensures presets are available regardless of installation method
4
+ // (Homebrew, Scoop, npm, Docker, or manual download). The discovery engine
5
+ // falls back to these embedded presets when no on-disk presets directory exists.
6
+ //
7
+ // Usage:
8
+ //
9
+ // fs := presets.FS
10
+ // data, _ := fs.ReadFile("authentik.json")
11
+ package presets
12
+
13
+ import "embed"
14
+
15
+ // FS contains all bundled service preset JSON files. Each file defines
16
+ // service-specific endpoints and attack surface characteristics.
17
+ //
18
+ //go:embed *.json
19
+ var FS embed.FS
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "immich",
3
+ "description": "Immich self-hosted photo/video management — asset upload, face recognition, search",
4
+ "endpoints": [
5
+ "/api/server/ping",
6
+ "/api/server-info/",
7
+ "/api/auth/login",
8
+ "/api/auth/signup",
9
+ "/api/users/",
10
+ "/api/albums/",
11
+ "/api/assets/",
12
+ "/api/assets/upload",
13
+ "/api/search/",
14
+ "/api/faces/",
15
+ "/api/people/"
16
+ ],
17
+ "attack_surface": {
18
+ "has_file_upload": true,
19
+ "has_api_endpoints": true
20
+ }
21
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "intranet",
3
+ "description": "Internal/intranet application — admin panels, internal APIs, SSO",
4
+ "endpoints": [
5
+ "/api/",
6
+ "/api/v1/",
7
+ "/api/v2/",
8
+ "/login",
9
+ "/logout",
10
+ "/register",
11
+ "/signup",
12
+ "/admin/",
13
+ "/dashboard/",
14
+ "/settings/",
15
+ "/profile/",
16
+ "/users/",
17
+ "/search",
18
+ "/upload",
19
+ "/download",
20
+ "/graphql",
21
+ "/swagger.json",
22
+ "/openapi.json",
23
+ "/.env",
24
+ "/config"
25
+ ],
26
+ "attack_surface": {
27
+ "has_api_endpoints": true,
28
+ "has_auth_endpoints": true
29
+ }
30
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "n8n",
3
+ "description": "n8n workflow automation platform — REST API, webhooks, WebSocket push",
4
+ "endpoints": [
5
+ "/healthz",
6
+ "/rest/workflows",
7
+ "/rest/credentials",
8
+ "/rest/executions",
9
+ "/rest/settings",
10
+ "/rest/users",
11
+ "/rest/oauth2-credential/",
12
+ "/webhook/",
13
+ "/webhook-test/",
14
+ "/api/v1/",
15
+ "/push"
16
+ ],
17
+ "attack_surface": {
18
+ "has_api_endpoints": true,
19
+ "has_websockets": true
20
+ }
21
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "webapp",
3
+ "description": "Generic web application — login, API, admin, file upload, search",
4
+ "endpoints": [
5
+ "/api/",
6
+ "/api/v1/",
7
+ "/api/v2/",
8
+ "/login",
9
+ "/logout",
10
+ "/register",
11
+ "/signup",
12
+ "/admin/",
13
+ "/dashboard/",
14
+ "/settings/",
15
+ "/profile/",
16
+ "/users/",
17
+ "/search",
18
+ "/upload",
19
+ "/download",
20
+ "/graphql",
21
+ "/swagger.json",
22
+ "/openapi.json",
23
+ "/.env",
24
+ "/config"
25
+ ],
26
+ "attack_surface": {
27
+ "has_api_endpoints": true,
28
+ "has_auth_endpoints": true
29
+ }
30
+ }