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

Pluggable Scanner API schema changes to support enhanced reporting schema #4

Merged
merged 10 commits into from
Jan 7, 2021

Conversation

prahaladdarkin
Copy link
Collaborator

Description
An enhanced common vulnerability reporting schema for container images in a registry has been proposed as per pull request here

The new schema proposes to add the following new fields to the vulnerability data information

  • CVE3Score
  • CVE2Score
  • CVSS3Vector
  • CVSS2Vector
  • VendorAttributes
    Scanner implementations can opt to send information corresponding to the above attributes for vulnerability items depending on whether they support collecting/deriving data for these attributes.

The pluggable scanner schema is also hence required to be modified in order to support sending these optional fields. The following changes are proposed in this Pull Request

  • Introduce a new MIME type application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.1 for the enhanced version of the VulnerabilityItem schema
  • Increment the minor version of the pluggable scanner API to 1.1
  • A new API route is introduced api/1_1
  • The VulnerabilityItem schema is now updated to expose these additional attributes

Copy link
Contributor

@danielpacak danielpacak left a comment

Choose a reason for hiding this comment

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

Hey @prahaladdarkin ! Good job. I left a few comments from my side.

api/spec/scanner-adapter-openapi-v1.1.yaml Outdated Show resolved Hide resolved
api/spec/scanner-adapter-openapi-v1.1.yaml Outdated Show resolved Hide resolved
api/spec/scanner-adapter-openapi-v1.1.yaml Outdated Show resolved Hide resolved
api/spec/scanner-adapter-openapi-v1.1.yaml Show resolved Hide resolved
api/spec/scanner-adapter-openapi-v1.1.yaml Show resolved Hide resolved
api/spec/scanner-adapter-openapi-v1.1.yaml Outdated Show resolved Hide resolved
@steven-zou
Copy link
Contributor

steven-zou commented Oct 28, 2020

Copy link
Collaborator Author

@prahaladdarkin prahaladdarkin left a comment

Choose a reason for hiding this comment

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

Incorporated review comments

api/spec/scanner-adapter-openapi-v1.1.yaml Outdated Show resolved Hide resolved
api/spec/scanner-adapter-openapi-v1.1.yaml Outdated Show resolved Hide resolved
api/spec/scanner-adapter-openapi-v1.1.yaml Show resolved Hide resolved
api/spec/scanner-adapter-openapi-v1.1.yaml Outdated Show resolved Hide resolved
api/spec/scanner-adapter-openapi-v1.1.yaml Show resolved Hide resolved
api/spec/scanner-adapter-openapi-v1.1.yaml Outdated Show resolved Hide resolved
Copy link
Collaborator Author

@prahaladdarkin prahaladdarkin left a comment

Choose a reason for hiding this comment

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

Incorporated review comment and introduced an array to hold CWE IDs

Copy link
Contributor

@danielpacak danielpacak left a comment

Choose a reason for hiding this comment

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

Hey @prahaladdarkin I just left a few suggestions to keep the spec consistent

api/spec/scanner-adapter-openapi-v1.1.yaml Show resolved Hide resolved
api/spec/scanner-adapter-openapi-v1.1.yaml Outdated Show resolved Hide resolved
api/spec/scanner-adapter-openapi-v1.1.yaml Show resolved Hide resolved
Prahalad Deshpande and others added 2 commits November 11, 2020 08:07
Signed-off-by: Prahalad Deshpande <prahaladd@vmware.com>

Adding signature to commit
Signed-off-by: Prahalad Deshpande <prahaladd@vmware.com>
Signed-off-by: Prahalad Deshpande <prahaladd@vmware.com>

Signing unsigned commits
Signed-off-by: Prahalad Deshpande <prahaladd@vmware.com>
…or CWE_ID. Also renamed CVSS attribute names

Signed-off-by: Prahalad Deshpande <prahaladd@vmware.com>
Signed-off-by: Prahalad Deshpande <prahaladd@vmware.com>
@danielpacak danielpacak marked this pull request as ready for review November 30, 2020 13:33
Copy link
Contributor

@danielpacak danielpacak left a comment

Choose a reason for hiding this comment

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

The CVSS structure looks good to me. I only left the comment that we should deprecate application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0 instead of removing it. Otherwise it's not backward compatible change.

api/spec/scanner-adapter-openapi-v1.1.yaml Show resolved Hide resolved
….vuln.report.harbor+json; version=1.` instead of

removing it

Signed-off-by: Prahalad Deshpande <prahaladd@vmware.com>
Copy link
Collaborator Author

@prahaladdarkin prahaladdarkin left a comment

Choose a reason for hiding this comment

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

Incorporated review comments.

danielpacak
danielpacak previously approved these changes Dec 11, 2020
danielpacak
danielpacak previously approved these changes Dec 18, 2020
Copy link
Contributor

@danielpacak danielpacak left a comment

Choose a reason for hiding this comment

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

lgtm

prahaladdarkin and others added 3 commits December 25, 2020 00:25
Accepting suggestion related to deprecation of Mime Types for Harbor vulnerability report

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>
Signed-off-by: Prahalad Deshpande <prahaladd@vmware.com>
Signed-off-by: Prahalad Deshpande <prahaladd@vmware.com>
Signed-off-by: Prahalad Deshpande <prahaladd@vmware.com>
@heww heww merged commit 78c7451 into goharbor:master Jan 7, 2021
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

Successfully merging this pull request may close these issues.

None yet

4 participants