mitre / hipcheck

Automatically assess and score software repositories for supply chain risk.
https://mitre.github.io/hipcheck/
Apache License 2.0
80 stars 6 forks source link

fix: handling of plugin entrypoint string #626

Closed j-lanson closed 1 week ago

j-lanson commented 1 week ago

The existing code treated the entrypoint string as a PathBuf, when in reality it could be a cmdline string with spaces and arguments.

This PR updates the handling to reflect this, and also modifies the retrieve_local_plugin() behavior to only copy the plugin entrypoint binary if it is a path. For instance, if the entrypoint started as docker ..., we wouldn't copy the docker binary because does not exist as a path.

Also updated the warning in start_plugin() to warn if the binary component of entrypoint cannot be found with which.