@vulcn/engine 0.2.0 → 0.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,103 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - c62a3dc: ### `@vulcn/plugin-report` — New Package
8
+
9
+ Introducing the **Report Generation Plugin** — generate professional security reports at the end of every `vulcn run`.
10
+ - **HTML**: Modern dark-themed dashboard with risk gauge, severity breakdown bars, expandable finding cards, Vulcn branding, Inter + JetBrains Mono typography, and print-friendly CSS
11
+ - **JSON**: Machine-readable structured output for CI/CD pipelines — includes severity counts, risk score, vuln types, affected URLs
12
+ - **YAML**: Human-readable YAML with descriptive header comment — same data model as JSON
13
+ - Uses the `onRunEnd` plugin hook to intercept results after execution completes
14
+ - Exports `generateHtml`, `generateJson`, `generateYaml` for programmatic use
15
+
16
+ ### `@vulcn/engine`
17
+ - **Plugin lifecycle hooks**: `DriverManager.execute()` now invokes `onRunStart` and `onRunEnd` plugin hooks around the driver runner, enabling plugins like the report generator to intercept and process results
18
+ - Removed legacy `Runner` and `Recorder` exports — all execution now goes through `DriverManager`
19
+ - Updated package description and SEO keywords for npm discoverability
20
+
21
+ ### `vulcn` (CLI)
22
+ - Added `--report <format>` flag (`html`, `json`, `yaml`, `all`) to generate security reports after test runs
23
+ - Added `--report-output <dir>` flag to specify output directory for generated reports
24
+ - Report plugin is auto-loaded when `--report` flag is used
25
+ - Updated package description and SEO keywords — positioned as a modern, fast alternative to legacy security scanners
26
+
27
+ ### `@vulcn/driver-browser`
28
+ - Updated package description, keywords, homepage, and bugs URL for npm discoverability
29
+
30
+ ### `@vulcn/plugin-payloads`
31
+ - Updated package description, keywords, homepage, and bugs URL for npm discoverability
32
+
33
+ ### `@vulcn/plugin-detect-xss`
34
+ - Updated package description, keywords, homepage, and bugs URL for npm discoverability
35
+
36
+ ### `@vulcn/plugin-detect-reflection`
37
+ - Updated package description, keywords, homepage, and bugs URL for npm discoverability
38
+
39
+ ## 0.3.0
40
+
41
+ ### Minor Changes
42
+
43
+ - 621502c: ## Driver-Based Architecture
44
+
45
+ Introduces a modular driver system that makes Vulcn extensible to different recording targets beyond web browsers.
46
+
47
+ ### New Package: `@vulcn/driver-browser`
48
+
49
+ A new package that encapsulates all Playwright-based browser recording and replay functionality:
50
+ - **BrowserRecorder** - Records browser interactions (clicks, inputs, navigation)
51
+ - **BrowserRunner** - Replays sessions with payload injection and detection
52
+ - **Browser utilities** - Smart browser launching with system Chrome/Edge fallback
53
+
54
+ Step types: `browser.navigate`, `browser.click`, `browser.input`, `browser.keypress`, `browser.scroll`, `browser.wait`
55
+
56
+ ### New in `@vulcn/engine`
57
+
58
+ #### DriverManager
59
+
60
+ New `DriverManager` class for loading and orchestrating drivers:
61
+ - `register(driver)` - Register a driver
62
+ - `load(nameOrPath)` - Load driver from npm or local file
63
+ - `startRecording(driverName, config)` - Start recording with a driver
64
+ - `execute(session, pluginManager)` - Execute session with payloads
65
+ - `getForSession(session)` - Get driver for a session
66
+
67
+ #### Driver Interfaces
68
+
69
+ New TypeScript interfaces for building custom drivers:
70
+ - `VulcnDriver` - Main driver definition
71
+ - `RecorderDriver` - Recording interface
72
+ - `RunnerDriver` - Replay/execution interface
73
+ - `RecordingHandle` - Handle for controlling active recordings
74
+ - `Session` - Generic session format with `driver` field
75
+ - `Step` - Generic step format with namespaced types
76
+
77
+ ### Session Format Changes
78
+
79
+ Sessions now include a `driver` field to specify which driver handles them:
80
+
81
+ ```yaml
82
+ name: My Session
83
+ driver: browser
84
+ driverConfig:
85
+ browser: chromium
86
+ startUrl: https://example.com
87
+ steps:
88
+ - type: browser.navigate
89
+ - type: browser.input
90
+ ```
91
+
92
+ ### Documentation
93
+ - New "Drivers" tab in docs with overview, browser driver reference, and custom driver guide
94
+ - Updated API reference with DriverManager documentation
95
+ - Simplified README pointing to docs.vulcn.dev
96
+
97
+ ### Breaking Changes
98
+
99
+ None - existing code continues to work. Legacy `Recorder` and `Runner` exports are preserved but deprecated.
100
+
3
101
  All notable changes to this project will be documented in this file.
4
102
 
5
103
  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