Skip to content

Commit 0e4d61f

Browse files
authored
Merge pull request #968 from nexB/release-30.2.0-prep
Prepare release 30.2.0
2 parents adf83ec + f30cd69 commit 0e4d61f

24 files changed

+129
-68
lines changed

CHANGELOG.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,36 @@ Release notes
22
=============
33

44

5+
6+
Version v30.2.0
7+
----------------
8+
9+
This is a critical bug fix release including features updates.
10+
11+
- We fixed critical performance issues that made the web UI unusable. This include
12+
removing some less interesting redundant details displayed in the web UI for
13+
vulnerabilities.
14+
- We made minor documentation updates.
15+
- We re-enabled support for Arch linux, Debian, and Ubuntu security advisories importers
16+
- We added a new improver for Oval data sources
17+
- We improved Alpine linux and Gitlab security advisories importers
18+
19+
The summary of performance improvements include these fixes:
20+
21+
- Cascade queries from exact to approximate searches to avoid full table scans
22+
in all cases. This is a band-aid for now. The proper solution will likely
23+
require using full text search instead.
24+
- Avoid iceberg queries with "prefetch related" to limit the number of queries
25+
that are needed in the UI
26+
- Do not recreate querysets from scratch but instead allow these to be chained
27+
for simpler and correct code.
28+
- Remove extra details from the vulnerability pacge: each package was further
29+
listing its related vulnerabilities creating an iceberg query.
30+
- Enable the django-debug-toolbar with a setting to easily profile queries on demand
31+
by setting both VULNERABLECODE_DEBUG and VULNERABLECODE_DEBUG_TOOLBAR enviroment
32+
variables.
33+
34+
535
Version v30.1.1
636
----------------
737

docs/source/contributing.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Contributing to VulnerableCode
55

66
Thank you so much for being so interested in contributing to VulnerableCode. We
77
are always on the lookout for enthusiastic contributors like you who can make
8-
our project better, and we're willing to lend a helping hand if you have any
8+
our project better, and we are willing to lend a helping hand if you have any
99
questions or need guidance along the way. That being said, here are a few
1010
resources to help you get started.
1111

@@ -33,13 +33,13 @@ join our community. Below are some examples to get involved:
3333
First Timers
3434
^^^^^^^^^^^^
3535

36-
You are here to help, but you're a new contributor! No worries, we always
36+
You are here to help, but you are a new contributor! No worries, we always
3737
welcome newcomer contributors. We maintain some
3838
`good first issues <https://github.com/nexB/vulnerablecode/labels/good%20first%20issue>`_
3939
and encourage new contributors to work on those issues for a smooth start.
4040

4141
.. tip::
42-
If you're an open-source newbie, make sure to check the extra resources at
42+
If you are an open-source newbie, make sure to check the extra resources at
4343
the bottom of this page to get the hang of the contribution process!
4444

4545
Code Contributions
@@ -75,7 +75,7 @@ Other Ways
7575
^^^^^^^^^^
7676

7777
You want to contribute to other aspects of the VulnerableCode project, and you
78-
can't find what you're looking for! You can always discuss new topics, ask
78+
cannot find what you are looking for! You can always discuss new topics, ask
7979
questions, and interact with us and other community members on
8080
`AboutCode Gitter <https://gitter.im/aboutcode-org/discuss>`_ and `VulnerableCode Gitter <https://gitter.im/aboutcode-org/vulnerablecode>`_
8181

docs/source/index.rst

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1-
VulnerableCode documentation
1+
Welcome to VulnerableCode!
22
=============================
33

4-
Welcome to VulnerableCode! In this documentation you’ll find information on:
4+
*VulnerableCode* provides an open database of software packages that are affected
5+
by known security vulnerabilities aka. *"vulnerable packages"*.
56

6-
- An overview of VulnerableCode
7+
VulnerableCode is also a free and open source software (FOSS) project that
8+
provides the tools to build this open database. The tools handle collecting,
9+
aggregating and correlating these vulnerabilities and relating them to a correct
10+
package version. Our project also supports a public cloud instance of this
11+
database - VulnerableCode.io.
12+
13+
In this documentation you will find information on:
14+
15+
- An overview of VulnerableCode and what you can do with it
716
- Installation instructions
817
- How to make technical contributions to the project and the community
918

@@ -33,6 +42,7 @@ Welcome to VulnerableCode! In this documentation you’ll find information on:
3342
reference_improver_overview
3443
reference_framework_overview
3544
command-line-interface
45+
importers_link
3646

3747
.. toctree::
3848
:maxdepth: 1

docs/source/introduction.rst

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,61 @@
33
VulnerableCode Overview
44
========================
55

6-
VulnerableCode is a FOSS project that provides tools to build a database
7-
of software vulnerabilities and the packages they impact. The tools
8-
handle collecting, aggregating and correlating these vulnerabilities.
9-
Our project also supports a public Cloud instance of this database –
10-
VulnerableCode.io.
6+
*VulnerableCode* provides an open database of software packages that are affected
7+
by known security vulnerabilities aka. *"vulnerable packages"*.
8+
9+
VulnerableCode is also a free and open source software (FOSS) project that
10+
provides the tools to build this open database. The tools handle collecting,
11+
aggregating and correlating these vulnerabilities and relating them to a correct
12+
package version. Our project also supports a public cloud instance of this
13+
database - VulnerableCode.io.
14+
15+
16+
What can I do with VulnerableCode?
17+
------------------------------------
18+
19+
**For security researchers and software developers, VulnerableCode offers a web
20+
UI and a JSON API to efficient find if the FOSS packages and dependencies that
21+
you use may be affected by known vulnerabilities and which version of a package
22+
you should upgrade to to fix this issue.**
23+
24+
25+
- With the web UI, you can search by package using Package URLs or search by
26+
vulnerability like by CVE. From there you can navigate to the package
27+
vulnerabilities and to the vulnerable packages.
28+
29+
- With the JSON API, you can perform package queries using Package URLs or query
30+
by vulnerability id. You can also query by CPEs and vulnerability aliases.
31+
The API provides paginated index and detail endpoints and includes indexes
32+
of vulnerable CPEs and vulnerable Package URLs (purl).
33+
34+
You can also install VulnerableCode locally or use the provided publicly hosted instance,
35+
or host your own installation. You can also contact the VulnerableCode authors and team
36+
for special needs including commercial support.
37+
1138

1239
Why VulnerableCode?
1340
-------------------
1441

15-
Existing vulnerability database solutions are primarily commercial or
16-
proprietary which does not make sense because the data is about FOSS
17-
(Free and Open Source Software).
42+
VulnerableCode provides open correlated data and eventually does provide curated
43+
data. Our approach is to privilege upstream data sources and to merge multiple
44+
vulnerability data sources after comparison and correlation. The vulnerability
45+
data is keyed by Package URL ensuring quick and accurate lookup with minimal
46+
friction. We further continuously validate and refine the collected data for
47+
quality, accuracy and consistency using "improver" jobs.
48+
An example of such improver can validate that a package version reported as
49+
vulnerable effectively exists (several do not exist); Or an improver can
50+
re-evaluate a vulnerable version ranges based on the latest releases of a
51+
package.
52+
53+
The benefits of our approach is that we will eventually provide better, more
54+
accurate vulnerability data, more efficiently related to actual packages scanned
55+
or reported in an SBOM. This should contribute to more efficient vulnerability
56+
management with less noise from false positives.
57+
58+
Furthermore, existing vulnerability database solutions are primarily commercial
59+
or proprietary which does not make sense because the bulk of the vulnerability
60+
data is about FOSS.
1861

1962
The National Vulnerability Database, which is a primary centralized data
2063
source for known vulnerabilities, is not particularly well suited to

docs/source/tutorial_add_new_importer.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ TL;DR
1515
#. Create a new importer subclass inheriting from the ``Importer`` superclass defined in
1616
``vulnerabilites.importer``. It is conventional to end an importer name with *Importer*.
1717
#. Specify the importer license.
18-
#. Implement the ``advisory_data`` method to process the data source you're writing an importer for.
18+
#. Implement the ``advisory_data`` method to process the data source you are
19+
writing an importer for.
1920
#. Add the newly created importer to the importers registry at
2021
``vulnerabilites/importers/__init__.py``
2122

@@ -136,7 +137,9 @@ version management from `univers <https://github.com/nexB/univers>`_.
136137

137138
.. note::
138139

139-
It is possible that the versioning scheme you are targetting has not yet been implemented in the `univers <https://github.com/nexB/univers>`_ library. If this is the case, you'll need to head over there and implement one.
140+
It is possible that the versioning scheme you are targetting has not yet been
141+
implemented in the `univers <https://github.com/nexB/univers>`_ library.
142+
If this is the case, you will need to head over there and implement one.
140143

141144
.. code-block:: python
142145
@@ -235,12 +238,12 @@ Finally, register your importer in the importer registry at
235238
236239
IMPORTERS_REGISTRY = {x.qualified_name: x for x in IMPORTERS_REGISTRY}
237240
238-
Congratulations! You've written your first importer.
241+
Congratulations! You have written your first importer.
239242

240243
Run Your First Importer
241244
^^^^^^^^^^^^^^^^^^^^^^^^^^
242245

243-
If everything went well, you'll see your importer in the list of available importers.
246+
If everything went well, you will see your importer in the list of available importers.
244247

245248
.. code-block:: console
246249
:emphasize-lines: 5
@@ -284,7 +287,7 @@ For more visibility, turn on debug logs in :file:`vulnerablecode/settings.py`.
284287
},
285288
}
286289
287-
Invoke the import command now and you'll see (in a fresh database):
290+
Invoke the import command now and you will see (in a fresh database):
288291

289292
.. code-block:: console
290293

docs/source/tutorial_add_new_improver.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Explore Package Managers (Optional)
7676
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7777

7878
If your Improver depends on the discrete versions of a package, the package managers' VersionAPI
79-
located at :file:`vulnerabilites/package_managers.py` could come in handy. You'll need to
79+
located at :file:`vulnerabilites/package_managers.py` could come in handy. You will need to
8080
instantiate the relevant ``VersionAPI`` in the improver's constructor and use it later in the
8181
implemented methods. See an already implemented improver (NginxBasicImprover) for an example usage.
8282

@@ -184,12 +184,12 @@ Finally, register your improver in the improver registry at
184184
185185
IMPROVERS_REGISTRY = {x.qualified_name: x for x in IMPROVERS_REGISTRY}
186186
187-
Congratulations! You've written your first improver.
187+
Congratulations! You have written your first improver.
188188

189189
Run Your First Improver
190190
^^^^^^^^^^^^^^^^^^^^^^^^^^
191191

192-
If everything went well, you'll see your improver in the list of available improvers.
192+
If everything went well, you will see your improver in the list of available improvers.
193193

194194
.. code-block:: console
195195
:emphasize-lines: 6
@@ -244,7 +244,7 @@ For more visibility, turn on debug logs in :file:`vulnerablecode/settings.py`.
244244
},
245245
}
246246
247-
Invoke the improve command now and you'll see (in a fresh database, after importing):
247+
Invoke the improve command now and you will see (in a fresh database, after importing):
248248

249249
.. code-block:: console
250250

pyproject.toml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,16 @@ addopts = [
4646
"--doctest-modules",
4747
# Ignore the following doctests until these files are migrated to
4848
# import-improve structure
49-
"--ignore=vulnerabilities/importers/alpine_linux.py",
5049
"--ignore=vulnerabilities/importers/apache_httpd.py",
5150
"--ignore=vulnerabilities/importers/apache_kafka.py",
5251
"--ignore=vulnerabilities/importers/apache_tomcat.py",
53-
"--ignore=vulnerabilities/importers/archlinux.py",
54-
"--ignore=vulnerabilities/importers/debian.py",
5552
"--ignore=vulnerabilities/importers/elixir_security.py",
5653
"--ignore=vulnerabilities/importers/gentoo.py",
57-
"--ignore=vulnerabilities/importers/github.py",
5854
"--ignore=vulnerabilities/importers/istio.py",
5955
"--ignore=vulnerabilities/importers/kaybee.py",
6056
"--ignore=vulnerabilities/importers/npm.py",
61-
"--ignore=vulnerabilities/importers/nvd.py",
62-
"--ignore=vulnerabilities/importers/openssl.py",
6357
"--ignore=vulnerabilities/importers/postgresql.py",
6458
"--ignore=vulnerabilities/importers/project_kb_msr2019.py",
65-
"--ignore=vulnerabilities/importers/redhat.py",
6659
"--ignore=vulnerabilities/importers/retiredotnet.py",
6760
"--ignore=vulnerabilities/importers/ruby.py",
6861
"--ignore=vulnerabilities/importers/rust.py",

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = vulnerablecode
3-
version = 30.1.1
3+
version = 30.2.0
44
license = Apache-2.0 AND CC-BY-SA-4.0
55

66
# description must be on ONE line https://github.com/pypa/setuptools/issues/1390

vulnerabilities/importers/alpine_linux.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,13 @@
1515
from typing import Mapping
1616
from urllib.parse import urljoin
1717

18-
import requests
1918
from bs4 import BeautifulSoup
20-
from django.db.models.query import QuerySet
2119
from packageurl import PackageURL
2220
from univers.versions import AlpineLinuxVersion
2321

2422
from vulnerabilities.importer import AdvisoryData
2523
from vulnerabilities.importer import AffectedPackage
2624
from vulnerabilities.importer import Importer
27-
from vulnerabilities.improver import MAX_CONFIDENCE
28-
from vulnerabilities.improver import Improver
29-
from vulnerabilities.improver import Inference
30-
from vulnerabilities.models import Advisory
3125
from vulnerabilities.references import WireSharkReference
3226
from vulnerabilities.references import XsaReference
3327
from vulnerabilities.references import ZbxReference

vulnerabilities/importers/archlinux.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from typing import Iterable
1111
from typing import List
1212
from typing import Mapping
13-
from urllib.request import urlopen
1413

1514
from packageurl import PackageURL
1615
from univers.version_range import ArchLinuxVersionRange

0 commit comments

Comments
 (0)