Skip to content

Conversation

@nehaLohia27
Copy link
Contributor

Signed-off-by: Neha Lohia [email protected]

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 21, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign jimangel after the PR has been reviewed.
You can assign the PR to them by writing /assign @jimangel in a comment when ready.

The full list of commands accepted by this bot can be found 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

@k8s-ci-robot k8s-ci-robot added language/en Issues or PRs related to English language sig/docs Categorizes an issue or PR as relevant to SIG Docs. labels Dec 21, 2021
@nehaLohia27 nehaLohia27 changed the title generate cve issues list using hugo generate cve issues table using hugo Dec 21, 2021
@nehaLohia27
Copy link
Contributor Author

cc @PushkarJ

@sftim sftim marked this pull request as draft December 21, 2021 10:23
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 21, 2021
Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

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

Some feedback / nits

Comment on lines +4 to +6
<th>CVE ID</th>
<th>Summary</th>
<th>Issue Details</th>
Copy link
Contributor

Choose a reason for hiding this comment

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

We should use localizable strings here.

@@ -0,0 +1,18 @@
<table>
Copy link
Contributor

Choose a reason for hiding this comment

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

If we can add a caption, that's helpful for accessibility.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also consider setting a class, eg <table class="security-cves">

<tbody>
{{ range $issues := getJSON "https://gist.githubusercontent.com/nehaLohia27/ffc2c57f0e32ab338d9f2a02b2fc9e7c/raw/431b5527613fca8c4b5bcff3ba1b06d92db47f88/issues" }}
<tr>
<td><a href="{{ .cve_url }}">{{ .cve_id }}</a></td>
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

Suggested change
<td><a href="{{ .cve_url }}">{{ .cve_id }}</a></td>
<td><a href="{{ .cve_url }}">{{ .cve_id | htmlEscape }}</a></td>

or

Suggested change
<td><a href="{{ .cve_url }}">{{ .cve_id }}</a></td>
<td><a href="{{ .cve_url }}" data-cve-id="{{ .cve_id | urlize }}">{{ .cve_id | htmlEscape }}</a></td>

{{ range $issues := getJSON "https://gist.githubusercontent.com/nehaLohia27/ffc2c57f0e32ab338d9f2a02b2fc9e7c/raw/431b5527613fca8c4b5bcff3ba1b06d92db47f88/issues" }}
<tr>
<td><a href="{{ .cve_url }}">{{ .cve_id }}</a></td>
<td>{{ .summary }}</td>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<td>{{ .summary }}</td>
<td>{{ .summary | htmlEscape }}</td>

</tr>
</thead>
<tbody>
{{ range $issues := getJSON "https://gist.githubusercontent.com/nehaLohia27/ffc2c57f0e32ab338d9f2a02b2fc9e7c/raw/431b5527613fca8c4b5bcff3ba1b06d92db47f88/issues" }}
Copy link
Contributor

Choose a reason for hiding this comment

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

For the real piece, where will we fetch the JSON from?

Copy link
Member

@PushkarJ PushkarJ Jan 11, 2022

Choose a reason for hiding this comment

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

@sftim
I have been trying to come up with ideas about where to place this. Would it make sense to create an automated PR workflow like this?

  • Prow job runs periodically, and checks for additions in the vulnerabilities list
  • An automated PR to k/website is created when a new vulnerability is added to the feed
  • It goes through usual reviews and is then merged
  • The docs page then shows up with the new vulnerability (JSON as well as Table)

Since the vulnerabilities are infrequent (handful of them per year) this flow could work and also allow PR process to pick up any mishaps or invalid inserts.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer to use more automation and avoid relying on approver availability.
There's a similar question about a place to put some JSON, for kubernetes/contributor-site#222

So, although I don't know exactly how we usually hook up Prow job output to cloud object storage, there's the start of a pattern and a strong hint that a reusable answer (that uses automation) is worth chasing.

Copy link
Member

Choose a reason for hiding this comment

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

@sftim I agree that cloud object storage will make approver availability a non-issue. But I am worried that the object storage without proper authorization and authentication could be a vector of compromise where the CVE data could be tampered with to deface k8s website or misrepresent the number of CVEs.

Having the data (only when a meaningful delta exists, which is less than 10 times a year so far) go through approvals/reviews would not have such a problem. Perhaps this is an opportunity to use OWNERS file and allow SRC + SIG Security chairs and Tooling Lead (me) to be responsible for making sure this page on k/website, gets refreshed as soon as a new CVE is published.

What do you think? @nehaLohia27 please chime in too if you have any thoughts on this!

Copy link
Contributor Author

@nehaLohia27 nehaLohia27 Jan 19, 2022

Choose a reason for hiding this comment

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

@PushkarJ @sftim what if we avoid using cloud object storage, then where will this json be placed ? I am still trying to understand the automated PR workflow process and how prow works with github integration. how would this PR know where to fetch the json from unless it is explicitly hosted somewhere?

Copy link
Member

Choose a reason for hiding this comment

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

We now have two options to do this discussed in kubernetes/sig-security#32 and kubernetes/sig-security#33

@netlify
Copy link

netlify bot commented Dec 21, 2021

✔️ Deploy Preview for kubernetes-io-main-staging ready!

🔨 Explore the source changes: 8870711

🔍 Inspect the deploy log: https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/61c1a8e8f3670b00079e7db0

😎 Browse the preview: https://deploy-preview-31051--kubernetes-io-main-staging.netlify.app

@sftim
Copy link
Contributor

sftim commented Jan 17, 2022

@nehaLohia27 this might be a stretch to ask but are you familiar with Terraform code? Maybe you can directly get involved with the infrastructure SIG?

@nehaLohia27
Copy link
Contributor Author

@sftim I havent work on terraform earlier. But can take a look . whats the ask ?

@zacharysarah
Copy link
Contributor

@nehaLohia27 👋🏻 This PR has been dormant for 2 months is still marked WIP. Please feel free to /reopen when you're ready to continue.

/close

@k8s-ci-robot
Copy link
Contributor

@zacharysarah: Closed this PR.

In response to this:

@nehaLohia27 👋🏻 This PR has been dormant for 2 months is still marked WIP. Please feel free to /reopen when you're ready to continue.

/close

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.

@nehaLohia27
Copy link
Contributor Author

/reopen

@k8s-ci-robot
Copy link
Contributor

@nehaLohia27: Reopened this PR.

In response to this:

/reopen

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.

@k8s-ci-robot k8s-ci-robot reopened this Mar 15, 2022
@sftim
Copy link
Contributor

sftim commented Mar 15, 2022

We do still want this to happen, and the related KEP is tracked for work.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 13, 2022
@PushkarJ
Copy link
Member

@nehaLohia27 should we open a new PR that supersedes this or should we continue on this one?

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 13, 2022
@nehaLohia27
Copy link
Contributor Author

@PushkarJ I think we can open a new PR.. Once its done will close this one.

@PushkarJ
Copy link
Member

/close
(In favor of #35228)

@k8s-ci-robot
Copy link
Contributor

@PushkarJ: Closed this PR.

In response to this:

/close
(In favor of #35228)

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. language/en Issues or PRs related to English language sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants