5
5
from pathlib import Path
6
6
import json
7
7
import os
8
- import requests
9
8
import shutil
10
9
import subprocess
11
10
import tempfile
12
11
import sys
13
12
14
13
15
- defaultModelPath = "java/ql/lib/semmle/code/java/frameworks"
16
14
lgtmSlugToModelFile = {
17
15
# "apache/commons-beanutils": "apache/BeanUtilsGenerated.qll",
18
16
# "apache/commons-codec": "apache/CodecGenerated.qll",
19
17
# "apache/commons-lang": "apache/Lang3Generated.qll",
20
- "apache/commons-io" : "apache/IOGenerated.qll " ,
18
+ "apache/commons-io" : "org. apache.commons.io " ,
21
19
}
22
20
23
21
@@ -36,13 +34,12 @@ def regenerateModel(lgtmSlug, extractedDb):
36
34
print ("ERROR: slug " + lgtmSlug +
37
35
" is not mapped to a model file in script " + sys .argv [0 ])
38
36
sys .exit (1 )
39
- modelFile = defaultModelPath + "/" + lgtmSlugToModelFile [lgtmSlug ]
37
+ modelFile = lgtmSlugToModelFile [lgtmSlug ]
40
38
codeQlRoot = findGitRoot ()
41
- targetModel = codeQlRoot + "/" + modelFile
42
39
subprocess .check_call ([codeQlRoot + "/java/ql/src/utils/model-generator/GenerateFlowModel.py" ,
43
- "--with-summaries" , "--with-sinks" ,
44
- extractedDb , targetModel ])
45
- print ("Regenerated " + targetModel )
40
+ "--with-summaries" , "--with-sinks" , "--with-negative-summaries" ,
41
+ extractedDb , modelFile ])
42
+ print ("Regenerated " + modelFile )
46
43
shutil .rmtree (tmpDir )
47
44
48
45
0 commit comments