mcp-server-semgrep
Version:
MCP Server for Semgrep Integration - static code analysis with AI
22 lines (19 loc) • 604 B
JavaScript
function test1(body) {
// ruleid: xml2json-xxe
const xml2json = require('xml2json')
const result = xml2json.toJson(body, { object: true, arrayNotation: true })
return result
}
function okTest1() {
// ok: xml2json-xxe
const xml2json = require('xml2json')
const result = xml2json.toJson('<xml></xml>', { object: true, arrayNotation: true })
return result
}
function okTest1() {
// ok: xml2json-xxe
const xml2json = require('xml2json')
let body = '<xml></xml>'
const result = xml2json.toJson(body, { object: true, arrayNotation: true })
return result
}