-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: Add report package, print reports to stdout #40
Conversation
Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
bded591
to
2e28a19
Compare
8e4e3dd
to
544b12c
Compare
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.
Overall, it looks good to me. I think we will need to change how we do some things. But I think we will notice what needs to be improved in future steps on the scanner. Therefore, I think we can merge it and iterate over it during the next steps.
Due some memory usage issues this commit updates the golinter version to solve the problem in some developers environments. Signed-off-by: José Guilherme Vanz <jguilhermevanz@suse.com>
Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
This is needed for PolicyReport.Summary.Skip Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
This is needed as ReportResults.scope point to their namespace. Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
Force-pushed a new version (sorry), with partial history, since I refactored heavily everything. Took the liberty to resolve conversations from the previous review, to try and short the thread. |
Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
Enhance scanner{} with a report.PolicyStore interface. Create policyStore, and fill it when auditing resources. Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
If `--policyServerFQDN` is not empty, query PolicyServers at `https://<FQDN>:3000/audit` useful for out-of-cluster debugging. Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
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.
nice refactoring, I left some comments 👏 👍
Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
Remove `report.go.RInterface`, `store.PolicyReportStore` interface. Move `client.go.Save()` into store.go. Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
I don't get why the unit tests are failing on CI, they pass locally. Will have a look at that next day. |
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.
I left some minor comments
Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
I'm still puzzled on why the unit-tests fail without any error for the report package. They pass locally, and I'm running the same go version. The go env vars also look fine. |
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.
thanks for all the changes, LGTM
Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
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.
Thanks for this docs! Pretty useful!
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! Thanks for the patience! :)
Description
Partial implementation of #36.
feat: Add report package, print reports to stdout
Test
Manual for now.
Example:
output
Additional Information
Tradeoff
Potential improvement
Missing: