8
8
import subprocess
9
9
import sys
10
10
import tempfile
11
+ import re
11
12
12
13
def quote_if_needed (row ):
13
14
if row != "true" and row != "false" :
@@ -52,8 +53,8 @@ def printHelp(self):
52
53
--with-sources
53
54
--with-summaries
54
55
--with-neutrals
55
- --with-mixed-summaries (Experimental) . May not be used in conjunction with --with-summaries.
56
- --with-mixed-neutrals (Experimental) . Should only be used in conjunction with --with-mixed-summaries.
56
+ --with-mixed-summaries. May not be used in conjunction with --with-summaries.
57
+ --with-mixed-neutrals. Should only be used in conjunction with --with-mixed-summaries.
57
58
--with-typebased-summaries (Experimental)
58
59
If none of these flags are specified, all models are generated except for the type based models.
59
60
@@ -65,7 +66,7 @@ def printHelp(self):
65
66
$ python3 GenerateFlowModel.py /tmp/dbs/my_library_db --with-sinks my_directory
66
67
67
68
68
- Requirements: `codeql` should both appear on your path.
69
+ Requirements: `codeql` should appear on your path.
69
70
""" )
70
71
71
72
@@ -211,7 +212,9 @@ def save(self, extensions, extension):
211
212
extensions:
212
213
{0}"""
213
214
for entry in extensions :
214
- target = os .path .join (self .generatedFrameworks , entry + extension )
215
+ # Replace problematic characters with dashes, and collapse multiple dashes.
216
+ sanitizedEntry = re .sub (r'-+' , '-' , entry .replace ('/' , '-' ).replace (':' , '-' ))
217
+ target = os .path .join (self .generatedFrameworks , sanitizedEntry + extension )
215
218
with open (target , "w" ) as f :
216
219
f .write (extensionTemplate .format (extensions [entry ]))
217
220
print ("Models as data extensions written to " + target )
0 commit comments