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

Map anchore policy evaluation into "vulnerabilities" to allow showing policy violations in Harbor UI #19

Open
zhill opened this issue Dec 11, 2019 · 7 comments

Comments

@zhill
Copy link
Member

zhill commented Dec 11, 2019

Since Harbor does not yet support more general policy evaluation, the adapter can map an Anchore policy evaluation into a set of virtual vulnerabilities.

Thus, Harbor admins could block images from being pulled by setting the vulnerability policy in Harbor to block on "Critical" vulnerabilities, which could for example, map to "stop" actions in the anchore policy evaluation result.

This requires:

  • Configuration of the policy ID to use in the adapter
  • Mapper from Anchore policy result to "vulnerability" in the Harbor Adapter API
  • Configuration of the Anchore UI endpoint in the adapter, or the host that links should be generated against (API or UI) so that if a Harbor user clicks the vulnerability link it goes to a useful place (Anchore UI's compliance tab for that image?)
@cafeliker
Copy link
Contributor

@zhill when you plan to start to make this feature?

@zhill
Copy link
Member Author

zhill commented Jan 4, 2020

@zhill when you plan to start to make this feature?

Q1 of 2020. I'd like to shoot for completion by end of January, but will depend on available cycles. One thing I'm trying to do first is get a full Golang anchore client to use in both this project and the admission controller before I do much more API work.

@cafeliker
Copy link
Contributor

@zhill did you start working on this?

@cafeliker
Copy link
Contributor

@zhill any update on this?

@zhill
Copy link
Member Author

zhill commented Apr 15, 2020

I have not started working on it but it is still something that I want to see in the adapter. I haven't been able to get time to work on this myself, so if you want to build it I'm happy to review a PR, or @markyjackson-taulia may be able to get to it in the near future as well.

@markjacksonfishing markjacksonfishing self-assigned this Apr 15, 2020
@zhill
Copy link
Member Author

zhill commented Apr 15, 2020

We'll need to have a discussion on how we'll do the mapping because I think this will be a common pattern for us: mapping and Anchore policy evaluation output into a fake vulnerability entry so i'd like to have it be consistent across integrations if at all possible.

@carlbalmer
Copy link

@zhill

Since Harbor does not yet support more general policy evaluation, the adapter can map an Anchore policy evaluation into a set of virtual vulnerabilities.

Do you know if harbor plans to add an interface for "vulnerability-policy-services" in the future?

In the long term that would probably make more sense than a mapping inside the adapter. Not sure if a feature request already exists for this at goharbor/harbor (a quick search did not return any results).

@markjacksonfishing markjacksonfishing removed their assignment May 15, 2020
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

4 participants