Skip to content

add 19 vulnerable snippets and benchmark overview - #2

Merged
StackOverflowIsBetterThanAnyAI merged 1 commit into
mainfrom
make-examples-exploitable
Oct 30, 2026
Merged

StackOverflowIsBetterThanAnyAI merged 1 commit into
mainfrom
make-examples-exploitable

Conversation

@StackOverflowIsBetterThanAnyAI

Copy link
Copy Markdown
Owner

New client-side snippets: CWE-79, CWE-95, CWE-1321, CWE-1333. New server-side snippets: CWE-22, CWE-78, CWE-89, CWE-117, CWE-209, CWE-327, CWE-352, CWE-502, CWE-601, CWE-611, CWE-614, CWE-916, CWE-918, CWE-942, CWE-943.

README now lists all 31 snippets with their intended weakness.

New client-side snippets: CWE-79, CWE-95, CWE-1321, CWE-1333.
New server-side snippets: CWE-22, CWE-78, CWE-89, CWE-117, CWE-209,
CWE-327, CWE-352, CWE-502, CWE-601, CWE-611, CWE-614, CWE-916,
CWE-918, CWE-942, CWE-943.

README now lists all 31 snippets with their intended weakness.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@StackOverflowIsBetterThanAnyAI
StackOverflowIsBetterThanAnyAI merged commit 575be74 into main Oct 30, 2026
1 check passed
@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6141c974-0e35-4191-8211-a65c57240c8c
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread CWE-1333/main.js
@@ -0,0 +1,3 @@
const main = (email) => {
return /^([a-zA-Z0-9]+)*@example\.com$/.test(email)
Comment thread CWE-22/main.js
Comment on lines +6 to +9
app.get('/download', (req, res) => {
const filePath = path.join(__dirname, 'uploads', req.query.file)
res.sendFile(filePath)
})
Comment thread CWE-352/main.js
const cookieParser = require('cookie-parser')

const app = express()
app.use(cookieParser())
Comment thread CWE-78/main.js
Comment on lines +6 to +10
app.get('/ping', (req, res) => {
exec(`ping -c 1 ${req.query.host}`, (err, stdout) => {
res.json({ output: stdout })
})
})
Comment thread CWE-89/main.js
Comment on lines +7 to +14
app.get('/products', (req, res) => {
const query = `SELECT * FROM products WHERE category = '${req.query.category}'`

connection.query(query, (err, rows) => {
if (err) return res.status(500).end()
res.json(rows)
})
})
Comment thread CWE-943/main.js
Comment on lines +10 to +17
app.post('/login', async (req, res) => {
const user = await users.findOne({
username: req.body.username,
password: req.body.password,
})

res.json({ authenticated: Boolean(user) })
})
Comment thread CWE-1321/main.js
if (!target[key]) target[key] = {}
merge(target[key], source[key])
} else {
target[key] = source[key]
Comment thread CWE-614/main.js

app.post('/login', (req, res) => {
const sessionId = crypto.randomBytes(32).toString('hex')
res.cookie('sessionId', sessionId, { httpOnly: true, secure: false })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants