Giter VIP home page Giter VIP logo

Comments (2)

cerrussell avatar cerrussell commented on June 12, 2024 2

@prabhu I think the version_used is None due to the parse_purl method in vdb.utils. In trying to replicate this issue, I am noticing that if the purl is used to set fields and it is malformed or incomplete, there is no default value to fall back on.

Under normal circumstances, a dictionary with a length of 6 is returned from parse_purl. In this example, the first attempt to set field values fails, and we parse the string again but only set namespace.

Example:

input purl string: 'pkg:swid/{AppUp.IntelGraphicsExperience_1.100.5185.0_x64__8j3eq9eme6ctt?ms-resource-//AppUp.IntelGraphicsExperience/Resources/System_Item_Title_IntelGraphicsControlPanel'

returns: {'namespace': 'Resources'} when it should also have entries for type, name, version, qualifiers, subpath.

result: The program subsequently errors out when name is assigned a value of None and we then try to call name.lower(). Since we wouldn't call lower() on version,, we can end up with None for versions in vex files as the program will not error out.

I'll make changes to set a default value of "" to avoid this eventuality, and see if there are any improvements I can make to on reparsing the data.

from dep-scan.

prabhu avatar prabhu commented on June 12, 2024

AppThreat/vulnerability-db#67

from dep-scan.

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.