Skip to content

Fix npm.py bug - #138

Merged
haikoschol merged 1 commit into
aboutcode-org:developfrom
sbs2001:exp
Dec 22, 2019
Merged

Fix npm.py bug#138
haikoschol merged 1 commit into
aboutcode-org:developfrom
sbs2001:exp

Conversation

@sbs2001

@sbs2001 sbs2001 commented Dec 21, 2019

Copy link
Copy Markdown
Collaborator

Signed-off-by: sbs2001 shivam.sandbhor@gmail.com

Possibly fixes #126

Also implements the following logic and prevents the behaviour given below.

Unaffected version is that version which is in the fixed_version_range or which is absent in the aff_version_range

Before patch:

>>> import npm
>>> z=npm.extract_versions('ldapauth',"<=2.2.4","<0.0.0")
>>> z
(['1.0.0', '1.0.1', '1.0.2', '2.0.0', '2.1.0', '2.2.0', '2.2.1', '2.2.2', '2.2.3', '2.2.4'], [])

After patch:

>>> import npm
>>> z=npm.extract_versions('ldapauth',"<=2.2.4","<0.0.0")
>>> z
(['1.0.0', '1.0.1', '1.0.2', '2.0.0', '2.1.0', '2.2.0', '2.2.1', '2.2.2', '2.2.3', '2.2.4'], ['2.3.0', '2.3.1'])

Here are some details regarding ldapauth package.

Link to ldapauth advisory here (check for id 19)

Comment thread vulnerabilities/scraper/npm.py Outdated
Signed-off-by: sbs2001 <shivam.sandbhor@gmail.com>
@haikoschol
haikoschol merged commit 7426253 into aboutcode-org:develop Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NPM import skips unfixed vulnerabilities

2 participants