github / github/codeql

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

Open
#12,472 7 comments 0 reactions 0 assignees View on GitHub
false-positive
Dominant language
CodeQL
Stars
10.1k
Forks
2.1k
Avg merge
2d 15h
Merged PRs (30d)
141

Description

**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();
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.