@vulcn/engine 0.1.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 +28 -0
- package/LICENSE +21 -0
- package/README.md +227 -0
- package/dist/index.cjs +724 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +546 -0
- package/dist/index.d.ts +546 -0
- package/dist/index.js +683 -0
- package/dist/index.js.map +1 -0
- package/package.json +70 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2026-02-05
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Initial release of Vulcn - Security testing recorder & runner
|
|
13
|
+
- **Session Recording** - Record browser interactions (clicks, form fills, navigation)
|
|
14
|
+
- **Session Replay** - Replay sessions with security payloads injected
|
|
15
|
+
- **Smart Browser Detection** - Uses system Chrome/Edge first, Playwright fallback
|
|
16
|
+
- **Built-in Payloads** - XSS and SQL injection payload sets
|
|
17
|
+
- **YAML Sessions** - Human-readable session format with Zod validation
|
|
18
|
+
- **Cross-Platform** - macOS, Linux, and Windows support
|
|
19
|
+
|
|
20
|
+
### CLI Commands
|
|
21
|
+
|
|
22
|
+
- `vulcn record` - Record browser interactions
|
|
23
|
+
- `vulcn run` - Replay session with payloads
|
|
24
|
+
- `vulcn payloads` - List available payloads
|
|
25
|
+
- `vulcn doctor` - Check browser availability
|
|
26
|
+
- `vulcn install` - Install Playwright browsers
|
|
27
|
+
|
|
28
|
+
[0.1.0]: https://github.com/rawlab-dev/vulcn/releases/tag/v0.1.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 rawlab
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# 🔐 Vulcn
|
|
2
|
+
|
|
3
|
+
**Security testing made simple.** Record once, test with payloads, find vulnerabilities.
|
|
4
|
+
|
|
5
|
+
[](https://github.com/rawlab-dev/vulcn/actions/workflows/ci.yml)
|
|
6
|
+
[](https://www.npmjs.com/package/vulcn)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## ⚡ Quick Start
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Install globally
|
|
15
|
+
npm install -g vulcn
|
|
16
|
+
|
|
17
|
+
# Record a session
|
|
18
|
+
vulcn record --url https://example.com/login
|
|
19
|
+
|
|
20
|
+
# Run with XSS payloads
|
|
21
|
+
vulcn run session.vulcn.yml --payload xss-basic
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Zero-config browser support** — Vulcn uses your existing Chrome or Edge. No browser downloads needed.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 🎯 What is Vulcn?
|
|
29
|
+
|
|
30
|
+
Vulcn is a security testing tool that:
|
|
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
|
|
35
|
+
|
|
36
|
+
Think of it as **Playwright + Burp Suite**, but simpler and focused on automated payload testing.
|
|
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
|
+
```
|
|
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);
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
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:
|
|
98
|
+
|
|
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
|
+
```
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## 📚 Documentation
|
|
202
|
+
|
|
203
|
+
- [Contributing Guide](./CONTRIBUTING.md)
|
|
204
|
+
- [Security Policy](./SECURITY.md)
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## 🛣️ Roadmap
|
|
209
|
+
|
|
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
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## 📝 License
|
|
220
|
+
|
|
221
|
+
[MIT](./LICENSE) © [rawlab](https://rawlab.dev)
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
<p align="center">
|
|
226
|
+
Made with ❤️ by <a href="https://rawlab.dev">rawlab</a>
|
|
227
|
+
</p>
|