Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🛤️ Tracking: Hipcheck against package lock files #958

Open
2 tasks
j-lanson opened this issue Feb 24, 2025 · 0 comments
Open
2 tasks

🛤️ Tracking: Hipcheck against package lock files #958

j-lanson opened this issue Feb 24, 2025 · 0 comments
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.

Comments

@j-lanson
Copy link
Collaborator

j-lanson commented Feb 24, 2025

@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:

  1. 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.

  2. We would want to cache Hipcheck output in HC_CACHE, where the key is (target, policy_hash) (also maybe policy_path) and the value is (JSON report). The only problem with this is that changes to sub-config files like Binary.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 new hc 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 for TargetSeedKind -> TargetSeed so it produces an Iterator of targets that can be applied to a Session in serial

@j-lanson j-lanson added type: enhancement New feature or request status: needs-rfd This topic is big enough to require an RFD. type: ui UI-related changes that should get heightened review. product: hc Relates to the core "hc" binary labels Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
Status: No status
Development

No branches or pull requests

1 participant