diff --git a/MODULE.bazel b/MODULE.bazel index c1c940ee744f..5b223081a793 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -70,10 +70,14 @@ RUST_VERSION = "nightly/2026-11-16" rust = use_extension("@rules_rust//rust:extensions.bzl", "rust") rust.toolchain( edition = RUST_EDITION, - # We need those extra target triples so that we can build universal binaries on macos + # We need those extra target triples so that we can build universal binaries on macos, and so + # that license notice inventories can analyze every shipped platform from any host extra_target_triples = [ "x86_64-apple-darwin", "aarch64-apple-darwin", + "x86_64-unknown-linux-gnu", + "aarch64-unknown-linux-gnu", + "x86_64-pc-windows-msvc", ], # generated by buildutils-internal/scripts/fill-rust-sha256s.py (internal repo) sha256s = { @@ -109,6 +113,12 @@ use_repo(rust, "rust_toolchains") register_toolchains("@rust_toolchains//:all") +# analysis-only, selected solely by the platforms of license notice inventories +register_toolchains( + "//misc/notices:stub_cc", + "//misc/notices:all", +) + # deps for python extractor # keep in sync by running `misc/bazel/3rdparty/update_all_rust_deps.sh` py_deps = use_extension("//misc/bazel/3rdparty:py_deps_extension.bzl", "p") diff --git a/cpp/extractor/bmn/BUILD.bazel b/cpp/extractor/bmn/BUILD.bazel index 3b046b4f9c74..78801694fd01 100644 --- a/cpp/extractor/bmn/BUILD.bazel +++ b/cpp/extractor/bmn/BUILD.bazel @@ -1,5 +1,6 @@ load("@rules_rust//rust:defs.bzl", "rust_test") load("//misc/bazel:rust.bzl", "codeql_rust_binary") +load("//misc/bazel:rust_notices.bzl", "rust_notices") load("//misc/bazel/3rdparty/rust_workspace_deps:defs.bzl", "all_crate_deps") exports_files([ @@ -14,6 +15,10 @@ codeql_rust_binary( deps = all_crate_deps(normal = True), ) +rust_notices( + components = [":bmn"], +) + rust_test( name = "unit_tests", crate = ":single_arch/bmn", diff --git a/cpp/extractor/bmn/NOTICES b/cpp/extractor/bmn/NOTICES new file mode 100644 index 000000000000..7ac234d1ae2d --- /dev/null +++ b/cpp/extractor/bmn/NOTICES @@ -0,0 +1,750 @@ +Generated file; regenerate with the extractor's notices script. +Legal texts are provided in the CLI's Open-Source-Notices directory. +Extractor-only archives require that shared directory. + +Dependency: crates.io/adler2/2.0.1 +Name: adler2 +Version: 2.0.1 +Origin: https://github.com/oyvindln/adler2 +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/aes/0.9.4 +Name: aes +Version: 0.9.4 +Origin: https://github.com/RustCrypto/block-ciphers +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ahash/0.8.12 +Name: ahash +Version: 0.8.12 +Origin: https://github.com/tkaitchuck/ahash +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/aho-corasick/1.1.5 +Name: aho-corasick +Version: 1.1.5 +Origin: https://github.com/BurntSushi/aho-corasick +License: MIT +Copyright: Copyright (c) 2015 Andrew Gallant +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/all_asserts/2.3.4 +Name: all_asserts +Version: 2.3.4 +Origin: https://github.com/ohsayan/all_asserts +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/allocator-api2/0.2.21 +Name: allocator-api2 +Version: 0.2.21 +Origin: https://github.com/zakarumych/allocator-api2 +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anyhow/1.0.104 +Name: anyhow +Version: 1.0.104 +Origin: https://github.com/dtolnay/anyhow +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/bitflags/2.13.2 +Name: bitflags +Version: 2.13.2 +Origin: https://github.com/bitflags/bitflags +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/block-buffer/0.12.1 +Name: block-buffer +Version: 0.12.1 +Origin: https://github.com/RustCrypto/utils +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/bumpalo/3.20.3 +Name: bumpalo +Version: 3.20.3 +Origin: https://github.com/fitzgen/bumpalo +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/bzip2/0.6.1 +Name: bzip2 +Version: 0.6.1 +Origin: https://github.com/trifectatechfoundation/bzip2-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/cached/0.54.0 +Name: cached +Version: 0.54.0 +Origin: https://github.com/jaemk/cached +License: MIT +Copyright: Copyright (c) 2017 James Kominick +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/cached_proc_macro_types/0.1.1 +Name: cached_proc_macro_types +Version: 0.1.1 +Origin: https://github.com/jaemk/cached +License: MIT +Copyright: Copyright (c) 2017 James Kominick +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/cfg-if/1.0.4 +Name: cfg-if +Version: 1.0.4 +Origin: https://github.com/rust-lang/cfg-if +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/chrono/0.4.45 +Name: chrono +Version: 0.4.45 +Origin: https://github.com/chronotope/chrono +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/cipher/0.5.2 +Name: cipher +Version: 0.5.2 +Origin: https://github.com/RustCrypto/traits +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/cmov/0.5.4 +Name: cmov +Version: 0.5.4 +Origin: https://github.com/RustCrypto/utils +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/const-oid/0.10.2 +Name: const-oid +Version: 0.10.2 +Origin: https://github.com/RustCrypto/formats +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/constant_time_eq/0.6.1 +Name: constant_time_eq +Version: 0.6.1 +Origin: https://codeberg.org/cesarb/constant_time_eq +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/core-foundation-sys/0.8.7 +Name: core-foundation-sys +Version: 0.8.7 +Origin: https://github.com/servo/core-foundation-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/cpubits/0.1.1 +Name: cpubits +Version: 0.1.1 +Origin: https://github.com/RustCrypto/utils +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/cpufeatures/0.3.1 +Name: cpufeatures +Version: 0.3.1 +Origin: https://github.com/RustCrypto/utils +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/crc32fast/1.5.4 +Name: crc32fast +Version: 1.5.4 +Origin: https://github.com/srijs/rust-crc32fast +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/crossbeam-deque/0.8.8 +Name: crossbeam-deque +Version: 0.8.8 +Origin: https://github.com/crossbeam-rs/crossbeam +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/crossbeam-epoch/0.9.21 +Name: crossbeam-epoch +Version: 0.9.21 +Origin: https://github.com/crossbeam-rs/crossbeam +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/crossbeam-utils/0.8.23 +Name: crossbeam-utils +Version: 0.8.23 +Origin: https://github.com/crossbeam-rs/crossbeam +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/crypto-common/0.2.2 +Name: crypto-common +Version: 0.2.2 +Origin: https://github.com/RustCrypto/traits +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ctutils/0.4.8 +Name: ctutils +Version: 0.4.8 +Origin: https://github.com/RustCrypto/utils +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/deflate64/0.1.12 +Name: deflate64 +Version: 0.1.12 +Origin: https://github.com/anatawa12/deflate64-rs +License: MIT +Copyright: Copyright (c) .NET Foundation and Contributors +Copyright: Copyright (c) anatawa12 2023 +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/deranged/0.5.8 +Name: deranged +Version: 0.5.8 +Origin: https://github.com/jhpratt/deranged +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/digest/0.11.3 +Name: digest +Version: 0.11.3 +Origin: https://github.com/RustCrypto/traits +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/either/1.19.0 +Name: either +Version: 1.19.0 +Origin: https://github.com/rayon-rs/either +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/equivalent/1.0.2 +Name: equivalent +Version: 1.0.2 +Origin: https://github.com/indexmap-rs/equivalent +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/errno/0.3.14 +Name: errno +Version: 0.3.14 +Origin: https://github.com/lambda-fairy/rust-errno +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/fastrand/2.5.0 +Name: fastrand +Version: 2.5.0 +Origin: https://github.com/smol-rs/fastrand +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/flate2/1.1.9 +Name: flate2 +Version: 1.1.9 +Origin: https://github.com/rust-lang/flate2-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/foldhash/0.2.0 +Name: foldhash +Version: 0.2.0 +Origin: https://github.com/orlp/foldhash +License: Zlib +Copyright: Copyright (c) 2024 Orson Peters +License-File: ../Open-Source-Notices/zlib-license.txt + +Dependency: crates.io/getrandom/0.4.3 +Name: getrandom +Version: 0.4.3 +Origin: https://github.com/rust-random/getrandom +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/hashbrown/0.14.5 +Name: hashbrown +Version: 0.14.5 +Origin: https://github.com/rust-lang/hashbrown +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/hashbrown/0.17.1 +Name: hashbrown +Version: 0.17.1 +Origin: https://github.com/rust-lang/hashbrown +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/hmac/0.13.0 +Name: hmac +Version: 0.13.0 +Origin: https://github.com/RustCrypto/MACs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/hybrid-array/0.4.15 +Name: hybrid-array +Version: 0.4.15 +Origin: https://github.com/RustCrypto/hybrid-array +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/iana-time-zone/0.1.65 +Name: iana-time-zone +Version: 0.1.65 +Origin: https://github.com/strawlab/iana-time-zone +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/indexmap/2.14.2 +Name: indexmap +Version: 2.14.2 +Origin: https://github.com/indexmap-rs/indexmap +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/inout/0.2.6 +Name: inout +Version: 0.2.6 +Origin: https://github.com/RustCrypto/utils +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/itertools/0.14.0 +Name: itertools +Version: 0.14.0 +Origin: https://github.com/rust-itertools/itertools +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/itoa/1.0.18 +Name: itoa +Version: 1.0.18 +Origin: https://github.com/dtolnay/itoa +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/libbz2-rs-sys/0.2.6 +Name: libbz2-rs-sys +Version: 0.2.6 +Origin: https://github.com/trifectatechfoundation/libbzip2-rs +License: bzip2-1.0.6 +Copyright: Copyright (C) 1996-2021 Julian R Seward. +Copyright: Copyright (C) 2019-2020 Federico Mena Quintero +Copyright: Copyright (C) 2021 Micah Snyder +Copyright: Copyright (C) 2024-2025 Trifecta Tech Foundation and contributors +License-File: ../Open-Source-Notices/bzip2-1.0.6.txt + +Dependency: crates.io/libc/0.2.189 +Name: libc +Version: 0.2.189 +Origin: https://github.com/rust-lang/libc +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/linux-raw-sys/0.12.1 +Name: linux-raw-sys +Version: 0.12.1 +Origin: https://github.com/sunfishcode/linux-raw-sys +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/log/0.4.34 +Name: log +Version: 0.4.34 +Origin: https://github.com/rust-lang/log +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/lzma-rust2/0.22.0 +Name: lzma-rust2 +Version: 0.22.0 +Origin: https://github.com/hasenbanck/lzma-rust2/ +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/memchr/2.8.3 +Name: memchr +Version: 2.8.3 +Origin: https://github.com/BurntSushi/memchr +License: MIT +Copyright: Copyright (c) 2015 Andrew Gallant +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/miniz_oxide/0.8.9 +Name: miniz_oxide +Version: 0.8.9 +Origin: https://github.com/Frommi/miniz_oxide/tree/master/miniz_oxide +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/nix/0.31.3 +Name: nix +Version: 0.31.3 +Origin: https://github.com/nix-rust/nix +License: MIT +Copyright: Copyright (c) 2015 Carl Lerche + nix-rust Authors +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/num-conv/0.2.2 +Name: num-conv +Version: 0.2.2 +Origin: https://github.com/jhpratt/num-conv +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/num-traits/0.2.19 +Name: num-traits +Version: 0.2.19 +Origin: https://github.com/rust-num/num-traits +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/num_cpus/1.17.0 +Name: num_cpus +Version: 1.17.0 +Origin: https://github.com/seanmonstar/num_cpus +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/num_threads/0.1.7 +Name: num_threads +Version: 0.1.7 +Origin: https://github.com/jhpratt/num_threads +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/once_cell/1.21.4 +Name: once_cell +Version: 1.21.4 +Origin: https://github.com/matklad/once_cell +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/os_str_bytes/7.2.1 +Name: os_str_bytes +Version: 7.2.1 +Origin: https://github.com/dylni/os_str_bytes +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/pbkdf2/0.13.0 +Name: pbkdf2 +Version: 0.13.0 +Origin: https://github.com/RustCrypto/password-hashes +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/powerfmt/0.2.0 +Name: powerfmt +Version: 0.2.0 +Origin: https://github.com/jhpratt/powerfmt +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ppmd-rust/1.5.2 +Name: ppmd-rust +Version: 1.5.2 +Origin: https://github.com/hasenbanck/ppmd-rust +License: CC0-1.0 +License-File: ../Open-Source-Notices/cc-0.txt + +Dependency: crates.io/rand_core/0.10.1 +Name: rand_core +Version: 0.10.1 +Origin: https://github.com/rust-random/rand_core +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/rayon-core/1.13.0 +Name: rayon-core +Version: 1.13.0 +Origin: https://github.com/rayon-rs/rayon +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/rayon/1.12.0 +Name: rayon +Version: 1.12.0 +Origin: https://github.com/rayon-rs/rayon +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/regex-automata/0.4.18 +Name: regex-automata +Version: 0.4.18 +Origin: https://github.com/rust-lang/regex +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/regex-syntax/0.8.11 +Name: regex-syntax +Version: 0.8.11 +Origin: https://github.com/rust-lang/regex +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/regex/1.13.1 +Name: regex +Version: 1.13.1 +Origin: https://github.com/rust-lang/regex +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/rustix/1.1.6 +Name: rustix +Version: 1.1.6 +Origin: https://github.com/bytecodealliance/rustix +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/same-file/1.0.6 +Name: same-file +Version: 1.0.6 +Origin: https://github.com/BurntSushi/same-file +License: MIT +Copyright: Copyright (c) 2017 Andrew Gallant +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/serde/1.0.229 +Name: serde +Version: 1.0.229 +Origin: https://github.com/serde-rs/serde +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde_core/1.0.229 +Name: serde_core +Version: 1.0.229 +Origin: https://github.com/serde-rs/serde +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde_json/1.0.154 +Name: serde_json +Version: 1.0.154 +Origin: https://github.com/serde-rs/json +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde_with/1.14.0 +Name: serde_with +Version: 1.14.0 +Origin: https://github.com/jonasbb/serde_with +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/sha1/0.11.0 +Name: sha1 +Version: 0.11.0 +Origin: https://github.com/RustCrypto/hashes +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/sha2/0.11.1 +Name: sha2 +Version: 0.11.1 +Origin: https://github.com/RustCrypto/hashes +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/simd-adler32/0.3.10 +Name: simd-adler32 +Version: 0.3.10 +Origin: https://github.com/mcountryman/simd-adler32 +License: MIT +Copyright: Copyright (c) [2021] [Marvin Countryman] +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tempfile/3.27.0 +Name: tempfile +Version: 3.27.0 +Origin: https://github.com/Stebalien/tempfile +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/thiserror/1.0.69 +Name: thiserror +Version: 1.0.69 +Origin: https://github.com/dtolnay/thiserror +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/time-core/0.1.9 +Name: time-core +Version: 0.1.9 +Origin: https://github.com/time-rs/time +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/time/0.3.55 +Name: time +Version: 0.3.55 +Origin: https://github.com/time-rs/time +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/typed-path/0.12.3 +Name: typed-path +Version: 0.12.3 +Origin: https://github.com/chipsenkbeil/typed-path +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/typenum/1.20.1 +Name: typenum +Version: 1.20.1 +Origin: https://github.com/paholg/typenum +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/walkdir/2.5.0 +Name: walkdir +Version: 2.5.0 +Origin: https://github.com/BurntSushi/walkdir +License: MIT +Copyright: Copyright (c) 2015 Andrew Gallant +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/web-time/1.1.0 +Name: web-time +Version: 1.1.0 +Origin: https://github.com/daxpedda/web-time +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/which/8.0.6 +Name: which +Version: 8.0.6 +Origin: https://github.com/harryfei/which-rs.git +License: MIT +Copyright: Copyright (c) 2015 fangyuanziti +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/winapi-util/0.1.11 +Name: winapi-util +Version: 0.1.11 +Origin: https://github.com/BurntSushi/winapi-util +License: MIT +Copyright: Copyright (c) 2017 Andrew Gallant +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/windows-link/0.2.1 +Name: windows-link +Version: 0.2.1 +Origin: https://github.com/microsoft/windows-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/windows-sys/0.60.2 +Name: windows-sys +Version: 0.60.2 +Origin: https://github.com/microsoft/windows-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/windows-targets/0.53.5 +Name: windows-targets +Version: 0.53.5 +Origin: https://github.com/microsoft/windows-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/windows_x86_64_msvc/0.53.1 +Name: windows_x86_64_msvc +Version: 0.53.1 +Origin: https://github.com/microsoft/windows-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/zerocopy/0.8.63 +Name: zerocopy +Version: 0.8.63 +Origin: https://github.com/google/zerocopy +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/zeroize/1.9.1 +Name: zeroize +Version: 1.9.1 +Origin: https://github.com/RustCrypto/utils +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/zip/9.0.5 +Name: zip +Version: 9.0.5 +Origin: https://github.com/zip-rs/zip2 +License: MIT +Copyright: Copyright (c) 2014 Mathijs van de Nes +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/zlib-rs/0.6.8 +Name: zlib-rs +Version: 0.6.8 +Origin: https://github.com/trifectatechfoundation/zlib-rs +License: Zlib +Copyright: (C) 2024 Trifecta Tech Foundation +Copyright: Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler +License-File: ../Open-Source-Notices/zlib-license.txt + +Dependency: crates.io/zmij/1.0.23 +Name: zmij +Version: 1.0.23 +Origin: https://github.com/dtolnay/zmij +License: MIT +Copyright: Copyright (c) David Tolnay +Copyright: Copyright (c) 2025 Victor Zverovich +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/zopfli/0.8.4 +Name: zopfli +Version: 0.8.4 +Origin: https://github.com/zopfli-rs/zopfli +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/zstd-safe/8.1.0 +Name: zstd-safe +Version: 8.1.0 +Origin: https://github.com/gyscos/zstd-rs +License: BSD-3-Clause +Copyright: Copyright (c) 2026, Alexandre Bury +License-File: ../Open-Source-Notices/bsd-3-clause.txt + +Dependency: crates.io/zstd-sys/2.1.1+zstd.1.5.7 +Name: zstd-sys +Version: 2.1.1+zstd.1.5.7 +Origin: https://github.com/gyscos/zstd-rs +License: BSD-3-Clause +Copyright: Copyright (c) 2026, Alexandre Bury +Copyright: Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved. +License-File: ../Open-Source-Notices/bsd-3-clause.txt + +Dependency: crates.io/zstd/0.14.2 +Name: zstd +Version: 0.14.2 +Origin: https://github.com/gyscos/zstd-rs +License: BSD-3-Clause +Copyright: Copyright (c) 2026, Alexandre Bury +License-File: ../Open-Source-Notices/bsd-3-clause.txt + +Dependency: rust-std +Name: Rust standard library +Version: 1.101.0 +Origin: https://github.com/rust-lang/rust +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt diff --git a/go/BUILD.bazel b/go/BUILD.bazel index db719d88fb91..d94a4952670c 100644 --- a/go/BUILD.bazel +++ b/go/BUILD.bazel @@ -1,6 +1,7 @@ load("@gazelle//:def.bzl", "gazelle") load("@rules_pkg//pkg:mappings.bzl", "pkg_files") -load("@rules_python//python:defs.bzl", "py_binary") +load("@rules_python//python:defs.bzl", "py_binary", "py_test") +load("//misc/bazel:go_notices.bzl", "go_notice_inventory") load("//misc/bazel:pkg.bzl", "codeql_pack", "codeql_pkg_files") gazelle( @@ -32,11 +33,87 @@ genrule( tools = ["//go/extractor/cli/go-gen-dbscheme"], ) +_binaries = [ + "//go/extractor/cli/go-autobuilder", + "//go/extractor/cli/go-bootstrap", + "//go/extractor/cli/go-build-runner", + "//go/extractor/cli/go-configure-baseline", + "//go/extractor/cli/go-extractor", + "//go/extractor/cli/go-gen-dbscheme", + "//go/extractor/cli/go-tokenizer", +] + +_components = [ + ":extractor-pack-arch", + "//go/codeql-tools", + "//go/downgrades", + "//go/extractor:tokenizer", +] + +go_notice_inventory( + name = "notice-inventory", + components = _components, +) + +py_binary( + name = "generate-notices", + srcs = ["generate_notices.py"], + args = [ + "--inventory=$(location :notice-inventory)", + "--go-mod=$(location //go/extractor:go.mod)", + "--checked-in=$(location :NOTICES)", + ], + data = [ + "NOTICES", + ":notice-inventory", + "//go/extractor:go.mod", + ], + main = "generate_notices.py", + deps = ["//misc/notices"], +) + +py_test( + name = "generate_notices_test", + size = "small", + srcs = [ + "generate_notices.py", + "generate_notices_test.py", + ], + args = [ + "$(location :notice-inventory)", + "$(location //go/extractor:go.mod)", + "$(location :NOTICES)", + ], + data = [ + "NOTICES", + ":notice-inventory", + "//go/extractor:go.mod", + ], + deps = ["//misc/notices"], +) + +genrule( + name = "checked-notices", + srcs = [ + "NOTICES", + ":notice-inventory", + "//go/extractor:go.mod", + ], + outs = ["checked/NOTICES"], + cmd = "$(execpath :generate-notices) " + + "--inventory=$(location :notice-inventory) " + + "--go-mod=$(location //go/extractor:go.mod) " + + "--checked-in=$(location :NOTICES) --output=$@", + tools = [":generate-notices"], + visibility = ["//visibility:public"], +) + pkg_files( name = "resources", srcs = [ "codeql-extractor.yml", "ql/lib/go.dbscheme.stats", + ":checked-notices", ":dbscheme", "//:LICENSE", ], @@ -44,25 +121,11 @@ pkg_files( codeql_pkg_files( name = "extractor-pack-arch", - exes = [ - "//go/extractor/cli/go-autobuilder", - "//go/extractor/cli/go-bootstrap", - "//go/extractor/cli/go-build-runner", - "//go/extractor/cli/go-configure-baseline", - "//go/extractor/cli/go-extractor", - "//go/extractor/cli/go-gen-dbscheme", - "//go/extractor/cli/go-tokenizer", - ], + exes = _binaries, prefix = "tools/{CODEQL_PLATFORM}", ) codeql_pack( name = "go", - srcs = [ - ":extractor-pack-arch", - ":resources", - "//go/codeql-tools", - "//go/downgrades", - "//go/extractor:tokenizer", - ], + srcs = _components + [":resources"], ) diff --git a/go/NOTICES b/go/NOTICES new file mode 100644 index 000000000000..9f68e89bc11a --- /dev/null +++ b/go/NOTICES @@ -0,0 +1,51 @@ +Generated file; regenerate with the extractor's notices script. +Legal texts are provided in the CLI's Open-Source-Notices directory. +Extractor-only archives require that shared directory. + +Dependency: go +Name: Go +Version: 1.27.4 +Origin: https://go.dev/ +License: BSD-3-Clause +License-File: ../Open-Source-Notices/go-license.txt +Notice-File: ../Open-Source-Notices/go-patents.txt + +Dependency: golang.org/x/mod +Name: Go mod libraries +Version: v0.43.0 +Origin: https://go.googlesource.com/mod/ +License: BSD-3-Clause +License-File: ../Open-Source-Notices/go-license.txt +Notice-File: ../Open-Source-Notices/go-patents.txt + +Dependency: golang.org/x/sync +Name: Go sync libraries +Version: v0.25.0 +Origin: https://go.googlesource.com/sync/ +License: BSD-3-Clause +License-File: ../Open-Source-Notices/go-license.txt +Notice-File: ../Open-Source-Notices/go-patents.txt + +Dependency: golang.org/x/sys +Name: Go sys libraries +Version: v0.50.0 +Origin: https://go.googlesource.com/sys/ +License: BSD-3-Clause +License-File: ../Open-Source-Notices/go-license.txt +Notice-File: ../Open-Source-Notices/go-patents.txt + +Dependency: golang.org/x/tools +Name: Go tools libraries +Version: v0.53.0 +Origin: https://go.googlesource.com/tools/ +License: BSD-3-Clause +License-File: ../Open-Source-Notices/go-license.txt +Notice-File: ../Open-Source-Notices/go-patents.txt + +Dependency: opencsv +Name: OpenCSV +Version: vendored source +Origin: https://opencsv.sourceforge.net/ +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt +Notice-File: ../Open-Source-Notices/opencsv-notice.txt diff --git a/go/README.md b/go/README.md index 88b9df5d3d5d..95039fc8441f 100644 --- a/go/README.md +++ b/go/README.md @@ -25,6 +25,36 @@ Contributions are welcome! Please see our [contribution guidelines](CONTRIBUTING The code in this repository is licensed under the [MIT license](LICENSE). +### Extractor dependency notices + +The generated [NOTICES](NOTICES) lists the third-party components shipped with the +extractor. It contains only metadata and references: legal texts are shared in the +CLI distribution's `Open-Source-Notices` directory, not copied into this repository. +Extractor-only archives rely on that directory from the CLI. + +When adding or updating dependencies, run from this repository's root: + +```sh +bazel run //go:generate-notices -- --write +bazel build //go:checked-notices +``` + +Commit `go/NOTICES` with the dependency change. For a new dependency, review its +licensing and add reference-only metadata to `CATALOG` in +`go/generate_notices.py`. Reuse existing legal-file references wherever they cover +the dependency's requirements. This common path needs no corresponding change +to the shared legal-text inventory. A new required license, copyright statement, +or supplementary notice that is not already covered must be manually added to +that inventory before a CLI bundle can ship. + +Discovery follows the shipped Go binaries across all supported platforms, including +both macOS architectures, and accounts for the tokenizer's copied Java sources. +Test-only dependencies and compile-only Java API stubs are excluded. The normal +packaging path checks that NOTICES is current. The public check needs no private +files; CLI bundle packaging separately requires every referenced legal file to +exist and be nonempty. To also check references while regenerating, supply +`--legal-dir=/path/to/Open-Source-Notices`. + ## Resources - [Writing CodeQL queries](https://codeql.github.com/docs/writing-codeql-queries/codeql-queries/) diff --git a/go/extractor/BUILD.bazel b/go/extractor/BUILD.bazel index 23158e25b15f..25c0522b1126 100644 --- a/go/extractor/BUILD.bazel +++ b/go/extractor/BUILD.bazel @@ -29,6 +29,8 @@ go_library( # the other targets are not generated by gazelle +exports_files(["go.mod"]) + # this is separate from `tokenizer-jar` below because we don't want these compiled class files in the pack java_library( name = "tokenizer-deps", diff --git a/go/generate_notices.py b/go/generate_notices.py new file mode 100644 index 000000000000..956cd651adb3 --- /dev/null +++ b/go/generate_notices.py @@ -0,0 +1,128 @@ +"""Generate reference-only Go extractor notices from the shipped dependency graph.""" + +import argparse +import json +import os +from pathlib import Path +import re + +from misc.notices.notices import Attribution, render, validate_files, write_or_check + + +# Reviewed references only. Legal texts must never be embedded in this catalog. +GO_LICENSE = Attribution( + name="Go", + origin="https://go.dev/", + license="BSD-3-Clause", + license_files=("go-license.txt",), + notice_files=("go-patents.txt",), +) +CATALOG = { + "go": GO_LICENSE, + **{ + f"golang.org/x/{module}": Attribution( + name=f"Go {module} libraries", + origin=f"https://go.googlesource.com/{module}/", + license=GO_LICENSE.license, + license_files=GO_LICENSE.license_files, + notice_files=GO_LICENSE.notice_files, + ) + for module in ("mod", "sync", "sys", "tools") + }, + "opencsv": Attribution( + name="OpenCSV", + origin="https://opencsv.sourceforge.net/", + license="Apache-2.0", + license_files=("apache-2.0.txt",), + notice_files=("opencsv-notice.txt",), + ), +} + +# Sources copied into tokenizer.jar. Compile-only PMD API stubs are not shipped. +COPIED_SOURCES = { + "go/extractor/opencsv/CSVParser.java": "opencsv", + "go/extractor/opencsv/CSVReader.java": "opencsv", + "go/extractor/net/sourceforge/pmd/cpd/GoLanguage.java": None, +} + + +def read_modules(content: str) -> tuple[str, dict[str, str]]: + module = None + versions = {} + in_require = False + for raw_line in content.splitlines(): + line = raw_line.split("//", 1)[0].strip() + if not line: + continue + if line.startswith(("replace ", "replace(", "exclude ", "exclude(")): + raise ValueError("Go notices: review module replacements/exclusions before generating") + if line.startswith("module "): + module = line.split()[1] + elif line == "require (": + in_require = True + elif line == ")": + in_require = False + elif line.startswith("require ") or in_require: + parts = line.removeprefix("require ").split() + if len(parts) != 2 or not re.fullmatch(r"v[^\s]+", parts[1]): + raise ValueError(f"Unrecognized Go dependency: {raw_line}") + versions[parts[0]] = parts[1] + if module is None: + raise ValueError("Missing module directive in go.mod") + return module, versions + + +def dependency_inventory(discovered: dict, go_mod: str) -> dict[str, str]: + local, versions = read_modules(go_mod) + inventory = {"go": discovered["go_version"]} + if not discovered["packages"]: + raise ValueError("No distributed Go packages discovered") + for package in discovered["packages"]: + if package == local or package.startswith(local + "/"): + continue + matches = [name for name in versions if package == name or package.startswith(name + "/")] + if not matches: + raise ValueError(f"No module version found for distributed Go package {package}") + module = max(matches, key=len) + inventory[module] = versions[module] + for source in discovered["sources"]: + if source not in COPIED_SOURCES: + raise ValueError(f"Review attribution for newly distributed Java source: {source}") + identity = COPIED_SOURCES[source] + if identity: + inventory[identity] = "vendored source" + return inventory + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--inventory", type=Path, required=True) + parser.add_argument("--go-mod", type=Path, required=True) + parser.add_argument("--checked-in", type=Path, required=True) + parser.add_argument("--output", type=Path) + parser.add_argument("--legal-dir", type=Path) + parser.add_argument("--write", action="store_true", help="Update go/NOTICES in the workspace") + args = parser.parse_args() + try: + inventory = dependency_inventory( + json.loads(args.inventory.read_text(encoding="utf-8")), + args.go_mod.read_text(encoding="utf-8"), + ) + content = render(inventory, CATALOG) + if args.legal_dir: + validate_files(content, {file.name: file for file in args.legal_dir.iterdir()}) + checked_in = args.checked_in + if args.write: + workspace = Path(os.environ["BUILD_WORKSPACE_DIRECTORY"]) + if not (workspace / "go/extractor/go.mod").is_file(): + workspace /= "ql" + checked_in = workspace / "go/NOTICES" + write_or_check(content, checked_in, check=not args.write) + if args.output: + args.output.write_text(content, encoding="utf-8", newline="\n") + except (OSError, ValueError, KeyError) as error: + parser.exit(1, f"{error}\n") + + +if __name__ == "__main__": + main() diff --git a/go/generate_notices_test.py b/go/generate_notices_test.py new file mode 100644 index 000000000000..0fa04cdfa669 --- /dev/null +++ b/go/generate_notices_test.py @@ -0,0 +1,89 @@ +import json +from pathlib import Path +import sys +import tempfile +import unittest + +from go.generate_notices import CATALOG, dependency_inventory, read_modules +from misc.notices.notices import Attribution, render, validate_files + + +class GoNoticesTest(unittest.TestCase): + def test_shipped_inventory_covers_windows_and_copied_code_not_test_deps(self): + inventory = dependency_inventory(self.discovered, self.go_mod) + self.assertIn("golang.org/x/sys", inventory) + self.assertIn("golang.org/x/sync", inventory) + self.assertIn("go", inventory) + self.assertIn("opencsv", inventory) + self.assertNotIn("github.com/stretchr/testify", inventory) + self.assertNotIn("pmd", inventory) + self.assertEqual( + set(self.discovered["sources"]), + { + "go/extractor/opencsv/CSVParser.java", + "go/extractor/opencsv/CSVReader.java", + "go/extractor/net/sourceforge/pmd/cpd/GoLanguage.java", + }, + ) + self.assertEqual( + render(inventory, CATALOG), self.checked_in.read_text(encoding="utf-8") + ) + + def test_known_license_addition_needs_only_public_metadata(self): + before = render(dependency_inventory(self.discovered, self.go_mod), CATALOG) + discovered = dict(self.discovered) + discovered["packages"] = self.discovered["packages"] + ["example.org/new/subpackage"] + go_mod = self.go_mod + "\nrequire example.org/new v1.2.3\n" + catalog = { + **CATALOG, + "example.org/new": Attribution( + name="Example", + origin="https://example.org/new", + license=CATALOG["go"].license, + license_files=CATALOG["go"].license_files, + notice_files=CATALOG["go"].notice_files, + ), + } + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + for name in ("go-license.txt", "go-patents.txt", "apache-2.0.txt", "opencsv-notice.txt"): + (root / name).write_text("Test legal text placeholder") + legal_files = {file.name: file for file in root.iterdir()} + original = {name: file.read_bytes() for name, file in legal_files.items()} + validate_files(before, legal_files) + inventory = dependency_inventory(discovered, go_mod) + with self.assertRaisesRegex(ValueError, "example.org/new"): + render(inventory, CATALOG) + after = render(inventory, catalog) + validate_files(after, legal_files) + self.assertIn("Dependency: example.org/new\n", after) + self.assertEqual(original, {name: file.read_bytes() for name, file in legal_files.items()}) + + def test_unknown_module_or_copied_source_requires_review(self): + for field, value in ( + ("packages", "unknown.org/library"), + ("sources", "go/extractor/another/Copied.java"), + ): + discovered = dict(self.discovered) + discovered[field] = [*discovered[field], value] + with self.subTest(field=field), self.assertRaises(ValueError): + dependency_inventory(discovered, self.go_mod) + + def test_longest_module_match_and_non_distributed_modules(self): + discovered = {"packages": ["a/b/c/pkg"], "sources": [], "go_version": "1"} + inventory = dependency_inventory( + discovered, + "module local\nrequire (\n a/b v1.0.0\n a/b/c v2.0.0\n test/only v1.0.0\n)\n", + ) + self.assertEqual(inventory, {"go": "1", "a/b/c": "v2.0.0"}) + + def test_replacements_require_explicit_support(self): + with self.assertRaisesRegex(ValueError, "replacements"): + read_modules("module local\nreplace example.org/a => ../local\n") + + +if __name__ == "__main__": + GoNoticesTest.discovered = json.loads(Path(sys.argv.pop(1)).read_text(encoding="utf-8")) + GoNoticesTest.go_mod = Path(sys.argv.pop(1)).read_text(encoding="utf-8") + GoNoticesTest.checked_in = Path(sys.argv.pop(1)) + unittest.main() diff --git a/javascript/BUILD.bazel b/javascript/BUILD.bazel index 85b2024c283c..58b795dd0e12 100644 --- a/javascript/BUILD.bazel +++ b/javascript/BUILD.bazel @@ -1,4 +1,5 @@ load("@rules_pkg//pkg:mappings.bzl", "pkg_files") +load("@rules_python//python:defs.bzl", "py_binary", "py_test") load("//misc/bazel:pkg.bzl", "codeql_pack") package(default_visibility = ["//visibility:public"]) @@ -22,12 +23,61 @@ pkg_files( strip_prefix = None, ) +py_binary( + name = "generate-notices", + srcs = ["generate_notices.py"], + args = [ + "--package-json=$(location //javascript/extractor/lib/typescript:package.json)", + "--package-lock=$(location //javascript/extractor/lib/typescript:package-lock.json)", + "--checked-in=$(location :NOTICES)", + ], + data = [ + "NOTICES", + "//javascript/extractor/lib/typescript:package.json", + "//javascript/extractor/lib/typescript:package-lock.json", + ], + main = "generate_notices.py", + deps = ["//misc/notices"], +) + +py_test( + name = "generate_notices_test", + size = "small", + srcs = [ + "generate_notices.py", + "generate_notices_test.py", + ], + deps = ["//misc/notices"], +) + +genrule( + name = "checked-notices", + srcs = [ + "NOTICES", + "//javascript/extractor/lib/typescript:package.json", + "//javascript/extractor/lib/typescript:package-lock.json", + ], + outs = ["checked/NOTICES"], + cmd = "$(execpath :generate-notices) " + + "--package-json=$(location //javascript/extractor/lib/typescript:package.json) " + + "--package-lock=$(location //javascript/extractor/lib/typescript:package-lock.json) " + + "--checked-in=$(location :NOTICES) --output=$@", + tools = [":generate-notices"], + visibility = ["//visibility:public"], +) + +pkg_files( + name = "notice-file", + srcs = [":checked-notices"], +) + # We have to use a zip of the typescript parser wrapper, as it's generated by a genrule # and we don't know a list of its output files. codeql_pack( name = "javascript", srcs = [ ":dbscheme-group", + ":notice-file", "//javascript/downgrades", "//javascript/externs", "//javascript/extractor:tools-extractor", diff --git a/javascript/NOTICES b/javascript/NOTICES new file mode 100644 index 000000000000..075bbe69ffb9 --- /dev/null +++ b/javascript/NOTICES @@ -0,0 +1,11 @@ +Generated file; regenerate with the extractor's notices script. +Legal texts are provided in the CLI's Open-Source-Notices directory. +Extractor-only archives require that shared directory. + +Dependency: typescript +Name: TypeScript +Version: 5.9.2 +Origin: https://github.com/microsoft/TypeScript +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt +Notice-File: ../Open-Source-Notices/typescript-notice.txt diff --git a/javascript/README.md b/javascript/README.md new file mode 100644 index 000000000000..37ced44c1ee7 --- /dev/null +++ b/javascript/README.md @@ -0,0 +1,22 @@ +# JavaScript analysis support for CodeQL + +This directory contains the JavaScript extractor and the CodeQL libraries and queries used to +analyze JavaScript and TypeScript code. + +## Extractor dependency notices + +The generated [NOTICES](NOTICES) lists production dependencies shipped with the extractor. It +contains metadata and references only; legal texts are shared in the CLI distribution's +`Open-Source-Notices` directory. + +When changing the TypeScript parser wrapper's dependencies, regenerate and check the file: + +```sh +bazel run //javascript:generate-notices -- --write +bazel test //javascript:generate_notices_test +``` + +The generator follows production dependencies from the parser wrapper's `package.json` and locked +versions from its `package-lock.json`. Unknown dependencies require reviewed attribution metadata +in `javascript/generate_notices.py`. The production package build validates that referenced legal +texts exist in the CLI's shared directory. diff --git a/javascript/extractor/lib/typescript/BUILD.bazel b/javascript/extractor/lib/typescript/BUILD.bazel index 28003162673e..cd01537e6a6c 100644 --- a/javascript/extractor/lib/typescript/BUILD.bazel +++ b/javascript/extractor/lib/typescript/BUILD.bazel @@ -1,3 +1,11 @@ +exports_files( + [ + "package.json", + "package-lock.json", + ], + visibility = ["//javascript:__pkg__"], +) + # Builds a zip file of the compiled typscript-parser-wrapper and its dependencies. genrule( name = "typescript", diff --git a/javascript/generate_notices.py b/javascript/generate_notices.py new file mode 100644 index 000000000000..4b7db32059e6 --- /dev/null +++ b/javascript/generate_notices.py @@ -0,0 +1,103 @@ +"""Generate reference-only notices for the JavaScript extractor dependencies.""" + +import argparse +import json +import os +from pathlib import Path + +from misc.notices.notices import Attribution, render, write_or_check + + +CATALOG = { + "typescript": Attribution( + name="TypeScript", + origin="https://github.com/microsoft/TypeScript", + license="Apache-2.0", + license_files=("apache-2.0.txt",), + notice_files=("typescript-notice.txt",), + ), +} + + +def _resolve_package(packages: dict, parent: str, dependency: str) -> str: + """Resolve an installed npm package using node_modules lookup rules.""" + directory = parent + while True: + candidate = f"{directory}/node_modules/{dependency}" if directory else f"node_modules/{dependency}" + if candidate in packages: + return candidate + if not directory: + break + marker = "/node_modules/" + directory = directory.rsplit(marker, 1)[0] if marker in directory else "" + raise ValueError(f"Package lock is missing production dependency {dependency!r}") + + +def dependency_inventory(package_json: dict, lock: dict) -> dict[str, str]: + if lock.get("lockfileVersion") != 3: + raise ValueError("Review JavaScript notices generator for a new npm lockfile version") + + packages = lock.get("packages") + if not isinstance(packages, dict) or "" not in packages: + raise ValueError("Invalid npm package lock") + + inventory = {} + pending = [ + ("", dependency) + for dependency in package_json.get("dependencies", {}) + ] + while pending: + parent, dependency = pending.pop() + package_path = _resolve_package(packages, parent, dependency) + record = packages[package_path] + name = record.get("name") or package_path.rsplit("/node_modules/", 1)[-1].removeprefix( + "node_modules/" + ) + version = record.get("version") + if not version: + raise ValueError(f"Production dependency {name!r} has no locked version") + previous = inventory.get(name) + if previous is not None and previous != version: + raise ValueError(f"Multiple production versions of {name}: {previous}, {version}") + if previous is not None: + continue + inventory[name] = version + for child in record.get("dependencies", {}): + pending.append((package_path, child)) + for child in record.get("optionalDependencies", {}): + pending.append((package_path, child)) + + if not inventory: + raise ValueError("No production dependencies in JavaScript package.json") + return inventory + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--package-json", type=Path, required=True) + parser.add_argument("--package-lock", type=Path, required=True) + parser.add_argument("--checked-in", type=Path, required=True) + parser.add_argument("--output", type=Path) + parser.add_argument("--write", action="store_true", help="Update javascript/NOTICES") + args = parser.parse_args() + try: + inventory = dependency_inventory( + json.loads(args.package_json.read_text(encoding="utf-8")), + json.loads(args.package_lock.read_text(encoding="utf-8")), + ) + content = render(inventory, CATALOG) + checked_in = args.checked_in + if args.write: + workspace = Path(os.environ["BUILD_WORKSPACE_DIRECTORY"]) + if not (workspace / "javascript/extractor/lib/typescript/package.json").is_file(): + workspace /= "ql" + checked_in = workspace / "javascript/NOTICES" + write_or_check(content, checked_in, check=not args.write) + if args.output: + args.output.write_text(content, encoding="utf-8", newline="\n") + except (OSError, ValueError, KeyError) as error: + parser.exit(1, f"{error}\n") + + +if __name__ == "__main__": + main() diff --git a/javascript/generate_notices_test.py b/javascript/generate_notices_test.py new file mode 100644 index 000000000000..febdbc5b6f3f --- /dev/null +++ b/javascript/generate_notices_test.py @@ -0,0 +1,57 @@ +import unittest + +from javascript.generate_notices import CATALOG, dependency_inventory +from misc.notices.notices import render + + +class JavaScriptNoticesTest(unittest.TestCase): + def test_inventory_follows_production_dependencies_only(self): + package_json = { + "dependencies": {"typescript": "5.9"}, + "devDependencies": {"@types/node": "^24"}, + } + lock = { + "lockfileVersion": 3, + "packages": { + "": {}, + "node_modules/typescript": {"version": "5.9.2"}, + "node_modules/@types/node": {"version": "24.3.1", "dev": True}, + }, + } + inventory = dependency_inventory(package_json, lock) + self.assertEqual(inventory, {"typescript": "5.9.2"}) + self.assertIn("Dependency: typescript", render(inventory, CATALOG)) + + def test_inventory_follows_nested_transitive_dependencies(self): + package_json = {"dependencies": {"parent": "1"}} + lock = { + "lockfileVersion": 3, + "packages": { + "": {}, + "node_modules/parent": { + "version": "1.0.0", + "dependencies": {"child": "2"}, + }, + "node_modules/parent/node_modules/child": {"version": "2.0.0"}, + }, + } + self.assertEqual( + dependency_inventory(package_json, lock), + {"parent": "1.0.0", "child": "2.0.0"}, + ) + + def test_missing_production_package_fails(self): + with self.assertRaisesRegex(ValueError, "missing production dependency"): + dependency_inventory( + {"dependencies": {"new-package": "1"}}, + {"lockfileVersion": 3, "packages": {"": {}}}, + ) + + def test_unknown_production_dependency_requires_review(self): + inventory = {"unreviewed": "1.0"} + with self.assertRaisesRegex(ValueError, "new distributed dependencies"): + render(inventory, CATALOG) + + +if __name__ == "__main__": + unittest.main() diff --git a/misc/bazel/go_notices.bzl b/misc/bazel/go_notices.bzl new file mode 100644 index 000000000000..341742099320 --- /dev/null +++ b/misc/bazel/go_notices.bzl @@ -0,0 +1,91 @@ +"""Discover shipped Go packages without building the binaries or their tools.""" + +load("@rules_go//go:def.bzl", "GoArchive") + +_InventoryInfo = provider(fields = ["packages", "sources"]) + +def _source_path(file): + path = file.short_path + return "/".join(path.split("/")[2:]) if path.startswith("../") else path + +def _inventory_aspect_impl(target, ctx): + packages = [] + sources = [] + if GoArchive in target: + if target[GoArchive].cgo_deps.to_list(): + fail("Review native dependencies of %s before adding them to the Go notices inventory" % target.label) + packages = [archive.importpath for archive in target[GoArchive].transitive.to_list()] + transitive = [] + if ctx.rule != None: + # GoArchive already describes the linked Go dependencies. Do not follow + # tools or Java compile-only deps (the tokenizer's API stubs). + for attr_name in ["src", "srcs", "target", "actual"]: + value = getattr(ctx.rule.attr, attr_name, []) + if type(value) != "list": + value = [value] + transitive.extend([dep[_InventoryInfo] for dep in value if _InventoryInfo in dep]) + if attr_name == "srcs": + sources.extend([ + _source_path(file) + for dep in value + for file in dep.files.to_list() + if file.extension == "java" + ]) + return [_InventoryInfo( + packages = depset(packages, transitive = [dep.packages for dep in transitive]), + sources = depset(sources, transitive = [dep.sources for dep in transitive]), + )] + +_inventory_aspect = aspect( + implementation = _inventory_aspect_impl, + attr_aspects = ["src", "srcs", "target", "actual"], +) + +_PLATFORMS = [ + Label("@rules_go//go/toolchain:linux_amd64"), + Label("@rules_go//go/toolchain:linux_arm64"), + Label("@rules_go//go/toolchain:darwin_amd64"), + Label("@rules_go//go/toolchain:darwin_arm64"), + Label("@rules_go//go/toolchain:windows_amd64"), +] + +def _platforms_impl(_settings, _attr): + return { + str(index): {"//command_line_option:platforms": [str(platform)]} + for index, platform in enumerate(_PLATFORMS) + } + +_platforms = transition( + implementation = _platforms_impl, + inputs = [], + outputs = ["//command_line_option:platforms"], +) + +def _go_inventory_impl(ctx): + inventories = [ + dep[_InventoryInfo] + for deps in ctx.split_attr.components.values() + for dep in deps + ] + output = ctx.actions.declare_file(ctx.label.name + ".json") + ctx.actions.write(output, json.encode_indent({ + "packages": sorted(depset(transitive = [dep.packages for dep in inventories]).to_list()), + "sources": sorted(depset(transitive = [dep.sources for dep in inventories]).to_list()), + "go_version": ctx.toolchains["@rules_go//go:toolchain"].sdk.version, + }) + "\n") + return [DefaultInfo(files = depset([output]))] + +go_notice_inventory = rule( + implementation = _go_inventory_impl, + attrs = { + "components": attr.label_list( + mandatory = True, + cfg = _platforms, + aspects = [_inventory_aspect], + ), + "_allowlist_function_transition": attr.label( + default = "@bazel_tools//tools/allowlists/function_transition_allowlist", + ), + }, + toolchains = ["@rules_go//go:toolchain"], +) diff --git a/misc/bazel/rust_notices.bzl b/misc/bazel/rust_notices.bzl new file mode 100644 index 000000000000..084f2982bc5d --- /dev/null +++ b/misc/bazel/rust_notices.bzl @@ -0,0 +1,213 @@ +"""Discover the third-party Rust crates linked into shipped binaries, without building them.""" + +load("@rules_cc//cc/common:cc_info.bzl", "CcInfo") +load("@rules_python//python:defs.bzl", "py_binary", "py_test") +load("@rules_rust//rust:rust_common.bzl", "CrateInfo") + +def _display_label(label): + # Repository-relative for this repository, so extras match both standalone and embedded builds. + if label.repo_name == Label("//:BUILD.bazel").repo_name: + return "//%s:%s" % (label.package, label.name) + return str(label) + +_InventoryInfo = provider(fields = ["crates", "files", "native", "has_rust"]) + +# Attributes leading from packaging rules to the shipped binaries, and from there to linked code. +# Not followed: proc_macro_deps (compile-time only) and data/tools. +_PACKAGING_ATTRS = ["src", "srcs", "exes", "dep", "target", "actual"] +_LINK_ATTRS = ["deps", "link_deps"] +_LICENSE_PREFIXES = ("LICEN", "COPYING", "COPYRIGHT", "NOTICE", "UNLICENSE") + +def _crate_name(target, ctx): + for tag in ctx.rule.attr.tags: + if tag.startswith("crate-name="): + return tag.removeprefix("crate-name=") + return target[CrateInfo].name + +def _third_party_crate(target, ctx): + """Describe a crate vendored by crate_universe, which tags them `cargo-bazel`.""" + cargo_toml = [file for file in ctx.rule.files.compile_data if file.basename == "Cargo.toml"] + if not cargo_toml: + fail("%s: cannot find the Cargo.toml of a vendored crate" % target.label) + root = sorted([file.dirname for file in cargo_toml], key = len)[0] + license_files = [ + file + for file in ctx.rule.files.compile_data + if file.dirname == root and file.basename.upper().startswith(_LICENSE_PREFIXES) + ] + manifest = [file for file in cargo_toml if file.dirname == root][0] + return json.encode({ + "name": _crate_name(target, ctx), + "version": ctx.rule.attr.version, + "cargo_toml": manifest.path, + "license_files": sorted([file.path for file in license_files]), + }), [manifest] + license_files + +def _inventory_aspect_impl(target, ctx): + if ctx.rule.kind == "cargo_build_script": + # Build scripts run at build time; their linker output belongs to the crate itself. + return [_InventoryInfo(crates = depset(), files = depset(), native = depset(), has_rust = False)] + crates = [] + files = [] + native = [] + has_rust = CrateInfo in target + if has_rust and target[CrateInfo].type == "proc-macro": + return [_InventoryInfo(crates = depset(), files = depset(), native = depset(), has_rust = False)] + if has_rust and "cargo-bazel" in ctx.rule.attr.tags: + crate, crate_files = _third_party_crate(target, ctx) + crates.append(crate) + files.extend(crate_files) + attrs = _PACKAGING_ATTRS + (_LINK_ATTRS if has_rust else []) + transitive = [] + for attr_name in attrs: + value = getattr(ctx.rule.attr, attr_name, []) + if type(value) != "list": + value = [value] + for dep in value: + if type(dep) != "Target": + continue + if attr_name in _LINK_ATTRS and CrateInfo not in dep and CcInfo in dep: + # Native code linked into a Rust binary needs its own attribution review. + native.append(_display_label(dep.label)) + elif _InventoryInfo in dep: + transitive.append(dep[_InventoryInfo]) + return [_InventoryInfo( + crates = depset(crates, transitive = [dep.crates for dep in transitive]), + files = depset(files, transitive = [dep.files for dep in transitive]), + native = depset(native, transitive = [dep.native for dep in transitive]), + has_rust = has_rust or any([dep.has_rust for dep in transitive]), + )] + +_inventory_aspect = aspect( + implementation = _inventory_aspect_impl, + attr_aspects = _PACKAGING_ATTRS + _LINK_ATTRS, +) + +# Platform and legacy `--cpu` value per shipped platform. `universal_binary` re-splits macOS +# builds into host-derived platforms when the cpu starts with "darwin"; avoiding that prefix keeps +# the inventory host-independent, and both macOS architectures are listed here anyway. +_PLATFORMS = { + "linux_x86_64": "k8", + "linux_arm64": "aarch64", + "macos_x86_64": "macos_x86_64", + "macos_arm64": "macos_arm64", + "windows_x86_64": "x64_windows", +} + +def _platforms_impl(_settings, _attr): + return { + name: { + "//command_line_option:platforms": [str(Label("//misc/notices:" + name))], + "//command_line_option:cpu": cpu, + } + for name, cpu in _PLATFORMS.items() + } + +_platforms = transition( + implementation = _platforms_impl, + inputs = [], + outputs = ["//command_line_option:platforms", "//command_line_option:cpu"], +) + +def _rust_inventory_impl(ctx): + inventories = [ + dep[_InventoryInfo] + for deps in ctx.split_attr.components.values() + for dep in deps + ] + if not any([inventory.has_rust for inventory in inventories]): + fail("No shipped Rust code found in %s" % ctx.attr.components) + toolchain = ctx.toolchains["@rules_rust//rust:toolchain_type"] + manifest = ctx.actions.declare_file(ctx.label.name + ".manifest.json") + ctx.actions.write(manifest, json.encode_indent({ + "crates": sorted([ + json.decode(crate) + for crate in depset(transitive = [inventory.crates for inventory in inventories]).to_list() + ], key = lambda crate: (crate["name"], crate["version"])), + "native": sorted(depset(transitive = [inventory.native for inventory in inventories]).to_list()), + "rust_version": toolchain.version, + }) + "\n") + output = ctx.actions.declare_file(ctx.label.name + ".json") + ctx.actions.run( + executable = ctx.executable._facts, + arguments = [manifest.path, output.path], + inputs = depset([manifest], transitive = [inventory.files for inventory in inventories]), + outputs = [output], + mnemonic = "RustNoticeFacts", + progress_message = "Collecting Rust license facts for %{label}", + ) + return [DefaultInfo(files = depset([output]))] + +rust_notice_inventory = rule( + implementation = _rust_inventory_impl, + doc = "JSON license facts for the third-party crates and native code linked into `components`.", + attrs = { + "components": attr.label_list( + mandatory = True, + cfg = _platforms, + aspects = [_inventory_aspect], + ), + "_allowlist_function_transition": attr.label( + default = "@bazel_tools//tools/allowlists/function_transition_allowlist", + ), + "_facts": attr.label( + default = "//misc/notices:cargo_facts", + executable = True, + cfg = "exec", + ), + }, + toolchains = ["@rules_rust//rust:toolchain_type"], +) + +def rust_notices(name = "notices", components = [], extras = None): + """Generates and checks the `NOTICES` of a pack shipping Rust binaries. + + Declares: + * `-inventory`: license facts for the crates linked into `components`; + * `-generate`: `bazel run` it to update the checked-in `NOTICES`; + * `-test`: fails when `NOTICES` is stale or a dependency's license needs review; + * `checked-notices`: `NOTICES` once checked, to be packaged instead of the source file. + + `extras` is an optional JSON file of reviewed attributions for code not managed by Cargo, such + as vendored sources. Entries list native libraries reported by the inventory under `covers`. + """ + inventory = name + "-inventory" + rust_notice_inventory(name = inventory, components = components) + data = ["NOTICES", ":" + inventory] + ([extras] if extras else []) + args = [ + "--inventory=$(location :%s)" % inventory, + "--checked-in=$(location :NOTICES)", + "--workspace-path=%s/NOTICES" % native.package_name(), + ] + (["--extras=$(location %s)" % extras] if extras else []) + generator = Label("//misc/notices:cargo_notices") + py_binary( + name = name + "-generate", + srcs = [Label("//misc/notices:cargo_notices.py")], + main = Label("//misc/notices:cargo_notices.py"), + args = args + ["--write"], + data = data, + deps = [generator], + ) + py_test( + name = name + "-test", + size = "small", + srcs = [Label("//misc/notices:cargo_notices.py")], + main = Label("//misc/notices:cargo_notices.py"), + args = args, + data = data, + deps = [generator], + ) + native.genrule( + name = "checked-notices", + srcs = data, + outs = ["checked/NOTICES"], + cmd = " ".join([ + "$(execpath %s)" % generator, + "--inventory=$(location :%s)" % inventory, + "--checked-in=$(location :NOTICES)", + "--workspace-path=%s/NOTICES" % native.package_name(), + "--output=$@", + ] + (["--extras=$(location %s)" % extras] if extras else [])), + tools = [generator], + visibility = ["//visibility:public"], + ) diff --git a/misc/notices/BUILD.bazel b/misc/notices/BUILD.bazel new file mode 100644 index 000000000000..94500102b307 --- /dev/null +++ b/misc/notices/BUILD.bazel @@ -0,0 +1,124 @@ +load("@rules_cc//cc:defs.bzl", "cc_toolchain") +load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test") +load("@rules_swift//swift/toolchains:swift_toolchain.bzl", "swift_toolchain") +load(":stub_cc_toolchain.bzl", "stub_cc_toolchain_config") + +# Notice inventories analyze, but never build, every shipped platform from any host. Only their +# platforms carry this constraint, so normal builds can never select the stub toolchains below. +constraint_setting(name = "inventory_setting") + +constraint_value( + name = "inventory", + constraint_setting = ":inventory_setting", +) + +# The platforms shipped by the CodeQL bundle, for inventories that must cover all of them. +[ + platform( + name = "%s_%s" % (os, cpu), + constraint_values = [ + "@platforms//os:" + os, + "@platforms//cpu:" + cpu, + ":inventory", + ] + (["//:static_swift_runtime"] if os == "linux" else []), + visibility = ["//visibility:public"], + ) + for os, cpu in [ + ("linux", "x86_64"), + ("linux", "arm64"), + ("macos", "x86_64"), + ("macos", "arm64"), + ("windows", "x86_64"), + ] +] + +py_library( + name = "notices", + srcs = ["notices.py"], + visibility = ["//visibility:public"], +) + +py_test( + name = "notices_test", + size = "small", + srcs = ["notices_test.py"], + deps = [":notices"], +) + +py_binary( + name = "cargo_facts", + srcs = ["cargo_facts.py"], + visibility = ["//visibility:public"], +) + +py_binary( + name = "cargo_notices", + srcs = [ + "cargo_notices.py", + "crate_reviews.py", + ], + visibility = ["//visibility:public"], + deps = [":notices"], +) + +py_test( + name = "cargo_notices_test", + size = "small", + srcs = ["cargo_notices_test.py"], + deps = [":cargo_notices"], +) + +filegroup(name = "empty") + +stub_cc_toolchain_config(name = "stub_cc_toolchain_config") + +cc_toolchain( + name = "stub_cc_toolchain", + all_files = ":empty", + compiler_files = ":empty", + dwp_files = ":empty", + linker_files = ":empty", + objcopy_files = ":empty", + strip_files = ":empty", + toolchain_config = ":stub_cc_toolchain_config", +) + +toolchain( + name = "stub_cc", + target_compatible_with = [":inventory"], + toolchain = ":stub_cc_toolchain", + toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", +) + +exports_files(["cargo_notices.py"]) + +# rules_swift needs a resolved Swift toolchain to analyse `swift_library` targets; this one only +# serves notice inventories and cannot compile anything. +[ + ( + swift_toolchain( + name = "stub_swift_toolchain_%s_%s" % (os, cpu), + arch = arch, + os = os, + parsed_version = "6.3.3", + root = "/notice-inventory-stub", + version_file = "stub-swift-version", + ), + toolchain( + name = "stub_swift_%s_%s" % (os, cpu), + target_compatible_with = [ + "@platforms//os:" + os, + "@platforms//cpu:" + cpu, + ":inventory", + ], + toolchain = ":stub_swift_toolchain_%s_%s" % (os, cpu), + toolchain_type = "@rules_swift//toolchains:toolchain_type", + ), + ) + for os, cpu, arch in [ + ("linux", "x86_64", "x86_64"), + ("linux", "arm64", "aarch64"), + ("macos", "x86_64", "x86_64"), + ("macos", "arm64", "arm64"), + ] +] diff --git a/misc/notices/README.md b/misc/notices/README.md new file mode 100644 index 000000000000..b7090e1b3c3b --- /dev/null +++ b/misc/notices/README.md @@ -0,0 +1,52 @@ +# Extractor dependency notices + +Each extractor that ships third-party code has a generated, checked-in `NOTICES` file in its +directory. It contains only metadata and references: the legal texts themselves are shared in the +CLI distribution's `Open-Source-Notices` directory, not copied into this repository. Extractor-only +archives rely on that directory from the CLI. `notices.py` renders and parses this format. + +Go has its own generator; see [`go/README.md`](../../go/README.md#extractor-dependency-notices). + +## JavaScript extractor + +The JavaScript extractor inventories production dependencies from the TypeScript parser wrapper's +`package.json` and `package-lock.json`. See [`javascript/README.md`](../../javascript/README.md) +for regeneration and review instructions. + +## Rust-based extractors + +The Python, Ruby, Rust, Unified and C/C++ (`bmn`) extractors use the Cargo adapter in this +directory, through the `rust_notices` macro of [`rust_notices.bzl`](../bazel/rust_notices.bzl): + +* An aspect follows the shipped binaries' link dependencies for every platform in the CodeQL + bundle, so only crates actually linked into a shipped binary are listed, not development + dependencies. Analysis-only C++ and Swift toolchains make this possible from any host. +* `cargo_facts.py` extracts each crate's license expression, license files and copyright lines. +* `cargo_notices.py` picks a license with a shared text (preferring Apache-2.0, then MIT), and + attaches copyright lines where the license requires them. + +After changing Rust dependencies, regenerate and commit the extractor's `NOTICES`: + +```sh +bazel run //:notices-generate +``` + +`//:notices-test` fails while the checked-in file is stale. Generation fails, listing every +problem at once, when: + +* No license alternative of a crate has a shared text in `LICENSE_TEXTS` in `cargo_notices.py`. + Check that the license is acceptable. Then add its text to the shared `Open-Source-Notices` + directory, and map its SPDX identifier in `LICENSE_TEXTS`. Generic texts whose copyright varies + per package start with `[See NOTICES file for each package's copyright notice]`, and need the + identifier in `NEEDS_COPYRIGHT`. +* A crate needs its copyright reviewed, because none was detected, or it ships a NOTICE file with + Apache-2.0. Add a reviewed entry to [`crate_reviews.py`](crate_reviews.py). +* Native (C, C++ or Swift) code is linked into a Rust binary. Add an entry to the extractor's + `notices-extras.json` that `covers` the reported targets. + +`notices-extras.json` also lists third-party code that is not a crate, such as vendored sources or +grammars embedded in first-party crates. Its entries have a `name`, `version`, `origin`, SPDX +`license`, the shared `license_files`, and optionally `copyright`, `notice_files` and `covers`. + +The public check needs no private files. CLI bundle packaging separately requires every referenced +legal file to exist. diff --git a/misc/notices/cargo_facts.py b/misc/notices/cargo_facts.py new file mode 100644 index 000000000000..c99d2c4654d4 --- /dev/null +++ b/misc/notices/cargo_facts.py @@ -0,0 +1,52 @@ +"""Extract license facts for vendored crates from their Cargo.toml and license files.""" + +import json +from pathlib import Path +import re +import sys +import tomllib + + +# A copyright line, excluding templates such as "Copyright [yyyy] [name of copyright owner]". +COPYRIGHT = re.compile(r"^(?:Copyright\b.*(?:\(c\)|©|\d)|©|\(c\)\s*\d)", re.IGNORECASE) +TEMPLATE = re.compile(r"\[yyyy\]|\{yyyy\}||\[year\]|\{year\}|", re.IGNORECASE) + + +def copyright_lines(text: str) -> list[str]: + lines = [] + for line in text.splitlines(): + line = " ".join(line.split()) + if line.startswith(("Copyright", "COPYRIGHT", "©", "(C)", "(c)")) and COPYRIGHT.match(line) and not TEMPLATE.search(line) and line not in lines: + lines.append(line) + return lines + + +def crate_facts(crate: dict) -> dict: + package = tomllib.loads(Path(crate["cargo_toml"]).read_text(encoding="utf-8"))["package"] + files = {} + for path in crate["license_files"]: + text = Path(path).read_text(encoding="utf-8", errors="replace") + files[Path(path).name] = copyright_lines(text) + return { + "name": crate["name"], + "version": crate["version"], + "license": package.get("license"), + "license_file": package.get("license-file"), + "repository": package.get("repository"), + "authors": package.get("authors", []), + "files": files, + } + + +def main() -> None: + manifest = json.loads(Path(sys.argv[1]).read_text(encoding="utf-8")) + facts = { + "rust_version": manifest["rust_version"], + "native": manifest["native"], + "crates": [crate_facts(crate) for crate in manifest["crates"]], + } + Path(sys.argv[2]).write_text(json.dumps(facts, indent=2, sort_keys=True) + "\n", encoding="utf-8") + + +if __name__ == "__main__": + main() diff --git a/misc/notices/cargo_notices.py b/misc/notices/cargo_notices.py new file mode 100644 index 000000000000..2d9fcc9abbf8 --- /dev/null +++ b/misc/notices/cargo_notices.py @@ -0,0 +1,222 @@ +"""Generate reference-only notices for the code linked into an extractor's Rust binaries. + +The inventory is produced by `rust_notice_inventory` (misc/bazel/rust_notices.bzl). Licenses are +chosen automatically where the crate's SPDX expression allows a reviewed shared legal text; anything +else fails, asking for a review in `crate_reviews.py` or for a new text in Open-Source-Notices. +""" + +import argparse +from dataclasses import replace +import json +import os +from pathlib import Path +import re + +from misc.notices.crate_reviews import CRATE_REVIEWS +from misc.notices.notices import Attribution, render, validate_files, write_or_check + + +# Shared legal texts, in order of preference when a crate offers a choice. +LICENSE_TEXTS = { + "Apache-2.0": ("apache-2.0.txt",), + "Apache-2.0 WITH LLVM-exception": ("apache-2.0.txt", "llvm-exception.txt"), + "MIT": ("mit.txt",), + "BSD-3-Clause": ("bsd-3-clause.txt",), + "BSD-2-Clause": ("bsd-2-clause.txt",), + "ISC": ("isc-license.txt",), + "Zlib": ("zlib-license.txt",), + "bzip2-1.0.6": ("bzip2-1.0.6.txt",), + "Unicode-3.0": ("unicode-3.0.txt",), + "CC0-1.0": ("cc-0.txt",), +} +# These shared texts defer to the per-package copyright lines in NOTICES. +NEEDS_COPYRIGHT = {"MIT", "BSD-3-Clause", "BSD-2-Clause", "ISC", "Zlib", "Unicode-3.0", "bzip2-1.0.6"} +AUTHOR_EMAIL = re.compile(r"\s*<[^>]*>") +RUST_STD = Attribution( + name="Rust standard library", + origin="https://github.com/rust-lang/rust", + license="Apache-2.0", + license_files=("apache-2.0.txt",), +) +TOKEN = re.compile(r"\(|\)|[^\s()]+") + + +def license_options(expression: str) -> list[tuple[str, ...]]: + """Expand an SPDX expression into the license combinations it allows.""" + tokens = TOKEN.findall(expression.replace("/", " OR ")) + position = 0 + + def peek(): + return tokens[position] if position < len(tokens) else None + + def take(expected=None): + nonlocal position + token = peek() + if token is None or (expected and token != expected): + raise ValueError(f"Invalid license expression: {expression!r}") + position += 1 + return token + + def primary(): + if peek() == "(": + take("(") + options = disjunction() + take(")") + return options + license = take() + if license in ("AND", "OR", "WITH", ")"): + raise ValueError(f"Invalid license expression: {expression!r}") + if peek() == "WITH": + take() + license += " WITH " + take() + return [(license,)] + + def conjunction(): + options = primary() + while peek() == "AND": + take() + rights = primary() + options = [left + right for left in options for right in rights] + return options + + def disjunction(): + options = conjunction() + while peek() == "OR": + take() + options += conjunction() + return options + + options = disjunction() + if peek() is not None: + raise ValueError(f"Invalid license expression: {expression!r}") + return [tuple(sorted(set(option), key=lambda license: list(LICENSE_TEXTS).index(license) + if license in LICENSE_TEXTS else len(LICENSE_TEXTS))) for option in options] + + +def preference(licenses: tuple[str, ...]) -> list[int]: + """Prefer the combination whose least preferred license is most preferred, and so on.""" + ranks = list(LICENSE_TEXTS) + return sorted((ranks.index(license) if license in ranks else len(ranks) for license in licenses), reverse=True) + + +def copyright_lines(crate: dict, licenses: tuple[str, ...]) -> tuple[str, ...]: + files = crate["files"] + apache = [name for name in files if "APACHE" in name.upper()] + lines = [line for name, found in sorted(files.items()) if name not in apache for line in found] + if not lines and "Apache-2.0" not in licenses: + lines = [line for found in files.values() for line in found] + if not lines and crate.get("authors"): + # Common for crates whose license file omits the copyright line; Cargo authors are the + # copyright holders crates.io records. + lines = ["Copyright (c) " + ", ".join(AUTHOR_EMAIL.sub("", author) for author in crate["authors"])] + return tuple(dict.fromkeys(lines)) + + +def attribution(crate: dict) -> Attribution: + name = crate["name"] + review = CRATE_REVIEWS.get(name) + expression = review.license if review and review.license else crate["license"] + if not expression: + raise ValueError( + f"Crate {name} {crate['version']} has no SPDX license expression " + f"(license-file: {crate['license_file']}); review it in crate_reviews.py" + ) + notice_files = review.notice_files if review else () + has_notice = any(file.upper().startswith("NOTICE") for file in crate["files"]) + problems = [] + for licenses in sorted(license_options(expression), key=preference): + unmapped = [license for license in licenses if license not in LICENSE_TEXTS] + if unmapped: + problems.append(f"no reviewed Open-Source-Notices text for {', '.join(unmapped)}") + continue + copyright = review.copyright if review and review.copyright else copyright_lines(crate, licenses) + if NEEDS_COPYRIGHT & set(licenses) and not copyright: + problems.append(f"{' AND '.join(licenses)} needs a copyright line, but none was found") + continue + if "Apache-2.0" in licenses and has_notice and not notice_files: + problems.append("Apache-2.0 requires its NOTICE file to be reviewed") + continue + return Attribution( + name=name, + origin=crate["repository"] or f"https://crates.io/crates/{name}", + license=" AND ".join(licenses), + license_files=tuple(file for license in licenses for file in LICENSE_TEXTS[license]), + notice_files=notice_files, + copyright=copyright if NEEDS_COPYRIGHT & set(licenses) else (), + ) + raise ValueError( + f"Review the license of crate {name} {crate['version']} ({expression}): " + + "; ".join(problems) + + ". Add a reviewed entry to misc/notices/crate_reviews.py or the missing legal text to " + "Open-Source-Notices." + ) + + +def extra_attribution(identity: str, entry: dict) -> Attribution: + return Attribution( + name=entry["name"], + origin=entry["origin"], + license=entry["license"], + license_files=tuple(entry["license_files"]), + notice_files=tuple(entry.get("notice_files", ())), + copyright=tuple(entry.get("copyright", ())), + ) + + +def notices(facts: dict, extras: dict) -> str: + inventory = {"rust-std": facts["rust_version"]} + catalog = {"rust-std": RUST_STD} + problems = [] + for crate in facts["crates"]: + identity = f"crates.io/{crate['name']}/{crate['version']}" + inventory[identity] = crate["version"] + try: + catalog[identity] = attribution(crate) + except ValueError as error: + problems.append(str(error)) + covered = set() + for identity, entry in extras.items(): + inventory[identity] = entry["version"] + catalog[identity] = extra_attribution(identity, entry) + covered.update(entry.get("covers", ())) + unreviewed = sorted(set(facts["native"]) - covered) + if unreviewed: + problems.append( + "Review attribution for native code linked into Rust binaries, and list it under " + "`covers` in the extractor's notices extras: " + ", ".join(unreviewed) + ) + if problems: + raise ValueError("\n".join(problems)) + return render(inventory, catalog) + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--inventory", type=Path, required=True) + parser.add_argument("--extras", type=Path) + parser.add_argument("--checked-in", type=Path, required=True) + parser.add_argument("--workspace-path", required=True, help="NOTICES path in the ql repository") + parser.add_argument("--output", type=Path) + parser.add_argument("--legal-dir", type=Path) + parser.add_argument("--write", action="store_true", help="Update the checked-in NOTICES") + args = parser.parse_args() + try: + extras = json.loads(args.extras.read_text(encoding="utf-8")) if args.extras else {} + content = notices(json.loads(args.inventory.read_text(encoding="utf-8")), extras) + if args.legal_dir: + validate_files(content, {file.name: file for file in args.legal_dir.iterdir()}) + checked_in = args.checked_in + if args.write: + workspace = Path(os.environ["BUILD_WORKSPACE_DIRECTORY"]) + if not (workspace / "misc/notices").is_dir(): + workspace /= "ql" + checked_in = workspace / args.workspace_path + write_or_check(content, checked_in, check=not args.write) + if args.output: + args.output.write_text(content, encoding="utf-8", newline="\n") + except (OSError, ValueError, KeyError) as error: + parser.exit(1, f"{error}\n") + + +if __name__ == "__main__": + main() diff --git a/misc/notices/cargo_notices_test.py b/misc/notices/cargo_notices_test.py new file mode 100644 index 000000000000..f5816bb02bde --- /dev/null +++ b/misc/notices/cargo_notices_test.py @@ -0,0 +1,85 @@ +import unittest + +from misc.notices.cargo_notices import attribution, license_options, notices + + +def crate(license, files=None, name="example"): + return { + "name": name, + "version": "1.0.0", + "license": license, + "license_file": None, + "repository": None, + "files": files if files is not None else {"LICENSE-MIT": ["Copyright (c) 2024 A"]}, + } + + +class CargoNoticesTest(unittest.TestCase): + def test_license_options(self): + self.assertEqual(license_options("MIT/Apache-2.0"), [("MIT",), ("Apache-2.0",)]) + self.assertEqual( + license_options("(MIT OR Apache-2.0) AND Unicode-3.0"), + [("MIT", "Unicode-3.0"), ("Apache-2.0", "Unicode-3.0")], + ) + self.assertEqual( + license_options("Apache-2.0 WITH LLVM-exception OR MIT"), + [("Apache-2.0 WITH LLVM-exception",), ("MIT",)], + ) + with self.assertRaisesRegex(ValueError, "Invalid license expression"): + license_options("MIT OR") + + def test_prefers_apache_without_notice_file(self): + entry = attribution(crate("MIT OR Apache-2.0")) + self.assertEqual((entry.license, entry.license_files, entry.copyright), ("Apache-2.0", ("apache-2.0.txt",), ())) + self.assertEqual(entry.origin, "https://crates.io/crates/example") + + def test_prefers_apache_alongside_other_licenses(self): + entry = attribution(crate("(MIT OR Apache-2.0) AND Unicode-3.0", {"LICENSE-UNICODE": ["Copyright © U"]})) + self.assertEqual((entry.license, entry.copyright), ("Apache-2.0 AND Unicode-3.0", ("Copyright © U",))) + + def test_falls_back_when_apache_has_notice(self): + entry = attribution(crate("Apache-2.0 OR MIT", {"NOTICE": [], "LICENSE-MIT": ["Copyright (c) 2024 A"]})) + self.assertEqual((entry.license, entry.copyright), ("MIT", ("Copyright (c) 2024 A",))) + + def test_copyright_ignores_apache_license_file(self): + entry = attribution(crate("Zlib", {"LICENSE-APACHE": ["Copyright 2023 X"], "LICENSE-ZLIB": ["Copyright 2024 Y"]})) + self.assertEqual(entry.copyright, ("Copyright 2024 Y",)) + + def test_copyright_falls_back_to_authors(self): + entry = crate("MIT", {"LICENSE": []}) + entry["authors"] = ["A ", "B"] + self.assertEqual(attribution(entry).copyright, ("Copyright (c) A, B",)) + + def test_license_exception_texts(self): + entry = attribution(crate("Apache-2.0 WITH LLVM-exception")) + self.assertEqual(entry.license_files, ("apache-2.0.txt", "llvm-exception.txt")) + + def test_requires_review(self): + for license, files, message in [ + ("GPL-3.0-only", None, "no reviewed Open-Source-Notices text for GPL-3.0-only"), + ("MIT", {}, "MIT needs a copyright line"), + ("Apache-2.0", {"NOTICE": []}, "Apache-2.0 requires its NOTICE file to be reviewed"), + (None, None, "has no SPDX license expression"), + ]: + with self.subTest(license=license), self.assertRaisesRegex(ValueError, message): + attribution(crate(license, files)) + + def test_native_code_needs_covering_extra(self): + facts = {"rust_version": "1.0.0", "crates": [], "native": ["//third_party:lib"]} + with self.assertRaisesRegex(ValueError, "//third_party:lib"): + notices(facts, {}) + extra = { + "name": "lib", + "version": "2", + "origin": "https://example.org", + "license": "Apache-2.0", + "license_files": ["apache-2.0.txt"], + "covers": ["//third_party:lib"], + } + content = notices(facts, {"vendored/lib": extra}) + self.assertIn("Dependency: rust-std\n", content) + self.assertIn("Dependency: vendored/lib\n", content) + + +if __name__ == "__main__": + unittest.main() diff --git a/misc/notices/crate_reviews.py b/misc/notices/crate_reviews.py new file mode 100644 index 000000000000..c04d74afa865 --- /dev/null +++ b/misc/notices/crate_reviews.py @@ -0,0 +1,57 @@ +"""Manually reviewed license facts for crates whose own metadata is insufficient. + +Every entry records a human review; keep the reason next to it. Legal texts themselves belong in +Open-Source-Notices, never here. +""" + +from dataclasses import dataclass + + +@dataclass(frozen=True) +class Review: + # SPDX expression replacing a missing or inaccurate Cargo.toml `license` field. + license: str | None = None + # Copyright lines for licenses requiring them, when the crate's license files have none. + copyright: tuple[str, ...] = () + # Reviewed Open-Source-Notices files reproducing an Apache-2.0 crate's NOTICE file. + notice_files: tuple[str, ...] = () + + +TREE_SITTER = Review(copyright=("Copyright (c) 2018-2024 Max Brunsfeld",)) + +CRATE_REVIEWS: dict[str, Review] = { + # The crates.io packages omit the repository's LICENSE file. + # The derived-work copyright is mid-sentence, so it is not detected automatically. + "libbz2-rs-sys": Review( + copyright=( + "Copyright (C) 1996-2021 Julian R Seward.", + "Copyright (C) 2019-2020 Federico Mena Quintero", + "Copyright (C) 2021 Micah Snyder", + "Copyright (C) 2024-2025 Trifecta Tech Foundation and contributors", + ) + ), + "tree-sitter": TREE_SITTER, + "tree-sitter-language": TREE_SITTER, + "tree-sitter-ruby": Review(copyright=("Copyright (c) 2016 Rob Rix",)), + # LICENSE-MIT has no copyright line nor Cargo authors; the crate is a fork of nom (MIT). + "winnow": Review( + copyright=("Copyright (c) The winnow contributors", "Copyright (c) 2014-2019 Geoffroy Couprie") + ), + # LICENSE-MIT has no copyright line; the crate is a translation of libyaml (MIT). + "unsafe-libyaml": Review( + copyright=( + "Copyright (c) David Tolnay", + "Copyright (c) 2017-2020 Ingy döt Net", + "Copyright (c) 2006-2016 Kirill Simonov", + ) + ), + # LICENSE-MIT has no copyright line; the crate is a port of Victor Zverovich's zmij (MIT). + # A port of zlib, whose license requires keeping the original copyright too. + "zlib-rs": Review( + copyright=( + "(C) 2024 Trifecta Tech Foundation", + "Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler", + ) + ), + "zmij": Review(copyright=("Copyright (c) David Tolnay", "Copyright (c) 2025 Victor Zverovich")), +} diff --git a/misc/notices/notices.py b/misc/notices/notices.py new file mode 100644 index 000000000000..4f8107a619c4 --- /dev/null +++ b/misc/notices/notices.py @@ -0,0 +1,159 @@ +"""Reference-only extractor notices. Legal texts are supplied by the CLI bundle.""" + +import argparse +from dataclasses import dataclass +from pathlib import Path +import re + + +REFERENCE_PREFIX = "../Open-Source-Notices/" +FILE_NAME = re.compile(r"[A-Za-z0-9][A-Za-z0-9._-]*\Z") +HEADER = ( + "Generated file; regenerate with the extractor's notices script.\n" + "Legal texts are provided in the CLI's Open-Source-Notices directory.\n" + "Extractor-only archives require that shared directory.\n\n" +) + + +@dataclass(frozen=True) +class Attribution: + name: str + origin: str + license: str + license_files: tuple[str, ...] + notice_files: tuple[str, ...] = () + # Copyright lines the license requires to accompany the shared legal text (e.g. MIT, BSD). + copyright: tuple[str, ...] = () + + +def reference(file_name: str) -> str: + if not FILE_NAME.fullmatch(file_name) or file_name in (".", ".."): + raise ValueError(f"Invalid legal-text file name: {file_name!r}") + return REFERENCE_PREFIX + file_name + + +def render(inventory: dict[str, str], catalog: dict[str, Attribution]) -> str: + missing = inventory.keys() - catalog.keys() + if missing: + raise ValueError( + "Review attribution metadata for new distributed dependencies: " + + ", ".join(sorted(missing)) + ) + lines = [] + for identity, version in sorted(inventory.items()): + entry = catalog[identity] + fields = { + "Dependency": identity, + "Name": entry.name, + "Version": version, + "Origin": entry.origin, + "License": entry.license, + } + for field, value in fields.items(): + if not value or "\n" in value or "\r" in value: + raise ValueError(f"{identity}: missing or invalid {field}") + lines.append(f"{field}: {value}") + for value in entry.copyright: + if not value.strip() or "\n" in value or "\r" in value: + raise ValueError(f"{identity}: invalid Copyright {value!r}") + lines.append(f"Copyright: {value}") + if not entry.license_files: + raise ValueError(f"{identity}: no license file; review its license") + for file_name in sorted(set(entry.license_files)): + lines.append(f"License-File: {reference(file_name)}") + for file_name in sorted(set(entry.notice_files)): + lines.append(f"Notice-File: {reference(file_name)}") + lines.append("") + if not inventory: + raise ValueError("No distributed dependencies in inventory") + return HEADER + "\n".join(lines) + + +def referenced_files(content: str) -> set[str]: + """Validate the reference-only format, including a license for every entry.""" + files = set() + dependency = None + has_license = False + fields = {"Dependency", "Name", "Version", "Origin", "License"} + seen = set() + if not content.startswith(HEADER): + raise ValueError("Missing reference-only NOTICES header") + for line in (content[len(HEADER):] + "\n").splitlines(): + if not line: + if dependency is not None: + if not has_license: + raise ValueError(f"{dependency}: no license-file reference") + if seen != fields: + raise ValueError(f"{dependency}: missing NOTICES fields: {fields - seen}") + dependency = None + has_license = False + seen = set() + continue + field, separator, value = line.partition(": ") + if not separator or field not in fields | {"Copyright", "License-File", "Notice-File"}: + raise ValueError(f"Invalid NOTICES field: {line!r}") + if field == "Dependency": + if dependency is not None: + raise ValueError("Missing separator between NOTICES entries") + dependency = value + elif dependency is None: + raise ValueError(f"NOTICES field outside dependency entry: {line!r}") + if not value: + raise ValueError(f"Empty NOTICES field: {field}") + if field in fields: + if field in seen: + raise ValueError(f"{dependency}: duplicate field {field}") + seen.add(field) + if field in {"License-File", "Notice-File"}: + if not value.startswith(REFERENCE_PREFIX): + raise ValueError(f"{dependency}: invalid legal-text reference {value!r}") + name = value[len(REFERENCE_PREFIX):] + reference(name) + files.add(name) + has_license |= field == "License-File" + if not files: + raise ValueError("NOTICES contains no legal-text references") + return files + + +def validate_files(content: str, legal_files: dict[str, Path]) -> None: + for name in sorted(referenced_files(content)): + file = legal_files.get(name) + if file is None or not file.is_file(): + raise ValueError( + f"Missing Open-Source-Notices/{name}; manually review and check in " + "the required legal text before distributing this dependency" + ) + if not file.read_text(encoding="utf-8").strip(): + raise ValueError(f"Empty legal text: {file}") + + +def write_or_check(content: str, output: Path, check: bool) -> None: + if check: + if not output.is_file() or output.read_text(encoding="utf-8") != content: + raise ValueError(f"{output} is stale; regenerate and commit the extractor's NOTICES") + else: + output.write_text(content, encoding="utf-8", newline="\n") + + +def validate_main() -> None: + parser = argparse.ArgumentParser(description="Validate central legal-text references") + parser.add_argument("--notices", type=Path, required=True) + parser.add_argument("--output", type=Path, required=True) + parser.add_argument("legal_files", type=Path, nargs="+") + args = parser.parse_args() + try: + content = args.notices.read_text(encoding="utf-8") + files = {} + for file in args.legal_files: + if file.name in files: + raise ValueError(f"Duplicate legal-text file name: {file.name}") + files[file.name] = file + validate_files(content, files) + args.output.write_text(content, encoding="utf-8", newline="\n") + except (OSError, ValueError) as error: + parser.exit(1, f"{error}\n") + + +if __name__ == "__main__": + validate_main() diff --git a/misc/notices/notices_test.py b/misc/notices/notices_test.py new file mode 100644 index 000000000000..5db27b94f1f1 --- /dev/null +++ b/misc/notices/notices_test.py @@ -0,0 +1,100 @@ +from pathlib import Path +import tempfile +import unittest + +from misc.notices.notices import ( + Attribution, + referenced_files, + render, + validate_files, + write_or_check, +) + + +class NoticesTest(unittest.TestCase): + def setUp(self): + self.entry = Attribution( + name="Example", + origin="https://example.org/library", + license="Example-License", + license_files=("example.txt", "example.txt"), + notice_files=("example-notice.txt",), + ) + + def test_reference_only_sorted_deduplicated_output(self): + catalog = {"a": self.entry, "b": self.entry} + content = render({"b": "2", "a": "1"}, catalog) + self.assertEqual(content, render({"a": "1", "b": "2"}, catalog)) + self.assertLess(content.index("Dependency: a"), content.index("Dependency: b")) + self.assertEqual(content.count("License-File:"), 2) + self.assertEqual(referenced_files(content), {"example.txt", "example-notice.txt"}) + self.assertNotIn("Copyright", content) + + def test_copyright_lines(self): + entry = Attribution( + "Example", "https://example.org/", "MIT", ("mit.txt",), copyright=("Copyright (c) 2024 A",) + ) + content = render({"example": "1"}, {"example": entry}) + self.assertIn("License: MIT\nCopyright: Copyright (c) 2024 A\nLicense-File:", content) + self.assertEqual(referenced_files(content), {"mit.txt"}) + with self.assertRaisesRegex(ValueError, "invalid Copyright"): + render({"example": "1"}, {"example": Attribution("E", "o", "MIT", ("mit.txt",), copyright=("a\nb",))}) + + def test_missing_dependency_metadata(self): + with self.assertRaisesRegex(ValueError, "new distributed dependencies: new"): + render({"new": "1"}, {}) + + def test_missing_license_reference(self): + entry = Attribution("Example", "https://example.org/", "Example", ()) + with self.assertRaisesRegex(ValueError, "no license file"): + render({"example": "1"}, {"example": entry}) + + def test_invalid_references(self): + for name in ("../outside.txt", "/absolute.txt", "sub/file.txt", "", ".."): + with self.subTest(name=name), self.assertRaisesRegex(ValueError, "Invalid"): + render( + {"example": "1"}, + {"example": Attribution("Example", "https://example.org", "Example", (name,))}, + ) + + def test_reference_validation_rejects_missing_and_empty_texts(self): + content = render({"example": "1"}, {"example": self.entry}) + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + license_file = root / "example.txt" + notice_file = root / "example-notice.txt" + license_file.write_text("Test license placeholder") + notice_file.write_text("Test notice placeholder") + legal_files = {file.name: file for file in root.iterdir()} + validate_files(content, legal_files) + notice_file.write_text(" \n") + with self.assertRaisesRegex(ValueError, "Empty legal text"): + validate_files(content, legal_files) + del legal_files[notice_file.name] + with self.assertRaisesRegex(ValueError, "Missing Open-Source-Notices/example-notice"): + validate_files(content, legal_files) + + def test_stale_notices(self): + content = render({"example": "1"}, {"example": self.entry}) + with tempfile.TemporaryDirectory() as directory: + output = Path(directory) / "NOTICES" + write_or_check(content, output, check=False) + write_or_check(content, output, check=True) + with self.assertRaisesRegex(ValueError, "stale"): + write_or_check(content + "\n", output, check=True) + + def test_reject_legal_bodies_and_broken_entries(self): + content = render({"example": "1"}, {"example": self.entry}) + for broken in ( + content.replace("Notice-File:", "Permission:"), + content.replace("Name: Example\n", ""), + content.replace("License-File:", "Notice-File:"), + content.replace("../Open-Source-Notices/example.txt", "../../example.txt"), + "arbitrary text", + ): + with self.subTest(content=broken), self.assertRaises(ValueError): + referenced_files(broken) + + +if __name__ == "__main__": + unittest.main() diff --git a/misc/notices/stub-swift-version b/misc/notices/stub-swift-version new file mode 100644 index 000000000000..7849b73dc743 --- /dev/null +++ b/misc/notices/stub-swift-version @@ -0,0 +1 @@ +6.3.3 diff --git a/misc/notices/stub_cc_toolchain.bzl b/misc/notices/stub_cc_toolchain.bzl new file mode 100644 index 000000000000..ab0e6af53a77 --- /dev/null +++ b/misc/notices/stub_cc_toolchain.bzl @@ -0,0 +1,25 @@ +"""A C++ toolchain configuration for analysis-only notice inventories; it cannot build anything.""" + +load("@rules_cc//cc/common:cc_common.bzl", "cc_common") +load("@rules_cc//cc/toolchains:cc_toolchain_config_info.bzl", "CcToolchainConfigInfo") + +def _impl(ctx): + return cc_common.create_cc_toolchain_config_info( + ctx = ctx, + toolchain_identifier = "notice-inventory-stub", + compiler = "stub-clang", + target_system_name = "local", + target_cpu = "stub", + target_libc = "stub", + abi_version = "stub", + abi_libc_version = "stub", + tool_paths = [ + struct(name = tool, path = "/notice-inventory-stub/" + tool) + for tool in ["ar", "cpp", "gcc", "ld", "nm", "objcopy", "objdump", "strip"] + ], + ) + +stub_cc_toolchain_config = rule( + implementation = _impl, + provides = [CcToolchainConfigInfo], +) diff --git a/python/BUILD.bazel b/python/BUILD.bazel index 06affcff9e25..c5cd8a7d0525 100644 --- a/python/BUILD.bazel +++ b/python/BUILD.bazel @@ -1,5 +1,6 @@ load("@rules_pkg//pkg:mappings.bzl", "pkg_filegroup", "pkg_files") load("//misc/bazel:pkg.bzl", "codeql_pack", "codeql_pkg_files") +load("//misc/bazel:rust_notices.bzl", "rust_notices") package(default_visibility = ["//visibility:public"]) @@ -34,6 +35,7 @@ pkg_files( name = "resources", srcs = [ "codeql-extractor.yml", + ":checked-notices", "//:LICENSE", ], strip_prefix = None, @@ -48,6 +50,11 @@ codeql_pkg_files( prefix = "tools/{CODEQL_PLATFORM}", ) +rust_notices( + components = [":extractor-arch"], + extras = "notices-extras.json", +) + codeql_pack( name = "python", srcs = [ diff --git a/python/NOTICES b/python/NOTICES new file mode 100644 index 000000000000..97d1cef0ac2b --- /dev/null +++ b/python/NOTICES @@ -0,0 +1,559 @@ +Generated file; regenerate with the extractor's notices script. +Legal texts are provided in the CLI's Open-Source-Notices directory. +Extractor-only archives require that shared directory. + +Dependency: crates.io/aho-corasick/1.1.3 +Name: aho-corasick +Version: 1.1.3 +Origin: https://github.com/BurntSushi/aho-corasick +License: MIT +Copyright: Copyright (c) 2015 Andrew Gallant +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/aho-corasick/1.1.5 +Name: aho-corasick +Version: 1.1.5 +Origin: https://github.com/BurntSushi/aho-corasick +License: MIT +Copyright: Copyright (c) 2015 Andrew Gallant +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/allocator-api2/0.2.21 +Name: allocator-api2 +Version: 0.2.21 +Origin: https://github.com/zakarumych/allocator-api2 +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstream/0.6.18 +Name: anstream +Version: 0.6.18 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstream/1.0.0 +Name: anstream +Version: 1.0.0 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstyle-parse/0.2.6 +Name: anstyle-parse +Version: 0.2.6 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstyle-parse/1.0.0 +Name: anstyle-parse +Version: 1.0.0 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstyle-query/1.1.2 +Name: anstyle-query +Version: 1.1.2 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstyle-query/1.1.5 +Name: anstyle-query +Version: 1.1.5 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstyle-wincon/3.0.11 +Name: anstyle-wincon +Version: 3.0.11 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstyle-wincon/3.0.7 +Name: anstyle-wincon +Version: 3.0.7 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstyle/1.0.10 +Name: anstyle +Version: 1.0.10 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstyle/1.0.14 +Name: anstyle +Version: 1.0.14 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anyhow/1.0.104 +Name: anyhow +Version: 1.0.104 +Origin: https://github.com/dtolnay/anyhow +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anyhow/1.0.95 +Name: anyhow +Version: 1.0.95 +Origin: https://github.com/dtolnay/anyhow +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/clap/4.5.30 +Name: clap +Version: 4.5.30 +Origin: https://github.com/clap-rs/clap +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/clap/4.6.7 +Name: clap +Version: 4.6.7 +Origin: https://github.com/clap-rs/clap +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/clap_builder/4.5.30 +Name: clap_builder +Version: 4.5.30 +Origin: https://github.com/clap-rs/clap +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/clap_builder/4.6.7 +Name: clap_builder +Version: 4.6.7 +Origin: https://github.com/clap-rs/clap +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/clap_lex/0.7.4 +Name: clap_lex +Version: 0.7.4 +Origin: https://github.com/clap-rs/clap +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/clap_lex/1.1.1 +Name: clap_lex +Version: 1.1.1 +Origin: https://github.com/clap-rs/clap +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/colorchoice/1.0.3 +Name: colorchoice +Version: 1.0.3 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/colorchoice/1.0.5 +Name: colorchoice +Version: 1.0.5 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/equivalent/1.0.2 +Name: equivalent +Version: 1.0.2 +Origin: https://github.com/indexmap-rs/equivalent +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/foldhash/0.2.0 +Name: foldhash +Version: 0.2.0 +Origin: https://github.com/orlp/foldhash +License: Zlib +Copyright: Copyright (c) 2024 Orson Peters +License-File: ../Open-Source-Notices/zlib-license.txt + +Dependency: crates.io/hashbrown/0.17.1 +Name: hashbrown +Version: 0.17.1 +Origin: https://github.com/rust-lang/hashbrown +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/indexmap/2.14.2 +Name: indexmap +Version: 2.14.2 +Origin: https://github.com/indexmap-rs/indexmap +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/is_terminal_polyfill/1.70.1 +Name: is_terminal_polyfill +Version: 1.70.1 +Origin: https://github.com/polyfill-rs/is_terminal_polyfill +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/is_terminal_polyfill/1.70.2 +Name: is_terminal_polyfill +Version: 1.70.2 +Origin: https://github.com/polyfill-rs/is_terminal_polyfill +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/itoa/1.0.14 +Name: itoa +Version: 1.0.14 +Origin: https://github.com/dtolnay/itoa +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/itoa/1.0.18 +Name: itoa +Version: 1.0.18 +Origin: https://github.com/dtolnay/itoa +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/log/0.4.25 +Name: log +Version: 0.4.25 +Origin: https://github.com/rust-lang/log +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/memchr/2.7.4 +Name: memchr +Version: 2.7.4 +Origin: https://github.com/BurntSushi/memchr +License: MIT +Copyright: Copyright (c) 2015 Andrew Gallant +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/memchr/2.8.3 +Name: memchr +Version: 2.8.3 +Origin: https://github.com/BurntSushi/memchr +License: MIT +Copyright: Copyright (c) 2015 Andrew Gallant +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/once_cell/1.20.3 +Name: once_cell +Version: 1.20.3 +Origin: https://github.com/matklad/once_cell +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/once_cell_polyfill/1.70.2 +Name: once_cell_polyfill +Version: 1.70.2 +Origin: https://github.com/polyfill-rs/once_cell_polyfill +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/regex-automata/0.4.18 +Name: regex-automata +Version: 0.4.18 +Origin: https://github.com/rust-lang/regex +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/regex-automata/0.4.9 +Name: regex-automata +Version: 0.4.9 +Origin: https://github.com/rust-lang/regex/tree/master/regex-automata +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/regex-syntax/0.8.11 +Name: regex-syntax +Version: 0.8.11 +Origin: https://github.com/rust-lang/regex +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/regex-syntax/0.8.5 +Name: regex-syntax +Version: 0.8.5 +Origin: https://github.com/rust-lang/regex/tree/master/regex-syntax +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/regex/1.11.1 +Name: regex +Version: 1.11.1 +Origin: https://github.com/rust-lang/regex +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/regex/1.13.1 +Name: regex +Version: 1.13.1 +Origin: https://github.com/rust-lang/regex +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ryu/1.0.19 +Name: ryu +Version: 1.0.19 +Origin: https://github.com/dtolnay/ryu +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ryu/1.0.23 +Name: ryu +Version: 1.0.23 +Origin: https://github.com/dtolnay/ryu +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde/1.0.217 +Name: serde +Version: 1.0.217 +Origin: https://github.com/serde-rs/serde +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde/1.0.229 +Name: serde +Version: 1.0.229 +Origin: https://github.com/serde-rs/serde +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde_core/1.0.229 +Name: serde_core +Version: 1.0.229 +Origin: https://github.com/serde-rs/serde +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde_json/1.0.138 +Name: serde_json +Version: 1.0.138 +Origin: https://github.com/serde-rs/json +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde_json/1.0.154 +Name: serde_json +Version: 1.0.154 +Origin: https://github.com/serde-rs/json +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde_yaml/0.9.34+deprecated +Name: serde_yaml +Version: 0.9.34+deprecated +Origin: https://github.com/dtolnay/serde-yaml +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/smallvec/1.14.0 +Name: smallvec +Version: 1.14.0 +Origin: https://github.com/servo/rust-smallvec +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/streaming-iterator/0.1.9 +Name: streaming-iterator +Version: 0.1.9 +Origin: https://github.com/sfackler/streaming-iterator +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/strsim/0.11.1 +Name: strsim +Version: 0.11.1 +Origin: https://github.com/rapidfuzz/strsim-rs +License: MIT +Copyright: Copyright (c) 2015 Danny Guo +Copyright: Copyright (c) 2016 Titus Wormer +Copyright: Copyright (c) 2018 Akash Kurdekar +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/thiserror/1.0.69 +Name: thiserror +Version: 1.0.69 +Origin: https://github.com/dtolnay/thiserror +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/tree-sitter-graph/0.12.0 +Name: tree-sitter-graph +Version: 0.12.0 +Origin: https://github.com/tree-sitter/tree-sitter-graph/ +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/tree-sitter-language/0.1.5 +Name: tree-sitter-language +Version: 0.1.5 +Origin: https://github.com/tree-sitter/tree-sitter +License: MIT +Copyright: Copyright (c) 2018-2024 Max Brunsfeld +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tree-sitter-language/0.1.7 +Name: tree-sitter-language +Version: 0.1.7 +Origin: https://github.com/tree-sitter/tree-sitter +License: MIT +Copyright: Copyright (c) 2018-2024 Max Brunsfeld +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tree-sitter-python/0.25.0 +Name: tree-sitter-python +Version: 0.25.0 +Origin: https://github.com/tree-sitter/tree-sitter-python +License: MIT +Copyright: Copyright (c) 2016 Max Brunsfeld +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tree-sitter-ruby/0.23.1 +Name: tree-sitter-ruby +Version: 0.23.1 +Origin: https://github.com/tree-sitter/tree-sitter-ruby +License: MIT +Copyright: Copyright (c) 2016 Rob Rix +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tree-sitter/0.24.7 +Name: tree-sitter +Version: 0.24.7 +Origin: https://github.com/tree-sitter/tree-sitter +License: MIT +Copyright: Copyright (c) 2018-2024 Max Brunsfeld +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tree-sitter/0.26.9 +Name: tree-sitter +Version: 0.26.9 +Origin: https://github.com/tree-sitter/tree-sitter +License: MIT +Copyright: Copyright (c) 2018-2024 Max Brunsfeld +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/unsafe-libyaml/0.2.11 +Name: unsafe-libyaml +Version: 0.2.11 +Origin: https://github.com/dtolnay/unsafe-libyaml +License: MIT +Copyright: Copyright (c) David Tolnay +Copyright: Copyright (c) 2017-2020 Ingy döt Net +Copyright: Copyright (c) 2006-2016 Kirill Simonov +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/utf8parse/0.2.2 +Name: utf8parse +Version: 0.2.2 +Origin: https://github.com/alacritty/vte +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/windows-sys/0.59.0 +Name: windows-sys +Version: 0.59.0 +Origin: https://github.com/microsoft/windows-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/windows-sys/0.60.2 +Name: windows-sys +Version: 0.60.2 +Origin: https://github.com/microsoft/windows-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/windows-targets/0.52.6 +Name: windows-targets +Version: 0.52.6 +Origin: https://github.com/microsoft/windows-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/windows-targets/0.53.5 +Name: windows-targets +Version: 0.53.5 +Origin: https://github.com/microsoft/windows-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/windows_x86_64_msvc/0.52.6 +Name: windows_x86_64_msvc +Version: 0.52.6 +Origin: https://github.com/microsoft/windows-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/windows_x86_64_msvc/0.53.1 +Name: windows_x86_64_msvc +Version: 0.53.1 +Origin: https://github.com/microsoft/windows-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/zmij/1.0.23 +Name: zmij +Version: 1.0.23 +Origin: https://github.com/dtolnay/zmij +License: MIT +Copyright: Copyright (c) David Tolnay +Copyright: Copyright (c) 2025 Victor Zverovich +License-File: ../Open-Source-Notices/mit.txt + +Dependency: rust-std +Name: Rust standard library +Version: 1.101.0 +Origin: https://github.com/rust-lang/rust +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: vendored/blib2to3 +Name: blib2to3 (from the Black code formatter and CPython's lib2to3) +Version: vendored +Origin: https://github.com/psf/black/tree/main/src/blib2to3 +License: MIT AND PSF-2.0 +Copyright: Copyright (c) 2018 Łukasz Langa +License-File: ../Open-Source-Notices/mit.txt +License-File: ../Open-Source-Notices/python3.txt + +Dependency: vendored/cpython +Name: CPython (imp.py, ast.py and built-in object models) +Version: vendored +Origin: https://github.com/python/cpython +License: PSF-2.0 +License-File: ../Open-Source-Notices/python3.txt + +Dependency: vendored/lark +Name: Lark +Version: 0.6.3 +Origin: https://github.com/lark-parser/lark +License: MIT +Copyright: Copyright © 2017 Erez Shinan +License-File: ../Open-Source-Notices/mit.txt + +Dependency: vendored/six-stubs +Name: six (analysis stubs) +Version: vendored +Origin: https://github.com/benjaminp/six +License: MIT +Copyright: Copyright (c) 2010-2019 Benjamin Peterson +License-File: ../Open-Source-Notices/mit.txt + +Dependency: vendored/tree-sitter-python +Name: tree-sitter-python +Version: 0.19.0 +Origin: https://github.com/tree-sitter/tree-sitter-python +License: MIT +Copyright: Copyright (c) 2016 Max Brunsfeld +License-File: ../Open-Source-Notices/mit.txt diff --git a/python/notices-extras.json b/python/notices-extras.json new file mode 100644 index 000000000000..9361d23433fd --- /dev/null +++ b/python/notices-extras.json @@ -0,0 +1,41 @@ +{ + "vendored/blib2to3": { + "name": "blib2to3 (from the Black code formatter and CPython's lib2to3)", + "version": "vendored", + "origin": "https://github.com/psf/black/tree/main/src/blib2to3", + "license": "MIT AND PSF-2.0", + "license_files": ["mit.txt", "python3.txt"], + "copyright": ["Copyright (c) 2018 Łukasz Langa"] + }, + "vendored/cpython": { + "name": "CPython (imp.py, ast.py and built-in object models)", + "version": "vendored", + "origin": "https://github.com/python/cpython", + "license": "PSF-2.0", + "license_files": ["python3.txt"] + }, + "vendored/lark": { + "name": "Lark", + "version": "0.6.3", + "origin": "https://github.com/lark-parser/lark", + "license": "MIT", + "license_files": ["mit.txt"], + "copyright": ["Copyright © 2017 Erez Shinan"] + }, + "vendored/six-stubs": { + "name": "six (analysis stubs)", + "version": "vendored", + "origin": "https://github.com/benjaminp/six", + "license": "MIT", + "license_files": ["mit.txt"], + "copyright": ["Copyright (c) 2010-2019 Benjamin Peterson"] + }, + "vendored/tree-sitter-python": { + "name": "tree-sitter-python", + "version": "0.19.0", + "origin": "https://github.com/tree-sitter/tree-sitter-python", + "license": "MIT", + "license_files": ["mit.txt"], + "copyright": ["Copyright (c) 2016 Max Brunsfeld"] + } +} diff --git a/ruby/BUILD.bazel b/ruby/BUILD.bazel index 751a41fbc486..b3acd0f38dbe 100644 --- a/ruby/BUILD.bazel +++ b/ruby/BUILD.bazel @@ -1,5 +1,6 @@ load("@rules_pkg//pkg:mappings.bzl", "pkg_filegroup") load("//misc/bazel:pkg.bzl", "codeql_pack", "codeql_pkg_files") +load("//misc/bazel:rust_notices.bzl", "rust_notices") package(default_visibility = ["//visibility:public"]) @@ -34,6 +35,7 @@ codeql_pkg_files( name = "codeql-extractor-yml", srcs = [ "codeql-extractor.yml", + ":checked-notices", "//:LICENSE", ], strip_prefix = None, @@ -47,6 +49,10 @@ codeql_pkg_files( prefix = "tools/{CODEQL_PLATFORM}", ) +rust_notices( + components = [":extractor-arch"], +) + codeql_pack( name = "ruby", srcs = [ diff --git a/ruby/NOTICES b/ruby/NOTICES new file mode 100644 index 000000000000..920f6849d807 --- /dev/null +++ b/ruby/NOTICES @@ -0,0 +1,680 @@ +Generated file; regenerate with the extractor's notices script. +Legal texts are provided in the CLI's Open-Source-Notices directory. +Extractor-only archives require that shared directory. + +Dependency: crates.io/adler2/2.0.1 +Name: adler2 +Version: 2.0.1 +Origin: https://github.com/oyvindln/adler2 +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/aho-corasick/1.1.5 +Name: aho-corasick +Version: 1.1.5 +Origin: https://github.com/BurntSushi/aho-corasick +License: MIT +Copyright: Copyright (c) 2015 Andrew Gallant +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/allocator-api2/0.2.21 +Name: allocator-api2 +Version: 0.2.21 +Origin: https://github.com/zakarumych/allocator-api2 +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstream/1.0.0 +Name: anstream +Version: 1.0.0 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstyle-parse/1.0.0 +Name: anstyle-parse +Version: 1.0.0 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstyle-query/1.1.5 +Name: anstyle-query +Version: 1.1.5 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstyle-wincon/3.0.11 +Name: anstyle-wincon +Version: 3.0.11 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstyle/1.0.14 +Name: anstyle +Version: 1.0.14 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/bstr/1.12.1 +Name: bstr +Version: 1.12.1 +Origin: https://github.com/BurntSushi/bstr +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/cfg-if/1.0.4 +Name: cfg-if +Version: 1.0.4 +Origin: https://github.com/rust-lang/cfg-if +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/chrono/0.4.45 +Name: chrono +Version: 0.4.45 +Origin: https://github.com/chronotope/chrono +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/clap/4.6.7 +Name: clap +Version: 4.6.7 +Origin: https://github.com/clap-rs/clap +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/clap_builder/4.6.7 +Name: clap_builder +Version: 4.6.7 +Origin: https://github.com/clap-rs/clap +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/clap_lex/1.1.1 +Name: clap_lex +Version: 1.1.1 +Origin: https://github.com/clap-rs/clap +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/colorchoice/1.0.5 +Name: colorchoice +Version: 1.0.5 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/core-foundation-sys/0.8.7 +Name: core-foundation-sys +Version: 0.8.7 +Origin: https://github.com/servo/core-foundation-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/crc32fast/1.5.4 +Name: crc32fast +Version: 1.5.4 +Origin: https://github.com/srijs/rust-crc32fast +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/crossbeam-deque/0.8.8 +Name: crossbeam-deque +Version: 0.8.8 +Origin: https://github.com/crossbeam-rs/crossbeam +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/crossbeam-epoch/0.9.21 +Name: crossbeam-epoch +Version: 0.9.21 +Origin: https://github.com/crossbeam-rs/crossbeam +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/crossbeam-utils/0.8.23 +Name: crossbeam-utils +Version: 0.8.23 +Origin: https://github.com/crossbeam-rs/crossbeam +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/deranged/0.5.8 +Name: deranged +Version: 0.5.8 +Origin: https://github.com/jhpratt/deranged +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/either/1.19.0 +Name: either +Version: 1.19.0 +Origin: https://github.com/rayon-rs/either +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/encoding-index-japanese/1.20141219.5 +Name: encoding-index-japanese +Version: 1.20141219.5 +Origin: https://crates.io/crates/encoding-index-japanese +License: CC0-1.0 +License-File: ../Open-Source-Notices/cc-0.txt + +Dependency: crates.io/encoding-index-korean/1.20141219.5 +Name: encoding-index-korean +Version: 1.20141219.5 +Origin: https://crates.io/crates/encoding-index-korean +License: CC0-1.0 +License-File: ../Open-Source-Notices/cc-0.txt + +Dependency: crates.io/encoding-index-simpchinese/1.20141219.5 +Name: encoding-index-simpchinese +Version: 1.20141219.5 +Origin: https://crates.io/crates/encoding-index-simpchinese +License: CC0-1.0 +License-File: ../Open-Source-Notices/cc-0.txt + +Dependency: crates.io/encoding-index-singlebyte/1.20141219.5 +Name: encoding-index-singlebyte +Version: 1.20141219.5 +Origin: https://crates.io/crates/encoding-index-singlebyte +License: CC0-1.0 +License-File: ../Open-Source-Notices/cc-0.txt + +Dependency: crates.io/encoding-index-tradchinese/1.20141219.5 +Name: encoding-index-tradchinese +Version: 1.20141219.5 +Origin: https://crates.io/crates/encoding-index-tradchinese +License: CC0-1.0 +License-File: ../Open-Source-Notices/cc-0.txt + +Dependency: crates.io/encoding/0.2.33 +Name: encoding +Version: 0.2.33 +Origin: https://github.com/lifthrasiir/rust-encoding +License: MIT +Copyright: Copyright (c) 2013, Kang Seonghoon. +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/encoding_index_tests/0.1.4 +Name: encoding_index_tests +Version: 0.1.4 +Origin: https://crates.io/crates/encoding_index_tests +License: CC0-1.0 +License-File: ../Open-Source-Notices/cc-0.txt + +Dependency: crates.io/equivalent/1.0.2 +Name: equivalent +Version: 1.0.2 +Origin: https://github.com/indexmap-rs/equivalent +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/flate2/1.1.9 +Name: flate2 +Version: 1.1.9 +Origin: https://github.com/rust-lang/flate2-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/foldhash/0.2.0 +Name: foldhash +Version: 0.2.0 +Origin: https://github.com/orlp/foldhash +License: Zlib +Copyright: Copyright (c) 2024 Orson Peters +License-File: ../Open-Source-Notices/zlib-license.txt + +Dependency: crates.io/globset/0.4.18 +Name: globset +Version: 0.4.18 +Origin: https://github.com/BurntSushi/ripgrep/tree/master/crates/globset +License: MIT +Copyright: Copyright (c) 2015 Andrew Gallant +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/hashbrown/0.17.1 +Name: hashbrown +Version: 0.17.1 +Origin: https://github.com/rust-lang/hashbrown +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/iana-time-zone/0.1.65 +Name: iana-time-zone +Version: 0.1.65 +Origin: https://github.com/strawlab/iana-time-zone +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/indexmap/2.14.2 +Name: indexmap +Version: 2.14.2 +Origin: https://github.com/indexmap-rs/indexmap +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/is_terminal_polyfill/1.70.2 +Name: is_terminal_polyfill +Version: 1.70.2 +Origin: https://github.com/polyfill-rs/is_terminal_polyfill +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/itoa/1.0.18 +Name: itoa +Version: 1.0.18 +Origin: https://github.com/dtolnay/itoa +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/lazy_static/1.5.1 +Name: lazy_static +Version: 1.5.1 +Origin: https://github.com/rust-lang-nursery/lazy-static.rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/libc/0.2.189 +Name: libc +Version: 0.2.189 +Origin: https://github.com/rust-lang/libc +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/log/0.4.34 +Name: log +Version: 0.4.34 +Origin: https://github.com/rust-lang/log +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/matchers/0.2.0 +Name: matchers +Version: 0.2.0 +Origin: https://github.com/hawkw/matchers +License: MIT +Copyright: Copyright (c) 2019 Eliza Weisman +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/memchr/2.8.3 +Name: memchr +Version: 2.8.3 +Origin: https://github.com/BurntSushi/memchr +License: MIT +Copyright: Copyright (c) 2015 Andrew Gallant +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/miniz_oxide/0.8.9 +Name: miniz_oxide +Version: 0.8.9 +Origin: https://github.com/Frommi/miniz_oxide/tree/master/miniz_oxide +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/nu-ansi-term/0.50.3 +Name: nu-ansi-term +Version: 0.50.3 +Origin: https://github.com/nushell/nu-ansi-term +License: MIT +Copyright: Copyright (c) 2014 Benjamin Sago +Copyright: Copyright (c) 2021-2022 The Nushell Project Developers +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/num-conv/0.2.2 +Name: num-conv +Version: 0.2.2 +Origin: https://github.com/jhpratt/num-conv +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/num-traits/0.2.19 +Name: num-traits +Version: 0.2.19 +Origin: https://github.com/rust-num/num-traits +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/num_cpus/1.17.0 +Name: num_cpus +Version: 1.17.0 +Origin: https://github.com/seanmonstar/num_cpus +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/num_threads/0.1.7 +Name: num_threads +Version: 0.1.7 +Origin: https://github.com/jhpratt/num_threads +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/once_cell/1.21.4 +Name: once_cell +Version: 1.21.4 +Origin: https://github.com/matklad/once_cell +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/once_cell_polyfill/1.70.2 +Name: once_cell_polyfill +Version: 1.70.2 +Origin: https://github.com/polyfill-rs/once_cell_polyfill +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/pin-project-lite/0.2.17 +Name: pin-project-lite +Version: 0.2.17 +Origin: https://github.com/taiki-e/pin-project-lite +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/powerfmt/0.2.0 +Name: powerfmt +Version: 0.2.0 +Origin: https://github.com/jhpratt/powerfmt +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/rayon-core/1.13.0 +Name: rayon-core +Version: 1.13.0 +Origin: https://github.com/rayon-rs/rayon +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/rayon/1.12.0 +Name: rayon +Version: 1.12.0 +Origin: https://github.com/rayon-rs/rayon +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/regex-automata/0.4.18 +Name: regex-automata +Version: 0.4.18 +Origin: https://github.com/rust-lang/regex +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/regex-syntax/0.8.11 +Name: regex-syntax +Version: 0.8.11 +Origin: https://github.com/rust-lang/regex +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/regex/1.13.1 +Name: regex +Version: 1.13.1 +Origin: https://github.com/rust-lang/regex +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ryu/1.0.23 +Name: ryu +Version: 1.0.23 +Origin: https://github.com/dtolnay/ryu +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde/1.0.229 +Name: serde +Version: 1.0.229 +Origin: https://github.com/serde-rs/serde +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde_core/1.0.229 +Name: serde_core +Version: 1.0.229 +Origin: https://github.com/serde-rs/serde +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde_json/1.0.154 +Name: serde_json +Version: 1.0.154 +Origin: https://github.com/serde-rs/json +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde_yaml/0.9.34+deprecated +Name: serde_yaml +Version: 0.9.34+deprecated +Origin: https://github.com/dtolnay/serde-yaml +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/sharded-slab/0.1.7 +Name: sharded-slab +Version: 0.1.7 +Origin: https://github.com/hawkw/sharded-slab +License: MIT +Copyright: Copyright (c) 2019 Eliza Weisman +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/simd-adler32/0.3.10 +Name: simd-adler32 +Version: 0.3.10 +Origin: https://github.com/mcountryman/simd-adler32 +License: MIT +Copyright: Copyright (c) [2021] [Marvin Countryman] +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/smallvec/1.16.1 +Name: smallvec +Version: 1.16.1 +Origin: https://github.com/servo/rust-smallvec +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/streaming-iterator/0.1.9 +Name: streaming-iterator +Version: 0.1.9 +Origin: https://github.com/sfackler/streaming-iterator +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/strsim/0.11.1 +Name: strsim +Version: 0.11.1 +Origin: https://github.com/rapidfuzz/strsim-rs +License: MIT +Copyright: Copyright (c) 2015 Danny Guo +Copyright: Copyright (c) 2016 Titus Wormer +Copyright: Copyright (c) 2018 Akash Kurdekar +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/thread_local/1.1.10 +Name: thread_local +Version: 1.1.10 +Origin: https://github.com/Amanieu/thread_local-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/time-core/0.1.9 +Name: time-core +Version: 0.1.9 +Origin: https://github.com/time-rs/time +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/time/0.3.55 +Name: time +Version: 0.3.55 +Origin: https://github.com/time-rs/time +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/tracing-core/0.1.36 +Name: tracing-core +Version: 0.1.36 +Origin: https://github.com/tokio-rs/tracing +License: MIT +Copyright: Copyright (c) 2019 Tokio Contributors +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tracing-log/0.2.0 +Name: tracing-log +Version: 0.2.0 +Origin: https://github.com/tokio-rs/tracing +License: MIT +Copyright: Copyright (c) 2019 Tokio Contributors +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tracing-subscriber/0.3.23 +Name: tracing-subscriber +Version: 0.3.23 +Origin: https://github.com/tokio-rs/tracing +License: MIT +Copyright: Copyright (c) 2019 Tokio Contributors +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tracing/0.1.44 +Name: tracing +Version: 0.1.44 +Origin: https://github.com/tokio-rs/tracing +License: MIT +Copyright: Copyright (c) 2019 Tokio Contributors +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tree-sitter-embedded-template/0.25.0 +Name: tree-sitter-embedded-template +Version: 0.25.0 +Origin: https://github.com/tree-sitter/tree-sitter-embedded-template +License: MIT +Copyright: Copyright (c) 2018 Max Brunsfeld +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tree-sitter-language/0.1.7 +Name: tree-sitter-language +Version: 0.1.7 +Origin: https://github.com/tree-sitter/tree-sitter +License: MIT +Copyright: Copyright (c) 2018-2024 Max Brunsfeld +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tree-sitter-python/0.25.0 +Name: tree-sitter-python +Version: 0.25.0 +Origin: https://github.com/tree-sitter/tree-sitter-python +License: MIT +Copyright: Copyright (c) 2016 Max Brunsfeld +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tree-sitter-ruby/0.23.1 +Name: tree-sitter-ruby +Version: 0.23.1 +Origin: https://github.com/tree-sitter/tree-sitter-ruby +License: MIT +Copyright: Copyright (c) 2016 Rob Rix +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tree-sitter/0.26.9 +Name: tree-sitter +Version: 0.26.9 +Origin: https://github.com/tree-sitter/tree-sitter +License: MIT +Copyright: Copyright (c) 2018-2024 Max Brunsfeld +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/unsafe-libyaml/0.2.11 +Name: unsafe-libyaml +Version: 0.2.11 +Origin: https://github.com/dtolnay/unsafe-libyaml +License: MIT +Copyright: Copyright (c) David Tolnay +Copyright: Copyright (c) 2017-2020 Ingy döt Net +Copyright: Copyright (c) 2006-2016 Kirill Simonov +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/utf8parse/0.2.2 +Name: utf8parse +Version: 0.2.2 +Origin: https://github.com/alacritty/vte +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/windows-link/0.2.1 +Name: windows-link +Version: 0.2.1 +Origin: https://github.com/microsoft/windows-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/windows-sys/0.60.2 +Name: windows-sys +Version: 0.60.2 +Origin: https://github.com/microsoft/windows-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/windows-targets/0.53.5 +Name: windows-targets +Version: 0.53.5 +Origin: https://github.com/microsoft/windows-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/windows_x86_64_msvc/0.53.1 +Name: windows_x86_64_msvc +Version: 0.53.1 +Origin: https://github.com/microsoft/windows-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/zlib-rs/0.6.8 +Name: zlib-rs +Version: 0.6.8 +Origin: https://github.com/trifectatechfoundation/zlib-rs +License: Zlib +Copyright: (C) 2024 Trifecta Tech Foundation +Copyright: Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler +License-File: ../Open-Source-Notices/zlib-license.txt + +Dependency: crates.io/zmij/1.0.23 +Name: zmij +Version: 1.0.23 +Origin: https://github.com/dtolnay/zmij +License: MIT +Copyright: Copyright (c) David Tolnay +Copyright: Copyright (c) 2025 Victor Zverovich +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/zstd-safe/8.1.0 +Name: zstd-safe +Version: 8.1.0 +Origin: https://github.com/gyscos/zstd-rs +License: BSD-3-Clause +Copyright: Copyright (c) 2026, Alexandre Bury +License-File: ../Open-Source-Notices/bsd-3-clause.txt + +Dependency: crates.io/zstd-sys/2.1.1+zstd.1.5.7 +Name: zstd-sys +Version: 2.1.1+zstd.1.5.7 +Origin: https://github.com/gyscos/zstd-rs +License: BSD-3-Clause +Copyright: Copyright (c) 2026, Alexandre Bury +Copyright: Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved. +License-File: ../Open-Source-Notices/bsd-3-clause.txt + +Dependency: crates.io/zstd/0.14.2 +Name: zstd +Version: 0.14.2 +Origin: https://github.com/gyscos/zstd-rs +License: BSD-3-Clause +Copyright: Copyright (c) 2026, Alexandre Bury +License-File: ../Open-Source-Notices/bsd-3-clause.txt + +Dependency: rust-std +Name: Rust standard library +Version: 1.101.0 +Origin: https://github.com/rust-lang/rust +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt diff --git a/rust/BUILD.bazel b/rust/BUILD.bazel index d574cbc7c330..a9b546e1ba13 100644 --- a/rust/BUILD.bazel +++ b/rust/BUILD.bazel @@ -4,6 +4,7 @@ load( "codeql_pack", "codeql_pkg_files", ) +load("//misc/bazel:rust_notices.bzl", "rust_notices") package(default_visibility = ["//rust:__subpackages__"]) @@ -31,6 +32,10 @@ codeql_pkg_files( prefix = "{CODEQL_PLATFORM}", ) +rust_notices( + components = [":tools-arch"], +) + pkg_filegroup( name = "tools", srcs = [ @@ -47,6 +52,7 @@ codeql_pkg_files( "codeql-extractor.yml", "ql/lib/rust.dbscheme", "ql/lib/rust.dbscheme.stats", + ":checked-notices", "//:LICENSE", ], ) diff --git a/rust/NOTICES b/rust/NOTICES new file mode 100644 index 000000000000..486b03a4791a --- /dev/null +++ b/rust/NOTICES @@ -0,0 +1,1452 @@ +Generated file; regenerate with the extractor's notices script. +Legal texts are provided in the CLI's Open-Source-Notices directory. +Extractor-only archives require that shared directory. + +Dependency: crates.io/adler2/2.0.1 +Name: adler2 +Version: 2.0.1 +Origin: https://github.com/oyvindln/adler2 +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ahash/0.8.12 +Name: ahash +Version: 0.8.12 +Origin: https://github.com/tkaitchuck/ahash +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/aho-corasick/1.1.5 +Name: aho-corasick +Version: 1.1.5 +Origin: https://github.com/BurntSushi/aho-corasick +License: MIT +Copyright: Copyright (c) 2015 Andrew Gallant +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/allocator-api2/0.2.21 +Name: allocator-api2 +Version: 0.2.21 +Origin: https://github.com/zakarumych/allocator-api2 +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstream/1.0.0 +Name: anstream +Version: 1.0.0 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstyle-parse/1.0.0 +Name: anstyle-parse +Version: 1.0.0 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstyle-query/1.1.5 +Name: anstyle-query +Version: 1.1.5 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstyle-wincon/3.0.11 +Name: anstyle-wincon +Version: 3.0.11 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstyle/1.0.14 +Name: anstyle +Version: 1.0.14 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anyhow/1.0.104 +Name: anyhow +Version: 1.0.104 +Origin: https://github.com/dtolnay/anyhow +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/arrayvec/0.7.8 +Name: arrayvec +Version: 0.7.8 +Origin: https://github.com/bluss/arrayvec +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/bitflags/2.13.2 +Name: bitflags +Version: 2.13.2 +Origin: https://github.com/bitflags/bitflags +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/boxcar/0.2.14 +Name: boxcar +Version: 0.2.14 +Origin: https://github.com/ibraheemdev/boxcar +License: MIT +Copyright: Copyright (c) Ibraheem Ahmed +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/camino/1.2.6 +Name: camino +Version: 1.2.6 +Origin: https://github.com/camino-rs/camino +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/cargo-platform/0.3.3 +Name: cargo-platform +Version: 0.3.3 +Origin: https://github.com/rust-lang/cargo +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/cargo_metadata/0.23.1 +Name: cargo_metadata +Version: 0.23.1 +Origin: https://github.com/oli-obk/cargo_metadata +License: MIT +Copyright: Copyright (c) Oliver Schneider +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/cfg-if/1.0.4 +Name: cfg-if +Version: 1.0.4 +Origin: https://github.com/rust-lang/cfg-if +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/chrono/0.4.45 +Name: chrono +Version: 0.4.45 +Origin: https://github.com/chronotope/chrono +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/clap/4.6.7 +Name: clap +Version: 4.6.7 +Origin: https://github.com/clap-rs/clap +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/clap_builder/4.6.7 +Name: clap_builder +Version: 4.6.7 +Origin: https://github.com/clap-rs/clap +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/clap_lex/1.1.1 +Name: clap_lex +Version: 1.1.1 +Origin: https://github.com/clap-rs/clap +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/cobs/0.3.0 +Name: cobs +Version: 0.3.0 +Origin: https://github.com/jamesmunns/cobs.rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/colorchoice/1.0.5 +Name: colorchoice +Version: 1.0.5 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/core-foundation-sys/0.8.7 +Name: core-foundation-sys +Version: 0.8.7 +Origin: https://github.com/servo/core-foundation-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/countme/3.0.1 +Name: countme +Version: 3.0.1 +Origin: https://github.com/matklad/countme +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/cov-mark/2.2.0 +Name: cov-mark +Version: 2.2.0 +Origin: https://github.com/matklad/cov-mark +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/crc32fast/1.5.4 +Name: crc32fast +Version: 1.5.4 +Origin: https://github.com/srijs/rust-crc32fast +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/crossbeam-channel/0.5.17 +Name: crossbeam-channel +Version: 0.5.17 +Origin: https://github.com/crossbeam-rs/crossbeam +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/crossbeam-deque/0.8.8 +Name: crossbeam-deque +Version: 0.8.8 +Origin: https://github.com/crossbeam-rs/crossbeam +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/crossbeam-epoch/0.9.21 +Name: crossbeam-epoch +Version: 0.9.21 +Origin: https://github.com/crossbeam-rs/crossbeam +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/crossbeam-queue/0.3.14 +Name: crossbeam-queue +Version: 0.3.14 +Origin: https://github.com/crossbeam-rs/crossbeam +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/crossbeam-utils/0.8.23 +Name: crossbeam-utils +Version: 0.8.23 +Origin: https://github.com/crossbeam-rs/crossbeam +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/dashmap/6.2.1 +Name: dashmap +Version: 6.2.1 +Origin: https://github.com/xacrimon/dashmap +License: MIT +Copyright: Copyright (c) 2019 Acrimon +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/deranged/0.5.8 +Name: deranged +Version: 0.5.8 +Origin: https://github.com/jhpratt/deranged +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/dissimilar/1.0.11 +Name: dissimilar +Version: 1.0.11 +Origin: https://github.com/dtolnay/dissimilar +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/drop_bomb/0.1.5 +Name: drop_bomb +Version: 0.1.5 +Origin: https://github.com/matklad/drop_bomb +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/dunce/1.0.5 +Name: dunce +Version: 1.0.5 +Origin: https://gitlab.com/kornelski/dunce +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/either/1.19.0 +Name: either +Version: 1.19.0 +Origin: https://github.com/rayon-rs/either +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ena/0.14.4 +Name: ena +Version: 0.14.4 +Origin: https://github.com/rust-lang/ena +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/equivalent/1.0.2 +Name: equivalent +Version: 1.0.2 +Origin: https://github.com/indexmap-rs/equivalent +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/figment/0.10.19 +Name: figment +Version: 0.10.19 +Origin: https://github.com/SergioBenitez/Figment +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/fixedbitset/0.5.7 +Name: fixedbitset +Version: 0.5.7 +Origin: https://github.com/petgraph/fixedbitset +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/flate2/1.1.9 +Name: flate2 +Version: 1.1.9 +Origin: https://github.com/rust-lang/flate2-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/foldhash/0.1.5 +Name: foldhash +Version: 0.1.5 +Origin: https://github.com/orlp/foldhash +License: Zlib +Copyright: Copyright (c) 2024 Orson Peters +License-File: ../Open-Source-Notices/zlib-license.txt + +Dependency: crates.io/foldhash/0.2.0 +Name: foldhash +Version: 0.2.0 +Origin: https://github.com/orlp/foldhash +License: Zlib +Copyright: Copyright (c) 2024 Orson Peters +License-File: ../Open-Source-Notices/zlib-license.txt + +Dependency: crates.io/fsevent-sys/4.1.0 +Name: fsevent-sys +Version: 4.1.0 +Origin: https://github.com/octplane/fsevent-rust/tree/master/fsevent-sys +License: MIT +Copyright: Copyright (c) 2015 Pierre Baillet +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/fst/0.4.7 +Name: fst +Version: 0.4.7 +Origin: https://github.com/BurntSushi/fst +License: MIT +Copyright: Copyright (c) 2015 Andrew Gallant +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/glob/0.3.4 +Name: glob +Version: 0.3.4 +Origin: https://github.com/rust-lang/glob +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/hashbrown/0.14.5 +Name: hashbrown +Version: 0.14.5 +Origin: https://github.com/rust-lang/hashbrown +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/hashbrown/0.15.5 +Name: hashbrown +Version: 0.15.5 +Origin: https://github.com/rust-lang/hashbrown +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/hashbrown/0.17.1 +Name: hashbrown +Version: 0.17.1 +Origin: https://github.com/rust-lang/hashbrown +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/hashlink/0.12.1 +Name: hashlink +Version: 0.12.1 +Origin: https://github.com/djc/hashlink +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/iana-time-zone/0.1.65 +Name: iana-time-zone +Version: 0.1.65 +Origin: https://github.com/strawlab/iana-time-zone +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/indexmap/2.14.2 +Name: indexmap +Version: 2.14.2 +Origin: https://github.com/indexmap-rs/indexmap +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/inlinable_string/0.1.15 +Name: inlinable_string +Version: 0.1.15 +Origin: https://github.com/fitzgen/inlinable_string +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/inotify-sys/0.1.8 +Name: inotify-sys +Version: 0.1.8 +Origin: https://github.com/hannobraun/inotify-sys +License: ISC +Copyright: Copyright (c) Hanno Braun and contributors +License-File: ../Open-Source-Notices/isc-license.txt + +Dependency: crates.io/inotify/0.11.5 +Name: inotify +Version: 0.11.5 +Origin: https://github.com/hannobraun/inotify-rs +License: ISC +Copyright: Copyright (c) Hanno Braun and contributors +License-File: ../Open-Source-Notices/isc-license.txt + +Dependency: crates.io/intrusive-collections/0.10.3 +Name: intrusive-collections +Version: 0.10.3 +Origin: https://github.com/Amanieu/intrusive-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/inventory/0.3.24 +Name: inventory +Version: 0.3.24 +Origin: https://github.com/dtolnay/inventory +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/is_terminal_polyfill/1.70.2 +Name: is_terminal_polyfill +Version: 1.70.2 +Origin: https://github.com/polyfill-rs/is_terminal_polyfill +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/itertools/0.15.0 +Name: itertools +Version: 0.15.0 +Origin: https://github.com/rust-itertools/itertools +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/itoa/1.0.18 +Name: itoa +Version: 1.0.18 +Origin: https://github.com/dtolnay/itoa +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/jod-thread/1.0.0 +Name: jod-thread +Version: 1.0.0 +Origin: https://github.com/matklad/jod-thread +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/la-arena/0.3.1 +Name: la-arena +Version: 0.3.1 +Origin: https://github.com/rust-lang/rust-analyzer/tree/master/lib/la-arena +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/lazy_static/1.5.1 +Name: lazy_static +Version: 1.5.1 +Origin: https://github.com/rust-lang-nursery/lazy-static.rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/libc/0.2.189 +Name: libc +Version: 0.2.189 +Origin: https://github.com/rust-lang/libc +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/line-index/0.1.2 +Name: line-index +Version: 0.1.2 +Origin: https://github.com/rust-lang/rust-analyzer/tree/master/lib/line-index +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/lock_api/0.4.14 +Name: lock_api +Version: 0.4.14 +Origin: https://github.com/Amanieu/parking_lot +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/log/0.3.9 +Name: log +Version: 0.3.9 +Origin: https://github.com/rust-lang/log +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/log/0.4.34 +Name: log +Version: 0.4.34 +Origin: https://github.com/rust-lang/log +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/matchers/0.2.0 +Name: matchers +Version: 0.2.0 +Origin: https://github.com/hawkw/matchers +License: MIT +Copyright: Copyright (c) 2019 Eliza Weisman +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/memchr/2.8.3 +Name: memchr +Version: 2.8.3 +Origin: https://github.com/BurntSushi/memchr +License: MIT +Copyright: Copyright (c) 2015 Andrew Gallant +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/memoffset/0.9.1 +Name: memoffset +Version: 0.9.1 +Origin: https://github.com/Gilnaa/memoffset +License: MIT +Copyright: Copyright (c) 2017 Gilad Naaman +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/miniz_oxide/0.8.9 +Name: miniz_oxide +Version: 0.8.9 +Origin: https://github.com/Frommi/miniz_oxide/tree/master/miniz_oxide +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/mio/1.2.3 +Name: mio +Version: 1.2.3 +Origin: https://github.com/tokio-rs/mio +License: MIT +Copyright: Copyright (c) 2014 Carl Lerche and other MIO contributors +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/miow/0.6.1 +Name: miow +Version: 0.6.1 +Origin: https://github.com/yoshuawuyts/miow +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/mustache/0.9.0 +Name: mustache +Version: 0.9.0 +Origin: https://github.com/nickel-org/rust-mustache +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/nohash-hasher/0.2.0 +Name: nohash-hasher +Version: 0.2.0 +Origin: https://github.com/paritytech/nohash-hasher +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/notify-types/2.1.0 +Name: notify-types +Version: 2.1.0 +Origin: https://github.com/notify-rs/notify.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/notify/8.2.0 +Name: notify +Version: 8.2.0 +Origin: https://github.com/notify-rs/notify.git +License: CC0-1.0 +License-File: ../Open-Source-Notices/cc-0.txt + +Dependency: crates.io/nu-ansi-term/0.50.3 +Name: nu-ansi-term +Version: 0.50.3 +Origin: https://github.com/nushell/nu-ansi-term +License: MIT +Copyright: Copyright (c) 2014 Benjamin Sago +Copyright: Copyright (c) 2021-2022 The Nushell Project Developers +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/num-conv/0.2.2 +Name: num-conv +Version: 0.2.2 +Origin: https://github.com/jhpratt/num-conv +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/num-traits/0.2.19 +Name: num-traits +Version: 0.2.19 +Origin: https://github.com/rust-num/num-traits +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/num_threads/0.1.7 +Name: num_threads +Version: 0.1.7 +Origin: https://github.com/jhpratt/num_threads +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/once_cell/1.21.4 +Name: once_cell +Version: 1.21.4 +Origin: https://github.com/matklad/once_cell +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/once_cell_polyfill/1.70.2 +Name: once_cell_polyfill +Version: 1.70.2 +Origin: https://github.com/polyfill-rs/once_cell_polyfill +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/oorandom/11.1.5 +Name: oorandom +Version: 11.1.5 +Origin: https://hg.sr.ht/~icefox/oorandom +License: MIT +Copyright: Copyright (c) 2019 Simon Heath +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/parking_lot/0.12.5 +Name: parking_lot +Version: 0.12.5 +Origin: https://github.com/Amanieu/parking_lot +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/parking_lot_core/0.9.12 +Name: parking_lot_core +Version: 0.9.12 +Origin: https://github.com/Amanieu/parking_lot +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/pear/0.2.9 +Name: pear +Version: 0.2.9 +Origin: https://github.com/SergioBenitez/Pear +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/perf-event-open-sys/4.0.0 +Name: perf-event-open-sys +Version: 4.0.0 +Origin: https://github.com/jimblandy/perf-event-open-sys.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/perf-event/0.4.8 +Name: perf-event +Version: 0.4.8 +Origin: https://github.com/jimblandy/perf-event.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/petgraph/0.8.3 +Name: petgraph +Version: 0.8.3 +Origin: https://github.com/petgraph/petgraph +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/pin-project-lite/0.2.17 +Name: pin-project-lite +Version: 0.2.17 +Origin: https://github.com/taiki-e/pin-project-lite +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/portable-atomic/1.15.0 +Name: portable-atomic +Version: 1.15.0 +Origin: https://github.com/taiki-e/portable-atomic +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/postcard/1.1.3 +Name: postcard +Version: 1.1.3 +Origin: https://github.com/jamesmunns/postcard +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/powerfmt/0.2.0 +Name: powerfmt +Version: 0.2.0 +Origin: https://github.com/jhpratt/powerfmt +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra-ap-rustc_abi/0.166.0 +Name: ra-ap-rustc_abi +Version: 0.166.0 +Origin: https://github.com/rust-lang/rust +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra-ap-rustc_ast_ir/0.166.0 +Name: ra-ap-rustc_ast_ir +Version: 0.166.0 +Origin: https://github.com/rust-lang/rust +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra-ap-rustc_hashes/0.166.0 +Name: ra-ap-rustc_hashes +Version: 0.166.0 +Origin: https://github.com/rust-lang/rust +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra-ap-rustc_index/0.166.0 +Name: ra-ap-rustc_index +Version: 0.166.0 +Origin: https://github.com/rust-lang/rust +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra-ap-rustc_lexer/0.166.0 +Name: ra-ap-rustc_lexer +Version: 0.166.0 +Origin: https://github.com/rust-lang/rust +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra-ap-rustc_next_trait_solver/0.166.0 +Name: ra-ap-rustc_next_trait_solver +Version: 0.166.0 +Origin: https://github.com/rust-lang/rust +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra-ap-rustc_parse_format/0.166.0 +Name: ra-ap-rustc_parse_format +Version: 0.166.0 +Origin: https://github.com/rust-lang/rust +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra-ap-rustc_pattern_analysis/0.166.0 +Name: ra-ap-rustc_pattern_analysis +Version: 0.166.0 +Origin: https://github.com/rust-lang/rust +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra-ap-rustc_type_ir/0.166.0 +Name: ra-ap-rustc_type_ir +Version: 0.166.0 +Origin: https://github.com/rust-lang/rust +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_base_db/0.0.358 +Name: ra_ap_base_db +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_cfg/0.0.358 +Name: ra_ap_cfg +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_edition/0.0.358 +Name: ra_ap_edition +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_hir/0.0.358 +Name: ra_ap_hir +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_hir_def/0.0.358 +Name: ra_ap_hir_def +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_hir_expand/0.0.358 +Name: ra_ap_hir_expand +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_hir_ty/0.0.358 +Name: ra_ap_hir_ty +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_ide_db/0.0.358 +Name: ra_ap_ide_db +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_intern/0.0.358 +Name: ra_ap_intern +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_load-cargo/0.0.358 +Name: ra_ap_load-cargo +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_mbe/0.0.358 +Name: ra_ap_mbe +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_parser/0.0.358 +Name: ra_ap_parser +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_paths/0.0.358 +Name: ra_ap_paths +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_proc_macro_api/0.0.358 +Name: ra_ap_proc_macro_api +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_profile/0.0.358 +Name: ra_ap_profile +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_project_model/0.0.358 +Name: ra_ap_project_model +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_span/0.0.358 +Name: ra_ap_span +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_stdx/0.0.358 +Name: ra_ap_stdx +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_syntax-bridge/0.0.358 +Name: ra_ap_syntax-bridge +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_syntax/0.0.358 +Name: ra_ap_syntax +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_test_fixture/0.0.358 +Name: ra_ap_test_fixture +Version: 0.0.358 +Origin: https://crates.io/crates/ra_ap_test_fixture +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_test_utils/0.0.358 +Name: ra_ap_test_utils +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_toolchain/0.0.358 +Name: ra_ap_toolchain +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_tt/0.0.358 +Name: ra_ap_tt +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_vfs-notify/0.0.358 +Name: ra_ap_vfs-notify +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ra_ap_vfs/0.0.358 +Name: ra_ap_vfs +Version: 0.0.358 +Origin: https://github.com/rust-lang/rust-analyzer +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/rayon-core/1.13.0 +Name: rayon-core +Version: 1.13.0 +Origin: https://github.com/rayon-rs/rayon +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/rayon/1.12.0 +Name: rayon +Version: 1.12.0 +Origin: https://github.com/rayon-rs/rayon +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/regex-automata/0.4.18 +Name: regex-automata +Version: 0.4.18 +Origin: https://github.com/rust-lang/regex +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/regex-syntax/0.8.11 +Name: regex-syntax +Version: 0.8.11 +Origin: https://github.com/rust-lang/regex +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/rowan/0.17.0 +Name: rowan +Version: 0.17.0 +Origin: https://github.com/rust-analyzer/rowan +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/rustc-hash/1.1.0 +Name: rustc-hash +Version: 1.1.0 +Origin: https://github.com/rust-lang-nursery/rustc-hash +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/rustc-hash/2.1.3 +Name: rustc-hash +Version: 2.1.3 +Origin: https://github.com/rust-lang/rustc-hash +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/rustc-literal-escaper/0.0.7 +Name: rustc-literal-escaper +Version: 0.0.7 +Origin: https://github.com/rust-lang/literal-escaper +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/rustc-stable-hash/0.1.2 +Name: rustc-stable-hash +Version: 0.1.2 +Origin: https://github.com/rust-lang/rustc-stable-hash +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/rustc_apfloat/0.2.3+llvm-462a31f5a5ab +Name: rustc_apfloat +Version: 0.2.3+llvm-462a31f5a5ab +Origin: https://github.com/rust-lang/rustc_apfloat +License: Apache-2.0 WITH LLVM-exception +License-File: ../Open-Source-Notices/apache-2.0.txt +License-File: ../Open-Source-Notices/llvm-exception.txt + +Dependency: crates.io/ryu/1.0.23 +Name: ryu +Version: 1.0.23 +Origin: https://github.com/dtolnay/ryu +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/salsa-macro-rules/0.28.5 +Name: salsa-macro-rules +Version: 0.28.5 +Origin: https://github.com/salsa-rs/salsa +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/salsa/0.28.5 +Name: salsa +Version: 0.28.5 +Origin: https://github.com/salsa-rs/salsa +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/same-file/1.0.6 +Name: same-file +Version: 1.0.6 +Origin: https://github.com/BurntSushi/same-file +License: MIT +Copyright: Copyright (c) 2017 Andrew Gallant +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/scopeguard/1.2.0 +Name: scopeguard +Version: 1.2.0 +Origin: https://github.com/bluss/scopeguard +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/semver/1.0.28 +Name: semver +Version: 1.0.28 +Origin: https://github.com/dtolnay/semver +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde/1.0.229 +Name: serde +Version: 1.0.229 +Origin: https://github.com/serde-rs/serde +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde_core/1.0.229 +Name: serde_core +Version: 1.0.229 +Origin: https://github.com/serde-rs/serde +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde_json/1.0.154 +Name: serde_json +Version: 1.0.154 +Origin: https://github.com/serde-rs/json +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde_spanned/1.1.2 +Name: serde_spanned +Version: 1.1.2 +Origin: https://github.com/toml-rs/toml +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde_yaml/0.9.34+deprecated +Name: serde_yaml +Version: 0.9.34+deprecated +Origin: https://github.com/dtolnay/serde-yaml +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/sharded-slab/0.1.7 +Name: sharded-slab +Version: 0.1.7 +Origin: https://github.com/hawkw/sharded-slab +License: MIT +Copyright: Copyright (c) 2019 Eliza Weisman +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/simd-adler32/0.3.10 +Name: simd-adler32 +Version: 0.3.10 +Origin: https://github.com/mcountryman/simd-adler32 +License: MIT +Copyright: Copyright (c) [2021] [Marvin Countryman] +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/smallvec/1.16.1 +Name: smallvec +Version: 1.16.1 +Origin: https://github.com/servo/rust-smallvec +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/smol_str/0.3.6 +Name: smol_str +Version: 0.3.6 +Origin: https://github.com/rust-lang/rust-analyzer/tree/master/lib/smol_str +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/stable_deref_trait/1.2.1 +Name: stable_deref_trait +Version: 1.2.1 +Origin: https://github.com/storyyeller/stable_deref_trait +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/strsim/0.11.1 +Name: strsim +Version: 0.11.1 +Origin: https://github.com/rapidfuzz/strsim-rs +License: MIT +Copyright: Copyright (c) 2015 Danny Guo +Copyright: Copyright (c) 2016 Titus Wormer +Copyright: Copyright (c) 2018 Akash Kurdekar +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/text-size/1.1.1 +Name: text-size +Version: 1.1.1 +Origin: https://github.com/rust-analyzer/text-size +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/thin-vec/0.2.19 +Name: thin-vec +Version: 0.2.19 +Origin: https://github.com/mozilla/thin-vec +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/thiserror/2.0.20 +Name: thiserror +Version: 2.0.20 +Origin: https://github.com/dtolnay/thiserror +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/thread_local/1.1.10 +Name: thread_local +Version: 1.1.10 +Origin: https://github.com/Amanieu/thread_local-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/time-core/0.1.9 +Name: time-core +Version: 0.1.9 +Origin: https://github.com/time-rs/time +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/time/0.3.55 +Name: time +Version: 0.3.55 +Origin: https://github.com/time-rs/time +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/toml/1.1.8+spec-1.1.0 +Name: toml +Version: 1.1.8+spec-1.1.0 +Origin: https://github.com/toml-rs/toml +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/toml_datetime/1.1.2+spec-1.1.0 +Name: toml_datetime +Version: 1.1.2+spec-1.1.0 +Origin: https://github.com/toml-rs/toml +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/toml_parser/1.1.5+spec-1.1.0 +Name: toml_parser +Version: 1.1.5+spec-1.1.0 +Origin: https://github.com/toml-rs/toml +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/toml_writer/1.1.3+spec-1.1.0 +Name: toml_writer +Version: 1.1.3+spec-1.1.0 +Origin: https://github.com/toml-rs/toml +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/tracing-core/0.1.36 +Name: tracing-core +Version: 0.1.36 +Origin: https://github.com/tokio-rs/tracing +License: MIT +Copyright: Copyright (c) 2019 Tokio Contributors +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tracing-flame/0.2.0 +Name: tracing-flame +Version: 0.2.0 +Origin: https://github.com/tokio-rs/tracing +License: MIT +Copyright: Copyright (c) 2019 Tokio Contributors +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tracing-log/0.2.0 +Name: tracing-log +Version: 0.2.0 +Origin: https://github.com/tokio-rs/tracing +License: MIT +Copyright: Copyright (c) 2019 Tokio Contributors +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tracing-subscriber/0.3.23 +Name: tracing-subscriber +Version: 0.3.23 +Origin: https://github.com/tokio-rs/tracing +License: MIT +Copyright: Copyright (c) 2019 Tokio Contributors +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tracing-tree/0.4.1 +Name: tracing-tree +Version: 0.4.1 +Origin: https://github.com/davidbarsky/tracing-tree +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/tracing/0.1.44 +Name: tracing +Version: 0.1.44 +Origin: https://github.com/tokio-rs/tracing +License: MIT +Copyright: Copyright (c) 2019 Tokio Contributors +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/triomphe/0.1.17 +Name: triomphe +Version: 0.1.17 +Origin: https://github.com/Manishearth/triomphe +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/typed-arena/2.0.2 +Name: typed-arena +Version: 2.0.2 +Origin: https://github.com/SimonSapin/rust-typed-arena +License: MIT +Copyright: Copyright (c) 2018 The typed-arena developers +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/typeid/1.0.3 +Name: typeid +Version: 1.0.3 +Origin: https://github.com/dtolnay/typeid +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/uncased/0.9.10 +Name: uncased +Version: 0.9.10 +Origin: https://github.com/SergioBenitez/uncased +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/unicode-ident/1.0.24 +Name: unicode-ident +Version: 1.0.24 +Origin: https://github.com/dtolnay/unicode-ident +License: Apache-2.0 AND Unicode-3.0 +Copyright: Copyright © 1991-2023 Unicode, Inc. +License-File: ../Open-Source-Notices/apache-2.0.txt +License-File: ../Open-Source-Notices/unicode-3.0.txt + +Dependency: crates.io/unicode-properties/0.1.4 +Name: unicode-properties +Version: 0.1.4 +Origin: https://github.com/unicode-rs/unicode-properties +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/unsafe-libyaml/0.2.11 +Name: unsafe-libyaml +Version: 0.2.11 +Origin: https://github.com/dtolnay/unsafe-libyaml +License: MIT +Copyright: Copyright (c) David Tolnay +Copyright: Copyright (c) 2017-2020 Ingy döt Net +Copyright: Copyright (c) 2006-2016 Kirill Simonov +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/utf8parse/0.2.2 +Name: utf8parse +Version: 0.2.2 +Origin: https://github.com/alacritty/vte +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/walkdir/2.5.0 +Name: walkdir +Version: 2.5.0 +Origin: https://github.com/BurntSushi/walkdir +License: MIT +Copyright: Copyright (c) 2015 Andrew Gallant +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/winapi-util/0.1.11 +Name: winapi-util +Version: 0.1.11 +Origin: https://github.com/BurntSushi/winapi-util +License: MIT +Copyright: Copyright (c) 2017 Andrew Gallant +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/windows-link/0.2.1 +Name: windows-link +Version: 0.2.1 +Origin: https://github.com/microsoft/windows-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/windows-sys/0.60.2 +Name: windows-sys +Version: 0.60.2 +Origin: https://github.com/microsoft/windows-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/windows-sys/0.61.2 +Name: windows-sys +Version: 0.61.2 +Origin: https://github.com/microsoft/windows-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/windows-targets/0.53.5 +Name: windows-targets +Version: 0.53.5 +Origin: https://github.com/microsoft/windows-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/windows_x86_64_msvc/0.53.1 +Name: windows_x86_64_msvc +Version: 0.53.1 +Origin: https://github.com/microsoft/windows-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/winnow/0.7.13 +Name: winnow +Version: 0.7.13 +Origin: https://github.com/winnow-rs/winnow +License: MIT +Copyright: Copyright (c) The winnow contributors +Copyright: Copyright (c) 2014-2019 Geoffroy Couprie +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/winnow/1.0.4 +Name: winnow +Version: 1.0.4 +Origin: https://github.com/winnow-rs/winnow +License: MIT +Copyright: Copyright (c) The winnow contributors +Copyright: Copyright (c) 2014-2019 Geoffroy Couprie +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/yansi/1.0.1 +Name: yansi +Version: 1.0.1 +Origin: https://github.com/SergioBenitez/yansi +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/zerocopy/0.8.63 +Name: zerocopy +Version: 0.8.63 +Origin: https://github.com/google/zerocopy +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/zlib-rs/0.6.8 +Name: zlib-rs +Version: 0.6.8 +Origin: https://github.com/trifectatechfoundation/zlib-rs +License: Zlib +Copyright: (C) 2024 Trifecta Tech Foundation +Copyright: Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler +License-File: ../Open-Source-Notices/zlib-license.txt + +Dependency: crates.io/zmij/1.0.23 +Name: zmij +Version: 1.0.23 +Origin: https://github.com/dtolnay/zmij +License: MIT +Copyright: Copyright (c) David Tolnay +Copyright: Copyright (c) 2025 Victor Zverovich +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/zstd-safe/8.1.0 +Name: zstd-safe +Version: 8.1.0 +Origin: https://github.com/gyscos/zstd-rs +License: BSD-3-Clause +Copyright: Copyright (c) 2026, Alexandre Bury +License-File: ../Open-Source-Notices/bsd-3-clause.txt + +Dependency: crates.io/zstd-sys/2.1.1+zstd.1.5.7 +Name: zstd-sys +Version: 2.1.1+zstd.1.5.7 +Origin: https://github.com/gyscos/zstd-rs +License: BSD-3-Clause +Copyright: Copyright (c) 2026, Alexandre Bury +Copyright: Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved. +License-File: ../Open-Source-Notices/bsd-3-clause.txt + +Dependency: crates.io/zstd/0.14.2 +Name: zstd +Version: 0.14.2 +Origin: https://github.com/gyscos/zstd-rs +License: BSD-3-Clause +Copyright: Copyright (c) 2026, Alexandre Bury +License-File: ../Open-Source-Notices/bsd-3-clause.txt + +Dependency: rust-std +Name: Rust standard library +Version: 1.101.0 +Origin: https://github.com/rust-lang/rust +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt diff --git a/unified/BUILD.bazel b/unified/BUILD.bazel index deb87951a1cf..072f021f22da 100644 --- a/unified/BUILD.bazel +++ b/unified/BUILD.bazel @@ -1,6 +1,7 @@ load("@rules_pkg//pkg:mappings.bzl", "pkg_filegroup") load("//misc/bazel:os.bzl", "codeql_platform_select") load("//misc/bazel:pkg.bzl", "codeql_pack", "codeql_pkg_files") +load("//misc/bazel:rust_notices.bzl", "rust_notices") package(default_visibility = ["//visibility:public"]) @@ -34,6 +35,7 @@ codeql_pkg_files( name = "codeql-extractor-yml", srcs = [ "codeql-extractor.yml", + ":checked-notices", "//:LICENSE", ], strip_prefix = None, @@ -48,6 +50,11 @@ codeql_pkg_files( prefix = "{CODEQL_PLATFORM}", ) +rust_notices( + components = [":extractor-arch"], + extras = "notices-extras.json", +) + pkg_filegroup( name = "tools", srcs = [ diff --git a/unified/NOTICES b/unified/NOTICES new file mode 100644 index 000000000000..0bbb384c6260 --- /dev/null +++ b/unified/NOTICES @@ -0,0 +1,597 @@ +Generated file; regenerate with the extractor's notices script. +Legal texts are provided in the CLI's Open-Source-Notices directory. +Extractor-only archives require that shared directory. + +Dependency: crates.io/adler2/2.0.1 +Name: adler2 +Version: 2.0.1 +Origin: https://github.com/oyvindln/adler2 +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/aho-corasick/1.1.5 +Name: aho-corasick +Version: 1.1.5 +Origin: https://github.com/BurntSushi/aho-corasick +License: MIT +Copyright: Copyright (c) 2015 Andrew Gallant +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/allocator-api2/0.2.21 +Name: allocator-api2 +Version: 0.2.21 +Origin: https://github.com/zakarumych/allocator-api2 +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstream/1.0.0 +Name: anstream +Version: 1.0.0 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstyle-parse/1.0.0 +Name: anstyle-parse +Version: 1.0.0 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstyle-query/1.1.5 +Name: anstyle-query +Version: 1.1.5 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/anstyle/1.0.14 +Name: anstyle +Version: 1.0.14 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/bstr/1.12.1 +Name: bstr +Version: 1.12.1 +Origin: https://github.com/BurntSushi/bstr +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/cfg-if/1.0.4 +Name: cfg-if +Version: 1.0.4 +Origin: https://github.com/rust-lang/cfg-if +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/chrono/0.4.45 +Name: chrono +Version: 0.4.45 +Origin: https://github.com/chronotope/chrono +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/clap/4.6.7 +Name: clap +Version: 4.6.7 +Origin: https://github.com/clap-rs/clap +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/clap_builder/4.6.7 +Name: clap_builder +Version: 4.6.7 +Origin: https://github.com/clap-rs/clap +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/clap_lex/1.1.1 +Name: clap_lex +Version: 1.1.1 +Origin: https://github.com/clap-rs/clap +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/colorchoice/1.0.5 +Name: colorchoice +Version: 1.0.5 +Origin: https://github.com/rust-cli/anstyle.git +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/core-foundation-sys/0.8.7 +Name: core-foundation-sys +Version: 0.8.7 +Origin: https://github.com/servo/core-foundation-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/crc32fast/1.5.4 +Name: crc32fast +Version: 1.5.4 +Origin: https://github.com/srijs/rust-crc32fast +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/crossbeam-deque/0.8.8 +Name: crossbeam-deque +Version: 0.8.8 +Origin: https://github.com/crossbeam-rs/crossbeam +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/crossbeam-epoch/0.9.21 +Name: crossbeam-epoch +Version: 0.9.21 +Origin: https://github.com/crossbeam-rs/crossbeam +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/crossbeam-utils/0.8.23 +Name: crossbeam-utils +Version: 0.8.23 +Origin: https://github.com/crossbeam-rs/crossbeam +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/deranged/0.5.8 +Name: deranged +Version: 0.5.8 +Origin: https://github.com/jhpratt/deranged +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/either/1.19.0 +Name: either +Version: 1.19.0 +Origin: https://github.com/rayon-rs/either +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/equivalent/1.0.2 +Name: equivalent +Version: 1.0.2 +Origin: https://github.com/indexmap-rs/equivalent +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/flate2/1.1.9 +Name: flate2 +Version: 1.1.9 +Origin: https://github.com/rust-lang/flate2-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/foldhash/0.2.0 +Name: foldhash +Version: 0.2.0 +Origin: https://github.com/orlp/foldhash +License: Zlib +Copyright: Copyright (c) 2024 Orson Peters +License-File: ../Open-Source-Notices/zlib-license.txt + +Dependency: crates.io/globset/0.4.18 +Name: globset +Version: 0.4.18 +Origin: https://github.com/BurntSushi/ripgrep/tree/master/crates/globset +License: MIT +Copyright: Copyright (c) 2015 Andrew Gallant +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/hashbrown/0.17.1 +Name: hashbrown +Version: 0.17.1 +Origin: https://github.com/rust-lang/hashbrown +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/iana-time-zone/0.1.65 +Name: iana-time-zone +Version: 0.1.65 +Origin: https://github.com/strawlab/iana-time-zone +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/indexmap/2.14.2 +Name: indexmap +Version: 2.14.2 +Origin: https://github.com/indexmap-rs/indexmap +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/is_terminal_polyfill/1.70.2 +Name: is_terminal_polyfill +Version: 1.70.2 +Origin: https://github.com/polyfill-rs/is_terminal_polyfill +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/itoa/1.0.18 +Name: itoa +Version: 1.0.18 +Origin: https://github.com/dtolnay/itoa +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/lazy_static/1.5.1 +Name: lazy_static +Version: 1.5.1 +Origin: https://github.com/rust-lang-nursery/lazy-static.rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/libc/0.2.189 +Name: libc +Version: 0.2.189 +Origin: https://github.com/rust-lang/libc +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/log/0.4.34 +Name: log +Version: 0.4.34 +Origin: https://github.com/rust-lang/log +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/matchers/0.2.0 +Name: matchers +Version: 0.2.0 +Origin: https://github.com/hawkw/matchers +License: MIT +Copyright: Copyright (c) 2019 Eliza Weisman +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/memchr/2.8.3 +Name: memchr +Version: 2.8.3 +Origin: https://github.com/BurntSushi/memchr +License: MIT +Copyright: Copyright (c) 2015 Andrew Gallant +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/miniz_oxide/0.8.9 +Name: miniz_oxide +Version: 0.8.9 +Origin: https://github.com/Frommi/miniz_oxide/tree/master/miniz_oxide +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/nu-ansi-term/0.50.3 +Name: nu-ansi-term +Version: 0.50.3 +Origin: https://github.com/nushell/nu-ansi-term +License: MIT +Copyright: Copyright (c) 2014 Benjamin Sago +Copyright: Copyright (c) 2021-2022 The Nushell Project Developers +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/num-conv/0.2.2 +Name: num-conv +Version: 0.2.2 +Origin: https://github.com/jhpratt/num-conv +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/num-traits/0.2.19 +Name: num-traits +Version: 0.2.19 +Origin: https://github.com/rust-num/num-traits +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/num_cpus/1.17.0 +Name: num_cpus +Version: 1.17.0 +Origin: https://github.com/seanmonstar/num_cpus +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/num_threads/0.1.7 +Name: num_threads +Version: 0.1.7 +Origin: https://github.com/jhpratt/num_threads +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/once_cell/1.21.4 +Name: once_cell +Version: 1.21.4 +Origin: https://github.com/matklad/once_cell +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/pin-project-lite/0.2.17 +Name: pin-project-lite +Version: 0.2.17 +Origin: https://github.com/taiki-e/pin-project-lite +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/powerfmt/0.2.0 +Name: powerfmt +Version: 0.2.0 +Origin: https://github.com/jhpratt/powerfmt +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/rayon-core/1.13.0 +Name: rayon-core +Version: 1.13.0 +Origin: https://github.com/rayon-rs/rayon +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/rayon/1.12.0 +Name: rayon +Version: 1.12.0 +Origin: https://github.com/rayon-rs/rayon +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/regex-automata/0.4.18 +Name: regex-automata +Version: 0.4.18 +Origin: https://github.com/rust-lang/regex +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/regex-syntax/0.8.11 +Name: regex-syntax +Version: 0.8.11 +Origin: https://github.com/rust-lang/regex +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/regex/1.13.1 +Name: regex +Version: 1.13.1 +Origin: https://github.com/rust-lang/regex +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/ryu/1.0.23 +Name: ryu +Version: 1.0.23 +Origin: https://github.com/dtolnay/ryu +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde/1.0.229 +Name: serde +Version: 1.0.229 +Origin: https://github.com/serde-rs/serde +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde_core/1.0.229 +Name: serde_core +Version: 1.0.229 +Origin: https://github.com/serde-rs/serde +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde_json/1.0.154 +Name: serde_json +Version: 1.0.154 +Origin: https://github.com/serde-rs/json +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/serde_yaml/0.9.34+deprecated +Name: serde_yaml +Version: 0.9.34+deprecated +Origin: https://github.com/dtolnay/serde-yaml +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/sharded-slab/0.1.7 +Name: sharded-slab +Version: 0.1.7 +Origin: https://github.com/hawkw/sharded-slab +License: MIT +Copyright: Copyright (c) 2019 Eliza Weisman +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/simd-adler32/0.3.10 +Name: simd-adler32 +Version: 0.3.10 +Origin: https://github.com/mcountryman/simd-adler32 +License: MIT +Copyright: Copyright (c) [2021] [Marvin Countryman] +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/smallvec/1.16.1 +Name: smallvec +Version: 1.16.1 +Origin: https://github.com/servo/rust-smallvec +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/streaming-iterator/0.1.9 +Name: streaming-iterator +Version: 0.1.9 +Origin: https://github.com/sfackler/streaming-iterator +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/strsim/0.11.1 +Name: strsim +Version: 0.11.1 +Origin: https://github.com/rapidfuzz/strsim-rs +License: MIT +Copyright: Copyright (c) 2015 Danny Guo +Copyright: Copyright (c) 2016 Titus Wormer +Copyright: Copyright (c) 2018 Akash Kurdekar +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/thread_local/1.1.10 +Name: thread_local +Version: 1.1.10 +Origin: https://github.com/Amanieu/thread_local-rs +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/time-core/0.1.9 +Name: time-core +Version: 0.1.9 +Origin: https://github.com/time-rs/time +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/time/0.3.55 +Name: time +Version: 0.3.55 +Origin: https://github.com/time-rs/time +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/tracing-core/0.1.36 +Name: tracing-core +Version: 0.1.36 +Origin: https://github.com/tokio-rs/tracing +License: MIT +Copyright: Copyright (c) 2019 Tokio Contributors +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tracing-log/0.2.0 +Name: tracing-log +Version: 0.2.0 +Origin: https://github.com/tokio-rs/tracing +License: MIT +Copyright: Copyright (c) 2019 Tokio Contributors +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tracing-subscriber/0.3.23 +Name: tracing-subscriber +Version: 0.3.23 +Origin: https://github.com/tokio-rs/tracing +License: MIT +Copyright: Copyright (c) 2019 Tokio Contributors +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tracing/0.1.44 +Name: tracing +Version: 0.1.44 +Origin: https://github.com/tokio-rs/tracing +License: MIT +Copyright: Copyright (c) 2019 Tokio Contributors +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tree-sitter-language/0.1.7 +Name: tree-sitter-language +Version: 0.1.7 +Origin: https://github.com/tree-sitter/tree-sitter +License: MIT +Copyright: Copyright (c) 2018-2024 Max Brunsfeld +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tree-sitter-python/0.25.0 +Name: tree-sitter-python +Version: 0.25.0 +Origin: https://github.com/tree-sitter/tree-sitter-python +License: MIT +Copyright: Copyright (c) 2016 Max Brunsfeld +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tree-sitter-ruby/0.23.1 +Name: tree-sitter-ruby +Version: 0.23.1 +Origin: https://github.com/tree-sitter/tree-sitter-ruby +License: MIT +Copyright: Copyright (c) 2016 Rob Rix +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/tree-sitter/0.26.9 +Name: tree-sitter +Version: 0.26.9 +Origin: https://github.com/tree-sitter/tree-sitter +License: MIT +Copyright: Copyright (c) 2018-2024 Max Brunsfeld +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/unsafe-libyaml/0.2.11 +Name: unsafe-libyaml +Version: 0.2.11 +Origin: https://github.com/dtolnay/unsafe-libyaml +License: MIT +Copyright: Copyright (c) David Tolnay +Copyright: Copyright (c) 2017-2020 Ingy döt Net +Copyright: Copyright (c) 2006-2016 Kirill Simonov +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/utf8parse/0.2.2 +Name: utf8parse +Version: 0.2.2 +Origin: https://github.com/alacritty/vte +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: crates.io/zlib-rs/0.6.8 +Name: zlib-rs +Version: 0.6.8 +Origin: https://github.com/trifectatechfoundation/zlib-rs +License: Zlib +Copyright: (C) 2024 Trifecta Tech Foundation +Copyright: Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler +License-File: ../Open-Source-Notices/zlib-license.txt + +Dependency: crates.io/zmij/1.0.23 +Name: zmij +Version: 1.0.23 +Origin: https://github.com/dtolnay/zmij +License: MIT +Copyright: Copyright (c) David Tolnay +Copyright: Copyright (c) 2025 Victor Zverovich +License-File: ../Open-Source-Notices/mit.txt + +Dependency: crates.io/zstd-safe/8.1.0 +Name: zstd-safe +Version: 8.1.0 +Origin: https://github.com/gyscos/zstd-rs +License: BSD-3-Clause +Copyright: Copyright (c) 2026, Alexandre Bury +License-File: ../Open-Source-Notices/bsd-3-clause.txt + +Dependency: crates.io/zstd-sys/2.1.1+zstd.1.5.7 +Name: zstd-sys +Version: 2.1.1+zstd.1.5.7 +Origin: https://github.com/gyscos/zstd-rs +License: BSD-3-Clause +Copyright: Copyright (c) 2026, Alexandre Bury +Copyright: Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved. +License-File: ../Open-Source-Notices/bsd-3-clause.txt + +Dependency: crates.io/zstd/0.14.2 +Name: zstd +Version: 0.14.2 +Origin: https://github.com/gyscos/zstd-rs +License: BSD-3-Clause +Copyright: Copyright (c) 2026, Alexandre Bury +License-File: ../Open-Source-Notices/bsd-3-clause.txt + +Dependency: rust-std +Name: Rust standard library +Version: 1.101.0 +Origin: https://github.com/rust-lang/rust +License: Apache-2.0 +License-File: ../Open-Source-Notices/apache-2.0.txt + +Dependency: swift.org/swift-runtime +Name: Swift runtime libraries (Swift standard library, libdispatch and BlocksRuntime) +Version: 6.3.3 +Origin: https://github.com/swiftlang/swift +License: Apache-2.0 WITH Swift-exception +License-File: ../Open-Source-Notices/apache-2.0.txt +License-File: ../Open-Source-Notices/swift-exception.txt + +Dependency: swift.org/swift-syntax +Name: swift-syntax +Version: 604.0.0 +Origin: https://github.com/swiftlang/swift-syntax +License: Apache-2.0 WITH Swift-exception +Copyright: Copyright (c) 2014 - 2024 Apple Inc. and the Swift project authors +License-File: ../Open-Source-Notices/apache-2.0.txt +License-File: ../Open-Source-Notices/swift-exception.txt diff --git a/unified/notices-extras.json b/unified/notices-extras.json new file mode 100644 index 000000000000..49eff8fa4f24 --- /dev/null +++ b/unified/notices-extras.json @@ -0,0 +1,22 @@ +{ + "swift.org/swift-runtime": { + "name": "Swift runtime libraries (Swift standard library, libdispatch and BlocksRuntime)", + "version": "6.3.3", + "origin": "https://github.com/swiftlang/swift", + "license": "Apache-2.0 WITH Swift-exception", + "license_files": ["apache-2.0.txt", "swift-exception.txt"], + "covers": [ + "//unified/swift-syntax-rs:static_runtime_group_end", + "//unified/swift-syntax-rs:static_runtime_group_start" + ] + }, + "swift.org/swift-syntax": { + "name": "swift-syntax", + "version": "604.0.0", + "origin": "https://github.com/swiftlang/swift-syntax", + "license": "Apache-2.0 WITH Swift-exception", + "license_files": ["apache-2.0.txt", "swift-exception.txt"], + "copyright": ["Copyright (c) 2014 - 2024 Apple Inc. and the Swift project authors"], + "covers": ["//unified/swift-syntax-rs:swift_syntax_ffi"] + } +}