---
base_model: Qwen/Qwen3.5-0.8B-Base
library_name: peft
license: apache-2.0
tags:
- base_model:adapter:Qwen/Qwen3.5-0.8B-Base
- lora
- transformers
- security
- xss
- vulnerability-detection
- cybersecurity
- web-security
language:
- en
pipeline_tag: text-classification
---
# XSS Decision Model — Kev 0.8B Live v2
A **0.8B parameter Small Language Model (SLM)** fine-tuned for real-time XSS (Cross-Site Scripting) vulnerability decision-making. This is a LoRA adapter on top of `Qwen/Qwen3.5-0.8B-Base`, trained using the [Kev](https://github.com/jaredpalmer/kev) typed-decision framework.
## What It Does
The model makes 5 types of XSS assessment decisions in real-time:
| Task | Question | Description |
|------|----------|-------------|
| **triage** | exploitable? | Should this URL/parameter combination be probed for XSS? |
| **analyze** | true_context | What is the actual injection context? (html_text, html_attr, js_string, dom_html, etc.) |
| **interpret** | exploitable? | Given reflection evidence, is this actually exploitable? |
| **strategy** | best_probe | Which XSS probe technique should be tried? |
| **escalate** | escalation | What escalation technique to try next? (evasion, mXSS, CSP bypass) |
## Held-out Test Accuracy
Evaluated on 57 held-out records (never seen during training):
| Task | Question | Accuracy |
|------|----------|----------|
| analyze | has_sanitizer | **100%** (21/21) |
| analyze | true_context | **95.2%** (20/21) |
| interpret | exploitable | **100%** (7/7) |
| escalate | escalation | **100%** (2/2) |
| strategy | best_probe | **75%** (3/4) |
| triage | exploitable | **78.3%** (18/23) |
## Pipeline Integration Results (XSS-LiveBench-v2)
When integrated into the xss-specialist live assessment pipeline — 225 cases:
| Metric | Value | 95% Bootstrap CI |
|--------|-------|-------------------|
| Precision | **1.000** | [1.000, 1.000] |
| Recall | **1.000** | [1.000, 1.000] |
| FPR | **0.000** | [0.000, 0.000] |
| FNR | **0.000** | [0.000, 0.000] |
| Confirmed-exec accuracy | **1.000** | [1.000, 1.000] |
| Near-miss leakage | **0.000** | — |
**Confusion matrix:** TP=157 · FP=0 · FN=0 · TN=68
### By XSS class
| Class | Cases | Recall |
|-------|-------|--------|
| Reflected | 75 | 100% |
| DOM | 78 | 100% |
| Stored | 4 | 100% |
| Safe (negative) | 68 | 0 FP |
### By injection context
| Context | Cases | Accuracy |
|---------|-------|----------|
| html_text | 83 | 100% |
| dom_html | 81 | 100% |
| html_attr | 22 | 100% |
| js_code | 22 | 100% |
| js_string | 8 | 100% |
| html_attr_url | 5 | 100% |
| css | 3 | 100% |
| dom_attr | 1 | 100% |
### By category (25 categories — all 100%)
`reflected` (37) · `owasp_evasion` (24) · `sanitizer_nearmiss` (21) · `csp_bypass` (20) · `fp_torture` (16, 0 FP) · `dom` (15) · `modern_controls` (12) · `advanced_delivery` (8) · `dom_source` (7) · `event_driven` (7) · `encoding_chain` (6) · `framework_sink` (6) · `svg_xss` (6) · `encoding` (5) · `postmessage` (5) · `proto_pollution` (5) · `sanitizer` (5) · `mxss` (4) · `dom_clobbering` (3) · `script_gadget` (3) · `template_injection` (3) · `second_order` (2) · `stored` (2) · `websocket` (2) · `dom_multistep` (1)
### Live XSS Lab — 10 Independent Scenarios
| # | Scenario | Context | Status |
|---|----------|---------|--------|
| 1 | Basic reflected XSS | html_attr | CONFIRMED |
| 2 | Reflected in HTML body | html_text | CONFIRMED |
| 3 | DOM-based XSS (innerHTML) | dom_html | CONFIRMED |
| 4 | Attribute injection | html_attr | CONFIRMED |
| 5 | JS string injection (multi-context) | js_string | CONFIRMED |
| 6 | Unquoted attribute injection | html_attr | CONFIRMED |
| 7 | `