Skip to content

Commit 2c0bed1

Browse files
committed
Python: Remove suspicious packages
1 parent 0b5c73a commit 2c0bed1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

python/ql/src/meta/ClassHierarchy/process-mrva-results.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import yaml
1010
import shutil
1111
import os
12+
import re
1213

1314
VERSION = "process-mrva-results 0.0.1"
1415

@@ -104,6 +105,10 @@ def gather_from_existing():
104105
gather_from_bqrs_results()
105106

106107
for pkg in package_data:
108+
if not re.match(r"[a-zA-Z0-9-_]+", pkg):
109+
print(f"Skipping {repr(pkg)}")
110+
continue
111+
107112
pkg_path = mad_path / f"auto-{pkg}.model.yml"
108113

109114
print(f"Writing {pkg_path}")

0 commit comments

Comments
 (0)