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

ODC-7422: Add SBOM link and signed badge in PLR details page #13314

Merged
merged 2 commits into from Nov 11, 2023

Conversation

karthikjeeyar
Copy link
Contributor

Fixes:

https://issues.redhat.com/browse/ODC-7422

Analysis / Root cause:

UI should surface SBOM information and command to download the sbom. Signed pipelineruns should show the badge next to pipelinerun details page.

Solution Description:

Use taskrun's results to fetch the SBOM information and use the chain's annotation to show the signed badge.

Screen shots / Gifs for design review:

image


Tooltip on badge hover:

Screenshot 2023-11-08 at 3 39 06 PM

Test setup:

  1. Install openshift pipelines and create the resources listed in this gist
  2. Visit the pipelinerun detail page

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

@openshift-ci openshift-ci bot added the component/pipelines Related to pipelines-plugin label Nov 8, 2023
@karthikjeeyar
Copy link
Contributor Author

/cc @MariaLeonova @jeff-phillips-18 @vikram-raj

@openshift-ci openshift-ci bot added kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 8, 2023
Copy link
Member

@jerolimov jerolimov left a comment

Choose a reason for hiding this comment

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

Lgtm! Just some missed i18n strings:

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

Based on https://gist.github.com/karthikjeeyar/d9fe4d12fbbc1d01273c8540b5504d87#file-cve_scan_output_format-yaml-L7, should task.results.format be that generic (application/json) ? Because it's not like we are taking any application/json content, but that json content also need to "comply" to our "contract".
I think that PR is only about the link and the "signed" badge, so that part has no effect, so it's more for another (upcoming or existing ?) PR.

}

export const getSbomTaskRun = (taskruns: TaskRunKind[]): TaskRunKind =>
taskruns?.find(
Copy link
Member

Choose a reason for hiding this comment

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

We don't read task.results.format anywhere do we ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right @vdemeester, we dont use format annotations in this PR, it just surfaces the SBOM link and reads annotations. The output tab PR (in dynamic plugin) will be using all other annotations like format, type etc

Choose a reason for hiding this comment

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

The CVE summary is also JSON based, is that part of this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

CVE summary on the pipelinerun list page will be on another PR

Copy link
Member

@jerolimov jerolimov left a comment

Choose a reason for hiding this comment

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

As said, it's almost good. Just one thing and one option/question:

@karthikjeeyar
Copy link
Contributor Author

/test e2e-gcp-console

@jerolimov
Copy link
Member

jerolimov commented Nov 9, 2023

@karthikjeeyar to get the jira/valid-reference label 😏

/retitle ODC-7422: Add SBOM link and signed badge in PLR details page

@openshift-ci openshift-ci bot changed the title feat(sbom-plr-details): Add SBOM link and signed badge in PLR details page ODC-7422: Add SBOM link and signed badge in PLR details page Nov 9, 2023
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 9, 2023
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Nov 9, 2023

@karthikjeeyar: This pull request references ODC-7422 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set.

In response to this:

Fixes:

https://issues.redhat.com/browse/ODC-7422

Analysis / Root cause:

UI should surface SBOM information and command to download the sbom. Signed pipelineruns should show the badge next to pipelinerun details page.

Solution Description:

Use taskrun's results to fetch the SBOM information and use the chain's annotation to show the signed badge.

Screen shots / Gifs for design review:

image


Tooltip on badge hover:

Screenshot 2023-11-08 at 3 39 06 PM

Test setup:

  1. Install openshift pipelines and create the resources listed in this gist
  2. Visit the pipelinerun detail page

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jerolimov
Copy link
Member

/retest

Copy link
Member

@jerolimov jerolimov left a comment

Choose a reason for hiding this comment

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

Code lgtm, and it works as expected (as described).

@vdemeester @burrsutter when your comment is resolved we are happy to merge this.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 9, 2023
@jrichter1
Copy link
Contributor

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Nov 10, 2023
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Nov 10, 2023

@karthikjeeyar: This pull request references ODC-7422 which is a valid jira issue.

In response to this:

Fixes:

https://issues.redhat.com/browse/ODC-7422

Analysis / Root cause:

UI should surface SBOM information and command to download the sbom. Signed pipelineruns should show the badge next to pipelinerun details page.

Solution Description:

Use taskrun's results to fetch the SBOM information and use the chain's annotation to show the signed badge.

Screen shots / Gifs for design review:

image


Tooltip on badge hover:

Screenshot 2023-11-08 at 3 39 06 PM

Test setup:

  1. Install openshift pipelines and create the resources listed in this gist
  2. Visit the pipelinerun detail page

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@sanketpathak
Copy link
Contributor

sanketpathak commented Nov 10, 2023

@karthikjeeyar Will you be adding any e2e tests for the change?

@karthikjeeyar
Copy link
Contributor Author

@sanketpathak I have logged a story to cover e2e tests in separate PR

@sanketpathak
Copy link
Contributor

/retest

@jerolimov
Copy link
Member

jerolimov commented Nov 10, 2023

Propagate from the epic

/label docs-approved
/label px-approved

@openshift-ci openshift-ci bot added docs-approved Signifies that Docs has signed off on this PR px-approved Signifies that Product Support has signed off on this PR labels Nov 10, 2023
Copy link
Contributor

openshift-ci bot commented Nov 10, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jerolimov, karthikjeeyar

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

openshift-ci bot commented Nov 11, 2023

@karthikjeeyar: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit ccebf14 into openshift:master Nov 11, 2023
6 checks passed
brunoapimentel added a commit to brunoapimentel/build-definitions that referenced this pull request Mar 12, 2024
This result contains the URL to the OCI artifact that stores the SBOM. It
is meant primarily to be consumed by RHDH¹ and ODC². The URL follows the
format:

registry.io/user/image:sha256-hash.sbom

Note that this URL is not meant to be used with cosign, as it
automatically resolves it when performing a "cosign download sbom
registry.io/user/image:actual-tag".

[1] janus-idp/backstage-plugins#988
[2] openshift/console#13314

Signed-off-by: Bruno Pimentel <bpimente@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. component/pipelines Related to pipelines-plugin docs-approved Signifies that Docs has signed off on this PR jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants