🛤️ Tracking: Hipcheck against package lock files #958
Labels
product: hc
Relates to the core "hc" binary
status: needs-rfd
This topic is big enough to require an RFD.
type: enhancement
New feature or request
type: ui
UI-related changes that should get heightened review.
@mchernicoff has identified running Hipcheck as a GitHub action as a use-case of interest. Essentially, a GitHub action would run Hipcheck against all the dependencies in a project passed as a lock file (Cargo.toml / Cargo.lock, package.json, etc.). This has two important differences with how we run Hipcheck currently:
A lock file contains lots of dependencies, it would be very inefficient to start Hipcheck, start and configure plugins, analyze, and tear down for each of those dependencies. Instead, we should refactor Hipcheck so that we can keep our plugins running and start analyzing new targets in a single Session. Additionally, we may want to support multiple Hipcheck instances working off of a single HC_CACHE, so we would need to ensure synchronization between Hipcheck instances when updating caches.
We would want to cache Hipcheck output in HC_CACHE, where the key is
(target, policy_hash)
(also maybepolicy_path
) and the value is(JSON report)
. The only problem with this is that changes to sub-config files likeBinary.kdl
are not captured by hashing the policy file, and we can't "know" which config fields constitute sub-config files. So we may need a CLI flag like--rerun
to force hipcheck to re-run even if there is a cache entry. We may want a newhc cache report
subcommand to delete stale report cache entries as well.To support #1, we'd probably introduce a new
TargetSeedKind
for package files, and alter the API forTargetSeedKind -> TargetSeed
so it produces anIterator
of targets that can be applied to a Session in serialThe text was updated successfully, but these errors were encountered: