mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Python: Remove suspicious packages
This commit is contained in:
@@ -9,6 +9,7 @@ from collections import defaultdict
|
|||||||
import yaml
|
import yaml
|
||||||
import shutil
|
import shutil
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
|
|
||||||
VERSION = "process-mrva-results 0.0.1"
|
VERSION = "process-mrva-results 0.0.1"
|
||||||
|
|
||||||
@@ -104,6 +105,10 @@ def gather_from_existing():
|
|||||||
gather_from_bqrs_results()
|
gather_from_bqrs_results()
|
||||||
|
|
||||||
for pkg in package_data:
|
for pkg in package_data:
|
||||||
|
if not re.match(r"[a-zA-Z0-9-_]+", pkg):
|
||||||
|
print(f"Skipping {repr(pkg)}")
|
||||||
|
continue
|
||||||
|
|
||||||
pkg_path = mad_path / f"auto-{pkg}.model.yml"
|
pkg_path = mad_path / f"auto-{pkg}.model.yml"
|
||||||
|
|
||||||
print(f"Writing {pkg_path}")
|
print(f"Writing {pkg_path}")
|
||||||
|
|||||||
Reference in New Issue
Block a user