github / github/codeql

There is a script injection here, but codeql can't detect it

Aperta
#12,472 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub
false-positive
Lingua principale
CodeQL
Stelle
10.1k
Fork
2.1k
Merge medio
2g 15h
PR unite (30g)
141

Descrizione

**There is a script injection here, but codeql can't detect it, it may be a source problemDescription of the false positive**

**Code samples or links to source code**

For closed source code: (redacted) code samples that illustrate the problem, for example:

```
public AccessResult addHtmlTemplate(@RequestBody TemplateBean template) {
params = template.getParams();
map = (Map)this.objectMapper.readValue(params.getExtensionParam(), Map.class);
String newExpression = ((String)map.get("expression"))
ScriptEngineManager engineManager = new ScriptEngineManager();
ScriptEngine engine = engineManager.getEngineByName("javascript");

try {
Object eval = engine.eval(newExpression);
if (eval != null) {
return true;
}
} catch (Exception var5) {
var5.printStackTrace();
}
}
```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.