This tool generates an accurate, trustworthy inventory of third-party dependencies in the Fuchsia tree. It is designed to assist the vulnerability management program by identifying all external code included in the build or source tree.
The tool identifies dependencies by querying multiple sources of truth:
jiri to identify external repositories checked out in the source tree.Cargo.lock, go.mod, and requirements.txt for language-specific dependencies.third_party directory is considered to be a third party dependency.third_party/boringssl/src/third_party/googletest qualifies as its own dependency, even if it's part of boringssl.Cargo.toml, go.mod, requirements.txt.Before running this script, you must have a configured Fuchsia build environment.
fx set <product>.<board> # e.g., fx set core.x64 fx build
Run the script from the Fuchsia root (or anywhere, it detects the root relative to itself):
python3 src/security/tools/find_deps/find_deps.py
The tool generates a CSV file named deps_report.csv in the current working directory.
Direct(Jiri), Manifest(Cargo), Transitive(Local)).METADATA or README.fuchsia file if found.Direct(Jiri) dependencies).