sonarjs/xml-parser-xxe
eslint-plugin-sonarjs
No autofixRecommended
eslint.config.js
export default [
{
rules: {
"sonarjs/xml-parser-xxe": "error",
},
},
];const libxmljs = require("libxmljs");
var fs = require('fs');
var xml = fs.readFileSync('xxe.xml', 'utf8');
var xmlDoc = libxmljs.parseXmlString(xml, { noblanks: true, noent: true, nocdata: true }); // Noncompliant: noent set to trueconst libxmljs = require("libxmljs");
var fs = require('fs');
var xml = fs.readFileSync('xxe.xml', 'utf8');
var xmlDoc = libxmljs.parseXmlString(xml); // Compliant: noent set to false by defaultExamples from the ESLint documentation.
sonarjs/xml-parser-xxe
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/xml-parser-xxe": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Web application technologies should not disclose version information
Vi.mock should be declared at module scope
Loop counters should not be assigned within the loop body