@vulcn/engine 0.2.0 → 0.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,67 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 621502c: ## Driver-Based Architecture
8
+
9
+ Introduces a modular driver system that makes Vulcn extensible to different recording targets beyond web browsers.
10
+
11
+ ### New Package: `@vulcn/driver-browser`
12
+
13
+ A new package that encapsulates all Playwright-based browser recording and replay functionality:
14
+ - **BrowserRecorder** - Records browser interactions (clicks, inputs, navigation)
15
+ - **BrowserRunner** - Replays sessions with payload injection and detection
16
+ - **Browser utilities** - Smart browser launching with system Chrome/Edge fallback
17
+
18
+ Step types: `browser.navigate`, `browser.click`, `browser.input`, `browser.keypress`, `browser.scroll`, `browser.wait`
19
+
20
+ ### New in `@vulcn/engine`
21
+
22
+ #### DriverManager
23
+
24
+ New `DriverManager` class for loading and orchestrating drivers:
25
+ - `register(driver)` - Register a driver
26
+ - `load(nameOrPath)` - Load driver from npm or local file
27
+ - `startRecording(driverName, config)` - Start recording with a driver
28
+ - `execute(session, pluginManager)` - Execute session with payloads
29
+ - `getForSession(session)` - Get driver for a session
30
+
31
+ #### Driver Interfaces
32
+
33
+ New TypeScript interfaces for building custom drivers:
34
+ - `VulcnDriver` - Main driver definition
35
+ - `RecorderDriver` - Recording interface
36
+ - `RunnerDriver` - Replay/execution interface
37
+ - `RecordingHandle` - Handle for controlling active recordings
38
+ - `Session` - Generic session format with `driver` field
39
+ - `Step` - Generic step format with namespaced types
40
+
41
+ ### Session Format Changes
42
+
43
+ Sessions now include a `driver` field to specify which driver handles them:
44
+
45
+ ```yaml
46
+ name: My Session
47
+ driver: browser
48
+ driverConfig:
49
+ browser: chromium
50
+ startUrl: https://example.com
51
+ steps:
52
+ - type: browser.navigate
53
+ - type: browser.input
54
+ ```
55
+
56
+ ### Documentation
57
+ - New "Drivers" tab in docs with overview, browser driver reference, and custom driver guide
58
+ - Updated API reference with DriverManager documentation
59
+ - Simplified README pointing to docs.vulcn.dev
60
+
61
+ ### Breaking Changes
62
+
63
+ None - existing code continues to work. Legacy `Recorder` and `Runner` exports are preserved but deprecated.
64
+
3
65
  All notable changes to this project will be documented in this file.
4
66
 
5
67
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  [![CI](https://github.com/vulcnize/vulcn/actions/workflows/ci.yml/badge.svg)](https://github.com/vulcnize/vulcn/actions/workflows/ci.yml)
6
6
  [![npm version](https://img.shields.io/npm/v/vulcn.svg)](https://www.npmjs.com/package/vulcn)
7
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
7
+ [![License: AGPL-3.0](https://img.shields.io/badge/License-AGPL--3.0-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
8
8
 
9
9
  ---
10
10
 
@@ -14,11 +14,11 @@
14
14
  # Install globally
15
15
  npm install -g vulcn
16
16
 
17
- # Record a session
18
- vulcn record --url https://example.com/login
17
+ # Record a session (opens browser)
18
+ vulcn record https://example.com/login
19
19
 
20
- # Run with XSS payloads
21
- vulcn run session.vulcn.yml --payload xss-basic
20
+ # Run with security payloads
21
+ vulcn run session.vulcn.yml
22
22
  ```
23
23
 
24
24
  **Zero-config browser support** — Vulcn uses your existing Chrome or Edge. No browser downloads needed.
@@ -27,198 +27,64 @@ vulcn run session.vulcn.yml --payload xss-basic
27
27
 
28
28
  ## 🎯 What is Vulcn?
29
29
 
30
- Vulcn is a security testing tool that:
30
+ Vulcn is a **driver-based security testing framework** that:
31
31
 
32
- 1. **Records** your browser interactions (clicks, form inputs, navigation)
33
- 2. **Replays** them with security payloads injected into input fields
34
- 3. **Detects** vulnerabilities like XSS and SQL injection
32
+ 1. **Records** interactions (browser clicks, API requests, CLI commands)
33
+ 2. **Replays** them with security payloads injected
34
+ 3. **Detects** vulnerabilities via plugins (XSS, SQLi, reflection, etc.)
35
35
 
36
- Think of it as **Playwright + Burp Suite**, but simpler and focused on automated payload testing.
36
+ ### Architecture
37
37
 
38
- ---
39
-
40
- ## 🚀 Features
41
-
42
- | Feature | Description |
43
- | --------------------- | --------------------------------------------------- |
44
- | 🎬 **Record** | Capture browser sessions as replayable YAML files |
45
- | 🔍 **Test** | Inject XSS, SQLi, and custom payloads automatically |
46
- | 🌐 **Cross-platform** | Works on macOS, Linux, and Windows |
47
- | 🚫 **Zero-config** | Uses system Chrome/Edge by default |
48
- | 📊 **CI/CD Ready** | Exit codes for pipeline integration |
49
- | 🔧 **Extensible** | Add custom payloads and detection patterns |
50
-
51
- ---
52
-
53
- ## 📦 Installation
54
-
55
- ### CLI
56
-
57
- ```bash
58
- npm install -g vulcn
59
38
  ```
60
-
61
- ### Programmatic API
62
-
63
- ```bash
64
- npm install @vulcn/engine
65
- ```
66
-
67
- ```typescript
68
- import { Recorder, Runner, parseSession } from "@vulcn/engine";
69
-
70
- // Record programmatically
71
- const session = await Recorder.start("https://example.com");
72
- // ... user interacts ...
73
- const recorded = await session.stop();
74
-
75
- // Run with payloads
76
- const result = await Runner.execute(recorded, ["xss-basic"]);
77
- console.log(result.findings);
39
+ ┌─────────────────────────────────────────────────────────┐
40
+ │ vulcn CLI │
41
+ ├─────────────────────────────────────────────────────────┤
42
+ │ @vulcn/engine │
43
+ │ ┌─────────────────────┐ ┌──────────────────────────┐ │
44
+ │ │ DriverManager │ │ PluginManager │ │
45
+ │ │ • browser │ │ • payloads │ │
46
+ │ │ • api (soon) │ │ • detect-xss │ │
47
+ │ │ • cli (soon) │ │ • detect-reflection │ │
48
+ │ └─────────────────────┘ └──────────────────────────┘ │
49
+ └─────────────────────────────────────────────────────────┘
78
50
  ```
79
51
 
80
52
  ---
81
53
 
82
- ## 🎬 Recording
83
-
84
- Start recording a session:
85
-
86
- ```bash
87
- vulcn record --url https://target.com/login
88
- ```
89
-
90
- Options:
91
-
92
- - `--url, -u` — Start URL (required)
93
- - `--output, -o` — Output file (default: `session.vulcn.yml`)
94
- - `--browser, -b` — Browser (`chromium`, `firefox`, `webkit`)
95
- - `--headless` — Run headless
96
-
97
- When recording:
54
+ ## 📦 Packages
98
55
 
99
- 1. Browser opens to your start URL
100
- 2. Interact normally (fill forms, click buttons)
101
- 3. Press `Ctrl+C` to stop and save
102
-
103
- ---
104
-
105
- ## 🔍 Running Tests
106
-
107
- Run a recorded session with payloads:
108
-
109
- ```bash
110
- vulcn run session.vulcn.yml --payload xss-basic --payload sqli-basic
111
- ```
112
-
113
- Options:
114
-
115
- - `--payload, -p` — Payload to use (can specify multiple)
116
- - `--headless` — Run headless (default: true)
117
- - `--browser, -b` — Browser to use
118
-
119
- ### Built-in Payloads
120
-
121
- | Payload | Category | Description |
122
- | ------------ | -------- | ------------------------------ |
123
- | `xss-basic` | XSS | Script tags and event handlers |
124
- | `xss-event` | XSS | Event handler injection |
125
- | `xss-svg` | XSS | SVG-based XSS |
126
- | `sqli-basic` | SQLi | Basic SQL injection |
127
- | `sqli-error` | SQLi | Error-based SQLi detection |
128
- | `sqli-blind` | SQLi | Blind SQLi payloads |
129
-
130
- List all payloads:
131
-
132
- ```bash
133
- vulcn payloads
134
- ```
135
-
136
- ---
137
-
138
- ## 📄 Session Format
139
-
140
- Sessions are stored as YAML:
141
-
142
- ```yaml
143
- version: "1"
144
- name: Login Test
145
- recordedAt: "2026-02-05T12:00:00Z"
146
- browser: chromium
147
- viewport:
148
- width: 1280
149
- height: 720
150
- startUrl: https://example.com/login
151
- steps:
152
- - id: step_001
153
- type: navigate
154
- url: https://example.com/login
155
- timestamp: 0
156
- - id: step_002
157
- type: input
158
- selector: input[name="username"]
159
- value: testuser
160
- injectable: true
161
- timestamp: 1500
162
- - id: step_003
163
- type: click
164
- selector: button[type="submit"]
165
- timestamp: 3000
166
- ```
167
-
168
- ---
169
-
170
- ## 🩺 Browser Management
171
-
172
- Check available browsers:
173
-
174
- ```bash
175
- vulcn doctor
176
- ```
177
-
178
- Install Playwright browsers (if needed):
179
-
180
- ```bash
181
- vulcn install chromium
182
- vulcn install --all # Install all browsers
183
- ```
184
-
185
- ---
186
-
187
- ## 🔧 CI/CD Integration
188
-
189
- Vulcn returns exit code `1` when vulnerabilities are found:
190
-
191
- ```yaml
192
- # GitHub Actions example
193
- - name: Security Test
194
- run: |
195
- npm install -g vulcn
196
- vulcn run tests/login.vulcn.yml --payload xss-basic --headless
197
- ```
56
+ | Package | Description |
57
+ | -------------------------------------------------------------------------------------------------- | ---------------------------------------- |
58
+ | [`vulcn`](https://www.npmjs.com/package/vulcn) | CLI tool |
59
+ | [`@vulcn/engine`](https://www.npmjs.com/package/@vulcn/engine) | Core engine with driver & plugin systems |
60
+ | [`@vulcn/driver-browser`](https://www.npmjs.com/package/@vulcn/driver-browser) | Browser recording with Playwright |
61
+ | [`@vulcn/plugin-payloads`](https://www.npmjs.com/package/@vulcn/plugin-payloads) | XSS, SQLi, SSRF payloads |
62
+ | [`@vulcn/plugin-detect-xss`](https://www.npmjs.com/package/@vulcn/plugin-detect-xss) | Execution-based XSS detection |
63
+ | [`@vulcn/plugin-detect-reflection`](https://www.npmjs.com/package/@vulcn/plugin-detect-reflection) | Pattern-based reflection detection |
198
64
 
199
65
  ---
200
66
 
201
67
  ## 📚 Documentation
202
68
 
203
- - [Contributing Guide](./CONTRIBUTING.md)
204
- - [Security Policy](./SECURITY.md)
69
+ **Full documentation is available at [docs.vulcn.dev](https://docs.vulcn.dev)**
70
+
71
+ - [Quickstart Guide](https://docs.vulcn.dev/quickstart)
72
+ - [CLI Reference](https://docs.vulcn.dev/cli/overview)
73
+ - [Driver System](https://docs.vulcn.dev/drivers/overview)
74
+ - [Plugin System](https://docs.vulcn.dev/plugins/overview)
75
+ - [API Reference](https://docs.vulcn.dev/api/overview)
205
76
 
206
77
  ---
207
78
 
208
- ## 🛣️ Roadmap
79
+ ## 🤝 Contributing
209
80
 
210
- - [ ] HTML/JSON reports
211
- - [ ] Custom payload definitions
212
- - [ ] SSRF and path traversal payloads
213
- - [ ] Authenticated session support
214
- - [ ] API endpoint testing
215
- - [ ] Vulnerability severity scoring
81
+ See [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup and guidelines.
216
82
 
217
83
  ---
218
84
 
219
85
  ## 📝 License
220
86
 
221
- [MIT](./LICENSE) © [rawlab](https://rawlab.dev)
87
+ [AGPL-3.0](./LICENSE) © [rawlab](https://rawlab.dev)
222
88
 
223
89
  ---
224
90