goharbor / pluggable-scanner-spec Goto Github PK
View Code? Open in Web Editor NEWOpen API spec definition for the scanners that can be plugged into Harbor to do artifact scanning.
License: Apache License 2.0
Open API spec definition for the scanners that can be plugged into Harbor to do artifact scanning.
License: Apache License 2.0
Current only package is defined as the attribute to vulnerability items,
As scanner users, they'd like to know which binary and which layer are impacted by the vulnerability.
Suggest to add two optional attribute to vulnerability item in the spec
"binary": "/harbor/harbor_jobservice",
"layer": {
"digest": "sha256:1cfaf5c6f756207bc4607d40ddd440bd2bfa7ab455b2c3015ccf56d85cd1377b",
"diff_id": "sha256:c2ddc1bc2645ab5d982c60434d8bbc6aecee1bd4e8eee0df7fd08c96df2d58bb"
},
We are working on the OCI support in Harbor 2.0 and we will improve the user experience of artifact scanning in this release.
In Harbor 2.0, the vulnerabilities info of the artifact will display in the portal only when the artifact can be scanned by the scanner, and only scannable artifact can click the Scan
button in the portal.
Harbor will use the consumes_mime_types
of capabilities from scanner metadata to decide whether the artifact supported by the scanner.
Currently, the consumes_mime_types
returns by the scanner always be application/vnd.oci.image.manifest.v1+json
and application/vnd.docker.distribution.manifest.v2+json
. These mime tyeps are the manifest media type of the artifact, and they mean that the scanner support docker image and oci image.
According to the OCI spec the manifest media type of the artifact always application/vnd.oci.image.manifest.v1+json
and application/vnd.oci.image.index.v1+json
. application/vnd.docker.distribution.manifest.v2+json
and application/vnd.docker.distribution.manifest.list.v2+json
are also supported for the backwards and forwards compatible.
The result is that the scanner supports to scan all OCI artifacts includes helm chart
, regular file
and others. This is not true for the scanner. Now in Harbor 2.0 we use a black list to deal this problem, when the type of the artifact in the list, we assert that the artifact is not scannable. It works but what can we do when the scanner support to scan helm chart?
In Harbor 2.0 the manifest media type for helm charts, docker image are application/vnd.oci.image.manifest.v1+json
and application/vnd.docker.distribution.manifest.v2+json
, but their media type are different. The media type of the helm chart is application/vnd.cncf.helm.config.v1+json
and the media type of the docker image is application/vnd.docker.container.image.v1+json
. So I suggest to use the artifact media type as consumes_mime_types
of capabilities for the scanner.
As suggested by @danielpacak here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.