kubernetes-sigs / bom

A utility to generate SPDX-compliant Bill of Materials manifests
https://kubernetes-sigs.github.io/bom/
Apache License 2.0
329 stars 48 forks source link

Refactor osinfo Container Scanner #329

Closed micahhausler closed 1 year ago

micahhausler commented 1 year ago

This change starts to move individual OS type logic out to individual implementations and files.

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

This change will make it easier to write and test new OS types for bom generate --scan-images

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

I tried to keep the osinfo package API as close to the same as possible. I made the containerScanner and layerScanner interfaces and their implementations internal to the package as they're not currently used externally.

Does this PR introduce a user-facing change?

NONE
micahhausler commented 1 year ago

/remove-label do-not-merge/hold

k8s-ci-robot commented 1 year ago

@micahhausler: The label(s) /remove-label do-not-merge/hold cannot be applied. These labels are supported: api-review, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, team/katacoda, refactor. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?

In response to [this](https://github.com/kubernetes-sigs/bom/pull/329#issuecomment-1701424096): >/remove-label do-not-merge/hold Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
micahhausler commented 1 year ago

/remove-label hold

k8s-ci-robot commented 1 year ago

@micahhausler: The label(s) /remove-label hold cannot be applied. These labels are supported: api-review, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, team/katacoda, refactor. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?

In response to [this](https://github.com/kubernetes-sigs/bom/pull/329#issuecomment-1701424498): >/remove-label hold Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
puerco commented 1 year ago

Thanks @micahhausler ! It needed a refactor badly, it grew to the current Frankenstein slowly over the years and I had my eye on it for a while.

/lgtm /approve /hold cancel

k8s-ci-robot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cpanato, micahhausler, puerco, saschagrunert

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/bom/blob/main/OWNERS)~~ [cpanato,puerco,saschagrunert] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment