-
Notifications
You must be signed in to change notification settings - Fork 14
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
⭐️ add scanner client #270
Conversation
d2e8832
to
4b03d08
Compare
pkg/scanner/scanner.go
Outdated
"net/http" | ||
"time" | ||
|
||
"github.com/pkg/errors" |
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.
could we get rid of this dependency? The repo has been archived and is not maintained. There are other projects that are also actively working on using whatever is available in the standard errors
package and rewrite whatever is not (e.g. Wrap
doesn't exist in the standard pkg).
Some references:
prometheus-operator/prometheus-operator#4682
thanos-io/thanos#5176
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.
perhaps it's good to check if we have this dependency in any of the other projects as well
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.
yeah, we can remove that, that was an auto-import
Thank you for the improvements @joelddiaz, I cannot self-approve, so you have to approve :-) |
pkg/scanner/scanner_test.go
Outdated
result := &ScanResult{ | ||
Ok: true, | ||
WorstScore: &Score{ | ||
Type: uint32(2), |
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.
What's a type 2
? Maybe constify that to make the variable name self-documenting.
c5110d8
to
613f764
Compare
@imilchev this should be good for a review |
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.
LGTM
P.S.: I just checked and there are linting errors in the implementation. Might be better to first merge #279 and then re-base. If first this is merged and then the linting, the run on main
will fail
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
Signed-off-by: Joel Diaz <joel@mondoo.com>
clarify that a '2' is what comes back from a valid scan result Signed-off-by: Joel Diaz <joel@mondoo.com>
613f764
to
57f005b
Compare
Signed-off-by: Joel Diaz <joel@mondoo.com>
add a simple http client for the mondoo scanner