The function fetchPackageDependencies() returns a map with values of type PackageInfo. Every package info contains references to other PackageInfo instances in the form of fingerprints, i.e. we have a flat data structure the resembles a (circular) dependency graph.
Having a function that generates a graph for the terminal serves at least two purposes:
- Create a complete graph as the result of calling
zat --graph, e.g., zat --graph --terminal.
- Create a tree for a single package leaf that is part of the output when running
zat --audit
zat audit example:
~/Dev/PassKeeZ$ zat --audit
Scanning build.zig.zon for vulnerabilities (8 package dependencies)
Package: zbor
Version: 0.17.0
Title: This is the first advisory published to zig-sec/advisory-db.
Date: 2025-03-16
ID: ZIGSEC-2025-0001
Solution: Don't worry! But you should upgrade anyway as a new zbor release is available.
Dependency tree: <
keylib 0.6.1 < THIS IS NEW!
└── zbor 0.17.0 <
error: 1 vulnerability found!
The function
fetchPackageDependencies()returns a map with values of typePackageInfo. Every package info contains references to otherPackageInfoinstances in the form of fingerprints, i.e. we have a flat data structure the resembles a (circular) dependency graph.Having a function that generates a graph for the terminal serves at least two purposes:
zat --graph, e.g.,zat --graph --terminal.zat --auditzat audit example: