Git Product home page Git Product logo

Comments (5)

tomrittervg avatar tomrittervg commented on July 19, 2024

Sorry; what packages are you referring to? I'm afraid I don't fully understand what you're trying to do and what the problem is.

from foundation-security-advisories.

Hritik14 avatar Hritik14 commented on July 19, 2024

I would try to clarify.
Let's say we have the following yaml

announced: April 29, 2014
fixed_in:
- Firefox 29
- Firefox ESR 24.5
- Thunderbird 24.5
- Seamonkey 2.26
impact: High

Now, I need to take out the fixed_in packages in a (package name, version) tuple. So, I'll end up with something like

(Firefox, 29)
(Firefox ESR, 24.5)
(Thunderbird, 24.5)
(Seamonkey, 2.26)

I could create the above tuples using

name=" ".join(fixed_in.split(" ")[0:-1])
version=fixed_in.split(" ")[-1]

(name, version)

But here I'm assuming that a version must follow at the end of the package name and would be separated by space. It could be a right assumption but there doesn't exist any validation currently for me to be sure of it.
For example, if there is an entry

fixed_in:
- Firefox-29

then my current code would not be able to figure out the version from the name. I was hoping to have a validation to make sure the package name follows a certain pattern.

Please let me know if it makes sense.

from foundation-security-advisories.

mozfreddyb avatar mozfreddyb commented on July 19, 2024

We treat it as a free fork text field in our own validation schema.
Our generated code uses hardcoded Firefox or Firefox ESR suffixed by the version number. Similar for Firefox for iOS.

All other products are usually copy&paste and manual work - unless @tomrittervg has made local changes to his repo, which aren't on GitHub yet. :)

from foundation-security-advisories.

pmac avatar pmac commented on July 19, 2024

The website also expects it to be in the <product name> <version> format. The code for that is here:

https://github.com/mozilla/bedrock/blob/bd0f50a1c0a7455115cc2bf9eb3ae9027586a024/bedrock/security/models.py#L28-L30

from foundation-security-advisories.

Hritik14 avatar Hritik14 commented on July 19, 2024

from foundation-security-advisories.

Related Issues (17)

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.