goharbor / harbor-scanner-clair

Use Clair as a plug-in vulnerability scanner in the Harbor registry
https://goharbor.io/
Apache License 2.0
34 stars 26 forks source link

refactor: Let harbor use bearer auth to submit scan req #4

Closed heww closed 4 years ago

heww commented 4 years ago
  1. Harbor will support use bearer authorization type when submit scan request, so switch to bearer authorization for this adapter.
  2. Remove the basic authorization support for this adapter.

Signed-off-by: He Weiwei hweiwei@vmware.com

danielpacak commented 4 years ago
  1. Harbor will support use bearer authorization type when submit scan request, so switch to bearer authorization for this adapter.
  2. Remove the basic authorization support for this adapter.

Signed-off-by: He Weiwei hweiwei@vmware.com

LGTM as well, but let's hold on with merging. I did some refactoring as well in #2 where I added unit tests. Also let me know that the master branch on Harbor does support passing Bearer token to the adapter? To make sure that we can e2e test all the time.

codecov-io commented 4 years ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 60.47%. Comparing base (49e120b) to head (c8ff90b). Report is 24 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #4 +/- ## =========================================== + Coverage 50.23% 60.47% +10.24% =========================================== Files 8 7 -1 Lines 432 334 -98 =========================================== - Hits 217 202 -15 + Misses 208 128 -80 + Partials 7 4 -3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.