Git Product home page Git Product logo

Comments (12)

PushkarJ avatar PushkarJ commented on July 25, 2024 1

The repository with OSV files is now migrated within k8s-sigs org: https://github.com/kubernetes-sigs/cve-feed-osv

from website.

PushkarJ avatar PushkarJ commented on July 25, 2024

Included this as a feature in beta -> GA work as a graduation criteria.

/triage accepted

from website.

PushkarJ avatar PushkarJ commented on July 25, 2024

Some ideas on how to implement this:

This repo https://github.com/aquasecurity/vuln-list-k8s is being migrated to k-sigs org: kubernetes/org#4873 as a community owned repo. But for the purposes of discussion let's use the repo in its current location.

Step 1: As input to content adapter we get a list of OSV JSON files from Github API: https://api.github.com/repos/aquasecurity/vuln-list-k8s/contents/upstream

Sample output:

  {
    "name": "CVE-2017-1002102.json",
    "path": "upstream/CVE-2017-1002102.json",
    "sha": "fb991a6b68caac15879c2eefebf1a72249d3ccfe",
    "size": 1466,
    "url": "https://api.github.com/repos/aquasecurity/vuln-list-k8s/contents/upstream/CVE-2017-1002102.json?ref=main",
    "html_url": "https://github.com/aquasecurity/vuln-list-k8s/blob/main/upstream/CVE-2017-1002102.json",
    "git_url": "https://api.github.com/repos/aquasecurity/vuln-list-k8s/git/blobs/fb991a6b68caac15879c2eefebf1a72249d3ccfe",
    "download_url": "https://raw.githubusercontent.com/aquasecurity/vuln-list-k8s/main/upstream/CVE-2017-1002102.json",
    "type": "file",
    "_links": {
      "self": "https://api.github.com/repos/aquasecurity/vuln-list-k8s/contents/upstream/CVE-2017-1002102.json?ref=main",
      "git": "https://api.github.com/repos/aquasecurity/vuln-list-k8s/git/blobs/fb991a6b68caac15879c2eefebf1a72249d3ccfe",
      "html": "https://github.com/aquasecurity/vuln-list-k8s/blob/main/upstream/CVE-2017-1002102.json"
    }
  }

Step 2: Iterate each file name with absolute path using the key download_url and create a new dynamic page for each CVE
Step 3: https://kubernetes.io/example/security/CVE-2021-25749.json points to the OSV format json file
Step 4: https://kubernetes.io/example/security/CVE-2021-25749 points to an auto-generated page that can be customized depending on for example whether a CVE is unfixed or not.

from website.

jbiers avatar jbiers commented on July 25, 2024

I'm willing to dig into this this issue if no one else is meant to take it @PushkarJ @sftim

from website.

sftim avatar sftim commented on July 25, 2024

Help is welcome @jbiers!

from website.

sftim avatar sftim commented on July 25, 2024

Step 1: As input to content adapter we get a list of OSV JSON files from Github API: https://api.github.com/repos/aquasecurity/vuln-list-k8s/contents/upstream

It's much easier if the machine readable feed is one file, rather than lots. If there are lots of files, we first need a single file with a list of the individual files to pull.

We can add the OSV data in a follow-up PR.

from website.

sftim avatar sftim commented on July 25, 2024

Also, we'd prefer to avoid needing API tokens for GitHub as part of the site build; it adds extra friction for new contributors.

from website.

sftim avatar sftim commented on July 25, 2024

https://kubernetes.io/example/security/CVE-2021-25749

Shorter URLs are an option too; eg https://k8s.io/security/CVE-2021-25749 can redirect to https://kubernetes.io/example/security/CVE-2021-25749

from website.

jbiers avatar jbiers commented on July 25, 2024

/assign

from website.

jbiers avatar jbiers commented on July 25, 2024

@sftim I have a question regarding the path where the CVE files should be created. Your suggestion was https://kubernetes.io/example/security/CVE-2019-11254, but as I understand currently the examples directory only contains example manifests in the form of yaml files.

My question is if it makes semantic sense to have the CVEs in this path and not somewhere like https://kubernetes.io/docs/reference/issues-security/cves/cve-2017-1002101/ or similar. If done this way, we could simply use the layouts currently used in other documentation pages, while in the /examples/ path a new one would have to be created.

Let me know if I did not make myself clear enough here 😄

from website.

sftim avatar sftim commented on July 25, 2024

Oh, the string example was just an example! You should pick an actual URL path that makes sense to SIG Security.

The directory you use does not not need to exist in the Git source code.

from website.

sftim avatar sftim commented on July 25, 2024

If you find you want a new layout, SIG Docs can help out with that.

from website.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.