Views
No views yet
<script>alert(document.cookie)</script>'; DROP TABLE users; --| cat /etc/passwd../../etc/shadow| Label | ID | Meaning |
|---|---|---|
SAFE | 0 | Safe output (normal text, parameterized queries, sanitized code) |
MALICIOUS | 1 | Dangerous payload detected |
1from transformers import pipeline
2
3clf = pipeline("text-classification", model="Builder117/distilbert-insecure-output")
4
5clf("<script>alert(document.cookie)</script>")
6# [{'label': 'MALICIOUS', 'score': 0.98}]
7
8clf("SELECT * FROM products WHERE id = ?")
9# [{'label': 'SAFE', 'score': 0.97}] # parameterized — safedistilbert-base-uncased