Giter Club home page Giter Club logo

metarepo-cpe-tag's People

Contributors

mrl5 avatar seemantk avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

metarepo-cpe-tag's Issues

[bug] nodejs -> node.js mismatch

in CPE feed recent versions of nodejs programming language are for:

  • vendor: nodejs
  • product: node.js

this can result in false negatives because cpe-tag logic searches for product nodejs

unplug metarepo2json

we dont care about converting metarepo or package to json in this project

it just accepts proper input(s), serialize it and works on it

filter wfn target_sw

{"name": "firefox-bin", "versions": [{"version": "83.0"}]} matches cpe:2.3:a:mozilla:firefox:83.0:*:*:*:*:android:*:*

there should be no match for android (probably only * and linux)

steps to reproduce:

input='{"name": "firefox-bin", "versions": [{"version": "83.0"}]}'
./bin/tag_package_with_cpes.py "$input"

result:

{"name": "firefox-bin", "versions": [{"version": "83.0", "cpes": ["cpe:2.3:a:mozilla:firefox:83.0:*:*:*:*:android:*:*"]}]}

more info:

pop contracts applied only to "boundary" functions

pop contracts are applied only if contracted function is called directly
if it's called by another function that is in the hub contracts are ignored

overview:
this contract will be applied here:

$ pytest >/dev/null; echo $?
0

but will not be applied here:

$ input="/`uuidgen`/`uuidgen`/`uuidgen`" '{"name": "busybox", "versions": [{"version": "1.29.0"}]}'
$ ./bin/tag_package_with_cpes.py --cpe-match-feed $input
[ERROR   ] [:busybox:1.29.0:] gzip: /f739b6e6-dfb5-4f96-ab4f-b043d2cdd900/6f1f86e3-9002-42c0-9d3b-c01962b85d14/3db9fd82-c9a0-408e-8580-1b5e5f86e66a.gz: No such file or directory

use existing tooling

incorporate existing tooling instead of metarepo-to-json

ego query versions $package
eix -nv -x -e $package

script to download/update feed

instead of

mkdir -p ~/feeds/json && cd $_
  wget https://nvd.nist.gov/feeds/json/cpematch/1.0/nvdcpematch-1.0.json.gz &&
  cd -

provide some script that downloads it

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.