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

container image scan annotation should always write #15013

Closed
aweiteka opened this issue May 5, 2017 · 8 comments
Closed

container image scan annotation should always write #15013

aweiteka opened this issue May 5, 2017 · 8 comments
Assignees

Comments

@aweiteka
Copy link

aweiteka commented May 5, 2017

When this code[1] annotates an image, it should annotate the boolean every time, true or false, not just when true. This enables other tools to know if the scan has passed through policy while providing the same functionality. This would also require an update to the default policy since the action only is triggered on "high" or "critical" result.

cc @enoodle @simon3z

[1]

"images.openshift.io/deny-execution" => "true"

@simon3z
Copy link
Contributor

simon3z commented May 10, 2017

@miq-bot assign enoodle

@simon3z
Copy link
Contributor

simon3z commented May 12, 2017

Let's review and comply with: openshift/openshift-docs#4206

cc @aweiteka @enoodle @pweil-

@aweiteka
Copy link
Author

Let's review and comply with: openshift/openshift-docs#4206

Good point. It is a bit dangerous to assume "ownership" of the deny-execution annotation since it's not namespaced. The proposed annotation will solve this issue much more generally.

@moolitayer
Copy link

moolitayer commented May 17, 2017

I'm trying to understand if there are situations where an image that had a compliance problem will become compliant again. Surely when we have the hash of the image it can not become compliant again?

container_image.full_name
 => "docker.io/openshift/origin-docker-registry@sha256:4b9f2be87f444d2a5edda635cee6791f33bf97d59604307a827ebd0d49a9cde9" 

I'm not sure, are there still cases when we pull the image by name alone?
(cc @enoodle )

@aweiteka
Copy link
Author

I'm trying to understand if there are situations where an image that had a compliance problem will become compliant again.

Right. Once it's not compliant we don't expect it to become compliant again. However, there may be different tools external to OpenShift that have different thresholds or criteria (aka policy) for compliance, thus my namespace comment.

@aweiteka
Copy link
Author

Let's review and comply with: openshift/openshift-docs#4206

PR merged. New issue to track this: #15212

@cben
Copy link
Contributor

cben commented Aug 9, 2017

I'm trying to understand if there are situations where an image that had a compliance problem will become compliant again. Surely when we have the hash of the image it can not become compliant again?

  1. I'd imagine that sometimes a buggy/overbroad vulnerability definition can be relaxed / made more specific?
    And certainly the opposite is possible — a compliant image might become non-compliant with newer definitions.

  2. Whether ManageIQ sets allow/deny depends not only on scan results but also on ManageIQ policies.
    E.g. if I have policy annotating "deny" on Medium+ openscap severity, then I change it to deny on High only, allow otherwise, some images will change deny->allow.

@moolitayer @enoodle IMO when setting deny-execution we better clear allow-execution and vice versa.

@moolitayer
Copy link

moolitayer commented Aug 9, 2017

I'd imagine that sometimes a buggy/overbroad vulnerability definition can be relaxed / made more specific?
And certainly the opposite is possible — a compliant image might become non-compliant with newer definitions.

I found this answer:
#15013 (comment)

I think it is to safest to assume both (also due to your second bullet)

@moolitayer @enoodle IMO when setting deny-execution we better clear allow-execution and vice versa.

I see the discussion on this one moved to the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants