sonatype-nexus-community / ahab

ahab is a tool to check for vulnerabilities in your apt, apk, or yum powered operating systems, powered by Sonatype OSS Index.
Apache License 2.0
68 stars 18 forks source link

Issue 29: Deprecate --os #42

Closed deadlysyn closed 4 years ago

deadlysyn commented 4 years ago

Deprecate --os in favor of --package-manager. Minor cleanup along the way.

This pull request makes the following changes:

It relates to the following issue #s:

cc @bhamail / @DarthHater / @zendern

zendern commented 4 years ago

@deadlysyn Overall looks good. Just a few minor questions/tweaks

deadlysyn commented 4 years ago

To help move this forward, I've decoupled the purl format updates. Maybe we can tackle that as a separate PR. Since we're not passing os anymore, apt.go has to hard code Debian while both Alpine and Fedora don't include OS at all. It feels like we should be consistent one way or the other, but that doesn't need decided here.

To avoid strewing os references all over, I just updated the switch to support either --os or --package-manager strings. Seems to work locally, and also updated tests to cover both until the deprecated bits can be fully removed.

zendern commented 4 years ago

To help move this forward, I've decoupled the purl format updates. Maybe we can tackle that as a separate PR. Since we're not passing os anymore, apt.go has to hard code Debian while both Alpine and Fedora don't include OS at all. It feels like we should be consistent one way or the other, but that doesn't need decided here.

To avoid strewing os references all over, I just updated the switch to support either --os or --package-manager strings. Seems to work locally, and also updated tests to cover both until the deprecated bits can be fully removed.

Cool I opened #44 to deal with that then @deadlysyn .