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

CVE feed should update in near real time #43968

Open
Tracked by #1
enj opened this issue Nov 16, 2023 · 20 comments
Open
Tracked by #1

CVE feed should update in near real time #43968

enj opened this issue Nov 16, 2023 · 20 comments
Assignees
Labels
area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes kind/feature Categorizes issue or PR as related to a new feature. language/en Issues or PRs related to English language priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. sig/docs Categorizes an issue or PR as relevant to SIG Docs. sig/security Categorizes an issue or PR as relevant to SIG Security. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@enj
Copy link
Member

enj commented Nov 16, 2023

As a follow up to kubernetes/sig-security#106, the Kube website should be re-built more often or automatically triggered so that when a CVE issue is added to the feed, it shows up on the website quickly.

cc @kubernetes/security-response-committee @kubernetes/sig-security @PushkarJ

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 16, 2023
@ericsmalling
Copy link
Contributor

ericsmalling commented Nov 16, 2023

Is it possible to have the table on the page dynamically rendered using the live JSON feed?

... maybe with a fallback to a static copy if the live version is not available

@justankiit
Copy link

/language en
/kind feature

@k8s-ci-robot k8s-ci-robot added language/en Issues or PRs related to English language kind/feature Categorizes issue or PR as related to a new feature. labels Nov 17, 2023
@sftim
Copy link
Contributor

sftim commented Nov 18, 2023

/area web-development

@k8s-ci-robot k8s-ci-robot added the area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes label Nov 18, 2023
@sftim
Copy link
Contributor

sftim commented Nov 18, 2023

/sig docs security

@k8s-ci-robot k8s-ci-robot added sig/docs Categorizes an issue or PR as relevant to SIG Docs. sig/security Categorizes an issue or PR as relevant to SIG Security. labels Nov 18, 2023
@sftim
Copy link
Contributor

sftim commented Nov 18, 2023

SIG Security, what priority should this have?

@PushkarJ
Copy link
Member

/priority important-soon

@k8s-ci-robot k8s-ci-robot added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Nov 20, 2023
@sftim
Copy link
Contributor

sftim commented Nov 21, 2023

The work here includes analyzing what a solution is likely to look like, as well as the implementation of that solution.

It's OK to ask questions if you are not sure what extra things you might need to learn in order to contribute.

@ahmedavid
Copy link
Contributor

ahmedavid commented Nov 24, 2023

Hello Team, I am new in open source but I have good experience in web dev and devops. I would like to jump in with this one. How can I get started?

@ahmedavid
Copy link
Contributor

/assign

@sftim
Copy link
Contributor

sftim commented Nov 24, 2023

Hi @ahmedavid

Would you like to outline the approach you have in mind for these improvements? Also, do you have any learning areas you would like to ask for advice on?

@sftim
Copy link
Contributor

sftim commented Nov 24, 2023

To anyone: if you're new to this, you could outline what research (eg looking at code and pull requests) you have already done.

@ahmedavid
Copy link
Contributor

ahmedavid commented Nov 24, 2023

Hi @ahmedavid

Would you like to outline the approach you have in mind for these improvements? Also, do you have any learning areas you would like to ask for advice on?

Yes, I implemented working prototype on my local machine.

  1. I inserted <script> tags in cve-feed.html (Maybe this is not the best approach but it works)
  2. I read and cache current content of the table in a variable
  3. I set up setInterval to send http request to json url every 5 seconds.
  4. Then construct html string that needs to replace table content
  5. Finally I replace table content
  6. If error occurs I put back cached content from step 2

I created branch on my forked repository and made the first commit. You can see implementation there.
Can I create PR?
If yes please point me to PR template I can reference.

@sftim
Copy link
Contributor

sftim commented Nov 24, 2023

You are welcome to make a pull request @ahmedavid . There is a PR template in the repository that GitHub will ask you to fill in. You will also need to sign the contributor license agreement.

@sftim
Copy link
Contributor

sftim commented Nov 24, 2023

I set up setInterval to send http request to json url every 5 seconds.

That is too frequent I think. Try requesting updates no more than once every 60 seconds, and make them conditional if at all possible.


This is only part of the work. There is also a step to make sure that the feed (the thing you're fetching) is generated more often.

@ahmedavid
Copy link
Contributor

ahmedavid commented Nov 24, 2023

I set up setInterval to send http request to json url every 5 seconds.

That is too frequent I think. Try requesting updates no more than once every 60 seconds, and make them conditional if at all possible.

This is only part of the work. There is also a step to make sure that the feed (the thing you're fetching) is generated more often.

Ok I can set 60 sec no problem. I am not sure what you mean by conditional
Edit: I should read the article, duh :). Nevermind

I am not sure how to generate more often at source . Pointers are welcome

@sftim
Copy link
Contributor

sftim commented Nov 27, 2023

Also relevant to kubernetes/sig-security#1

@PushkarJ
Copy link
Member

PushkarJ commented Dec 6, 2023

Attempts to fix this in this PR: #44074

@k8s-triage-robot
Copy link

This issue is labeled with priority/important-soon but has not been updated in over 90 days, and should be re-triaged.
Important-soon issues must be staffed and worked on either currently, or very soon, ideally in time for the next release.

You can:

  • Confirm that this issue is still relevant with /triage accepted (org members only)
  • Deprioritize it with /priority important-longterm or /priority backlog
  • Close this issue with /close

For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/

/remove-triage accepted

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. and removed triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Mar 5, 2024
@sftim
Copy link
Contributor

sftim commented Mar 5, 2024

/priority important-longterm
/triage accepted

@k8s-ci-robot k8s-ci-robot added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 5, 2024
@sftim
Copy link
Contributor

sftim commented Mar 5, 2024

/remove-priority important-soon

based on this work not having been staffed, really. Feel free to convince us (SIG Docs) to bump it back, we'll definitely be open to that.

@k8s-ci-robot k8s-ci-robot removed the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes kind/feature Categorizes issue or PR as related to a new feature. language/en Issues or PRs related to English language priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. sig/docs Categorizes an issue or PR as relevant to SIG Docs. sig/security Categorizes an issue or PR as relevant to SIG Security. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Development

No branches or pull requests

8 participants