Skip to content
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

Fix issues with OpenSCAP policy #18189

Merged
merged 2 commits into from
Nov 13, 2018
Merged

Conversation

lfu
Copy link
Member

@lfu lfu commented Nov 12, 2018

Fix the name and description of OpenSCAP policy.
Add containerimage_scan_abort event.

Blocks ManageIQ/manageiq-providers-kubernetes#303.

https://bugzilla.redhat.com/show_bug.cgi?id=1499161

@miq-bot assign @gmcculloug
@miq-bot add_label bug, hammer/yes

@lfu lfu changed the title Fix issues with O Fix issues with OenSCAP policy Nov 12, 2018
@miq-bot
Copy link
Member

miq-bot commented Nov 12, 2018

Checked commits lfu/manageiq@25460e7~...5b674f6 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. 🍪

@lfu
Copy link
Member Author

lfu commented Nov 12, 2018

cc @moolitayer @cben

@mkanoor mkanoor changed the title Fix issues with OenSCAP policy Fix issues with OpenSCAP policy Nov 12, 2018
Copy link
Contributor

@cben cben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, this was a long-standing problem.

Corner case to consider: some users copy this policy to customize it (the docs suggest how to do it). In this case the policy they actually run won't be affected by the .yml seed.
But all they'd miss is the condition text fix; the functional fix is in ManageIQ/manageiq-providers-kubernetes#303 NOT raising scan complete event when it failed, which will affect them just the same 👍

- name: if container image has high severity openscap rule results
description: Has high severity OpenSCAP rule results
- name: if container image has no high severity failure in openscap rule results
description: No high severity failure in OpenSCAP rule results
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
I tried to find history why test was opposite to reality but got lost in the double-negative you untangled in https://github.com/ManageIQ/manageiq/pull/16213/files#diff-1cc86ebb35ea7f32ab4c185735cd3612 ... 🙇‍♂️
Once we had "annotate" action only on scan finding high severity issues; then we expanded to annotating both outcomes and I guess we forgot to update text then...

Copy link
Member

@gmcculloug gmcculloug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice Job on this @lfu. Thanks

@gmcculloug gmcculloug merged commit 22baeb0 into ManageIQ:master Nov 13, 2018
@gmcculloug gmcculloug added this to the Sprint 99 Ending Nov 19, 2018 milestone Nov 13, 2018
simaishi pushed a commit that referenced this pull request Nov 13, 2018
@simaishi
Copy link
Contributor

Hammer backport details:

$ git log -1
commit 467ee8ee30e9f096fa65987b25e630b6aa1d3e6b
Author: Greg McCullough <[email protected]>
Date:   Mon Nov 12 21:26:57 2018 -0500

    Merge pull request #18189 from lfu/openscap_1499161
    
    Fix issues with OpenSCAP policy
    
    (cherry picked from commit 22baeb0722ef50b69b350f63c8ff6289c43f61d6)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1499161

@lfu lfu deleted the openscap_1499161 branch July 29, 2019 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants