diff --git a/cpp/misc/bulk_generation_targets.json b/cpp/misc/bulk_generation_targets.json deleted file mode 100644 index 4cddef005b2..00000000000 --- a/cpp/misc/bulk_generation_targets.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "strategy": "dca", - "language": "cpp", - "targets": [ - { "name": "openssl", "with-sources": false, "with-sinks": false }, - { "name": "sqlite", "with-sources": false, "with-sinks": false } - ], - "destination": "cpp/ql/lib/ext/generated" -} \ No newline at end of file diff --git a/cpp/misc/bulk_generation_targets.yml b/cpp/misc/bulk_generation_targets.yml new file mode 100644 index 00000000000..0e42eac3765 --- /dev/null +++ b/cpp/misc/bulk_generation_targets.yml @@ -0,0 +1,10 @@ +language: cpp +strategy: dca +destination: cpp/ql/lib/ext/generated +targets: +- name: openssl + with-sinks: false + with-sources: false +- name: sqlite + with-sinks: false + with-sources: false diff --git a/misc/scripts/models-as-data/bulk_generate_mad.py b/misc/scripts/models-as-data/bulk_generate_mad.py index 22a872dc2bf..4a6ee9fc51e 100644 --- a/misc/scripts/models-as-data/bulk_generate_mad.py +++ b/misc/scripts/models-as-data/bulk_generate_mad.py @@ -15,7 +15,12 @@ import json import requests import zipfile import tarfile -from functools import cmp_to_key + +try: + import yaml +except ImportError: + print("ERROR: PyYAML is not installed. Please install it with 'pip install pyyaml'.") + sys.exit(1) import generate_mad as mad @@ -492,9 +497,9 @@ if __name__ == "__main__": sys.exit(1) try: with open(args.config, "r") as f: - config = json.load(f) - except json.JSONDecodeError as e: - print(f"ERROR: Failed to parse JSON file {args.config}: {e}") + config = yaml.safe_load(f) + except yaml.YAMLError as e: + print(f"ERROR: Failed to parse YAML file {args.config}: {e}") sys.exit(1) main(config, args) diff --git a/rust/misc/bulk_generation_targets.json b/rust/misc/bulk_generation_targets.json deleted file mode 100644 index 274d5dc5b36..00000000000 --- a/rust/misc/bulk_generation_targets.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "strategy": "repo", - "language": "rust", - "targets": [ - { - "name": "libc", - "git_repo": "https://github.com/rust-lang/libc", - "git_tag": "0.2.172" - }, - { - "name": "log", - "git_repo": "https://github.com/rust-lang/log", - "git_tag": "0.4.27" - }, - { - "name": "memchr", - "git_repo": "https://github.com/BurntSushi/memchr", - "git_tag": "2.7.4" - }, - { - "name": "once_cell", - "git_repo": "https://github.com/matklad/once_cell", - "git_tag": "v1.21.3" - }, - { - "name": "rand", - "git_repo": "https://github.com/rust-random/rand", - "git_tag": "0.9.1" - }, - { - "name": "smallvec", - "git_repo": "https://github.com/servo/rust-smallvec", - "git_tag": "v1.15.0" - }, - { - "name": "serde", - "git_repo": "https://github.com/serde-rs/serde", - "git_tag": "v1.0.219" - }, - { - "name": "tokio", - "git_repo": "https://github.com/tokio-rs/tokio", - "git_tag": "tokio-1.45.0" - }, - { - "name": "reqwest", - "git_repo": "https://github.com/seanmonstar/reqwest", - "git_tag": "v0.12.15" - }, - { - "name": "rocket", - "git_repo": "https://github.com/SergioBenitez/Rocket", - "git_tag": "v0.5.1" - }, - { - "name": "actix-web", - "git_repo": "https://github.com/actix/actix-web", - "git_tag": "web-v4.11.0" - }, - { - "name": "hyper", - "git_repo": "https://github.com/hyperium/hyper", - "git_tag": "v1.6.0" - }, - { - "name": "clap", - "git_repo": "https://github.com/clap-rs/clap", - "git_tag": "v4.5.38" - } - ], - "destination": "rust/ql/lib/ext/generated", - "extractor_options": [ - "cargo_features='*'" - ] -} \ No newline at end of file diff --git a/rust/misc/bulk_generation_targets.yml b/rust/misc/bulk_generation_targets.yml new file mode 100644 index 00000000000..fb0932f7a43 --- /dev/null +++ b/rust/misc/bulk_generation_targets.yml @@ -0,0 +1,45 @@ +strategy: repo +language: rust +destination: rust/ql/lib/ext/generated +extractor_options: +- cargo_features='*' +targets: +- git_repo: https://github.com/rust-lang/libc + git_tag: 0.2.172 + name: libc +- git_repo: https://github.com/rust-lang/log + git_tag: 0.4.27 + name: log +- git_repo: https://github.com/BurntSushi/memchr + git_tag: 2.7.4 + name: memchr +- git_repo: https://github.com/matklad/once_cell + git_tag: v1.21.3 + name: once_cell +- git_repo: https://github.com/rust-random/rand + git_tag: 0.9.1 + name: rand +- git_repo: https://github.com/servo/rust-smallvec + git_tag: v1.15.0 + name: smallvec +- git_repo: https://github.com/serde-rs/serde + git_tag: v1.0.219 + name: serde +- git_repo: https://github.com/tokio-rs/tokio + git_tag: tokio-1.45.0 + name: tokio +- git_repo: https://github.com/seanmonstar/reqwest + git_tag: v0.12.15 + name: reqwest +- git_repo: https://github.com/SergioBenitez/Rocket + git_tag: v0.5.1 + name: rocket +- git_repo: https://github.com/actix/actix-web + git_tag: web-v4.11.0 + name: actix-web +- git_repo: https://github.com/hyperium/hyper + git_tag: v1.6.0 + name: hyper +- git_repo: https://github.com/clap-rs/clap + git_tag: v4.5.38 + name: clap