-
Couldn't load subscription status.
- Fork 727
Add support for older CentOS versions (6 & 5) by checking additional release files for information #487
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
Conversation
6ab349d to
60b89d6
Compare
Benchmark Test ResultsBenchmark results from the latest changes vs base branch |
| } | ||
|
|
||
| // example CPE: cpe:/o:centos:linux:6:GA | ||
| var systemReleaseCpeMatcher = regexp.MustCompile(`cpe:\/o:(.*?):.*?:(.*?):.*?$`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good approach, however, syft already has CPE parsing built in that we can leverage https://github.com/anchore/syft/blob/main/syft/pkg/cpe.go#L12 --can we switch to using this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wagoodman Just tried that, but it creates an import cycle :(. Unless i'm doing something horribly wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, you are not doing anything wrong --it looks like pkg depends on distro to support pURLs. This hints at a refactor that we can do later, either striving for pkg to not depend on distro (medium lift-ish) or migrating cpe out of pkg (small lift). We can defer that for now.
Can you leave a comment in the code that points out we should use the CPE parser once it is importable? (no code change requested at this point 👍 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment added!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, we can come back and refactor this to use the existing CPE code when there is no longer a cycle (there are multiple hints to migrate CPE related things to a separate package)
…release files for information Signed-off-by: Samuel Dacanay <[email protected]>
60b89d6 to
b05748d
Compare
Fixes #429
Signed-off-by: Samuel Dacanay [email protected]