Skip to content

Commit 53a618a

Browse files
committed
Merge branch 'main' into fix/insert-advisory-v2-multipleobjectsreturned
Signed-off-by: Aditya kumar singh <143548997+Adityakk9031@users.noreply.github.com>
2 parents 97b2b39 + 94a9c8f commit 53a618a

File tree

222 files changed

+22894
-26483
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+22894
-26483
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
max-parallel: 4
1111
matrix:
12-
python-version: [3.9]
12+
python-version: [3.12]
1313

1414
steps:
1515
- name: Checkout code

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
strategy:
3030
max-parallel: 4
3131
matrix:
32-
python-version: ["3.9", "3.10", "3.11"]
32+
python-version: ["3.12", "3.13"]
3333

3434
steps:
3535
- name: Checkout code
@@ -39,10 +39,10 @@ jobs:
3939
uses: actions/setup-python@v2
4040
with:
4141
python-version: ${{ matrix.python-version }}
42+
4243

4344
- name: Install dependencies
4445
run: make dev envfile
45-
4646
# Disable codestyle checks until we have cleaned up the code
4747
# - name: Validate code format
4848
# run: make check

.github/workflows/pypi-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Set up Python
2929
uses: actions/setup-python@v1
3030
with:
31-
python-version: 3.9
31+
python-version: 3.12
3232

3333
- name: Install pypa/build
3434
run: python -m pip install build --user

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ version: 2
99
build:
1010
os: ubuntu-22.04
1111
tools:
12-
python: "3.11"
12+
python: "3.12"
1313

1414
# Build PDF & ePub
1515
formats:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# See https://github.com/nexB/vulnerablecode for support or download.
77
# See https://aboutcode.org for more information about nexB OSS projects
88

9-
FROM python:3.9
9+
FROM python:3.12
1010

1111
WORKDIR /app
1212

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,13 @@ endif
4949

5050
virtualenv:
5151
@echo "-> Bootstrap the virtualenv with PYTHON_EXE=${PYTHON_EXE}"
52-
@${PYTHON_EXE} ${VIRTUALENV_PYZ} --never-download --no-periodic-update ${VENV}
52+
@${PYTHON_EXE} -m venv ${VENV}
53+
@$(MAKE) upgrade-tools
54+
55+
upgrade-tools:
56+
@echo "-> Upgrade pip / setuptools / wheel (Python 3.12 safe)"
57+
@${VENV}/bin/python -m pip install --upgrade --force-reinstall \
58+
"pip>=24" "setuptools>=69" "wheel>=0.42" packaging
5359

5460
conf: virtualenv
5561
@echo "-> Install dependencies"

README.rst

Lines changed: 54 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,37 @@
1-
===============
1+
==============
22
VulnerableCode
3+
==============
4+
5+
VulnerableCode is a database of software package vulnerabilities with Web UI and API.
6+
7+
Why Use VulnerableCode?
8+
=======================
9+
10+
VulnerableCode provides a Web UI and API to access a database of known software package
11+
vulnerabilities with comprehensive information from upstream and downstream public
12+
sources including packages affected by a vulnerability and packages that fix a
13+
vulnerability.
14+
15+
There is a `public VulnerableCode database <https://public.vulnerablecode.io/>`_
16+
and the project also provides the tools to build your own instance of the database.
17+
18+
Getting Started
319
===============
420

21+
Instructions to get you up and running on your local machine are at `Getting Started <https://vulnerablecode.readthedocs.io/en/stable/>`_
22+
23+
The VulnerableCode documentation also provides:
24+
25+
- prerequisites for installing the software.
26+
- an introduction to the user interface.
27+
- how to use the API.
28+
- tutorials for adding new pipelines to import and improve advisories.
29+
- extensive reference information about VulnerableCode data.
30+
- guidelines for contributing to code development.
31+
32+
Build and tests status
33+
======================
34+
535
|Build Status| |Code License| |Data License| |Python 3.8+| |stability-wip| |Gitter chat|
636

737

@@ -18,11 +48,12 @@ VulnerableCode
1848
:target: https://gitter.im/aboutcode-org/vulnerablecode
1949

2050

21-
VulnerableCode is a free and open database of open source software package
22-
vulnerabilities **because open source software vulnerabilities data and tools
23-
should be free and open source themselves**:
51+
Benefits of VulnerableCode
52+
==========================
2453

25-
we are trying to change this and evolve the status quo in a few other areas!
54+
VulnerableCode is a free and open database of open source software package
55+
vulnerabilities **because open source software vulnerability data and tools
56+
should be free and open source themselves**.
2657

2758
- Vulnerability databases have been **traditionally proprietary** even though they
2859
are mostly about free and open source software.
@@ -31,119 +62,35 @@ we are trying to change this and evolve the status quo in a few other areas!
3162
means a lot of false positive signals that require extensive expert reviews.
3263

3364
- Vulnerability databases are also mostly about vulnerabilities first and software
34-
package second, making it difficult to find if and when a vulnerability applies
35-
to a piece of code. VulnerableCode focus is on software package first where
36-
a Package URL is a key and natural identifier for packages; this is making it
65+
packages second, making it difficult to find if and when a vulnerability applies
66+
to a piece of code. VulnerableCode's focus is on software packages first where
67+
a Package URL (PURL) is a key and natural identifier for packages; this makes it
3768
easier to find a package and whether it is vulnerable.
3869

39-
Package URL themselves were designed first in ScanCode and VulnerableCode
40-
and are now a de-facto standard for vulnerability management and package references.
41-
See https://github.com/package-url/purl-spec
42-
43-
The VulnerableCode project is a FOSS community resource to help improve the
44-
security of the open source software ecosystem and its users at large.
70+
PURLs were designed initially for ScanCode and VulnerableCode. PURL is
71+
now a `standard <https://github.com/package-url/purl-spec>`_ for vulnerability management
72+
and package references.
4573

46-
VulnerableCode consists of a database and the tools to collect, refine and keep
47-
the database current.
48-
49-
50-
.. pull-quote::
51-
**Warning**
52-
53-
VulnerableCode is under active development and is not yet fully
54-
usable.
55-
56-
57-
Read more about VulnerableCode https://vulnerablecode.readthedocs.org/
58-
59-
VulnerableCode tech stack is Python, Django, PostgreSQL, nginx and Docker and
74+
The VulnerableCode tech stack is Python, Django, PostgreSQL, nginx and Docker and
6075
several libraries.
6176

77+
Support
78+
=======
6279

63-
Getting started
64-
===============
65-
66-
Run with Docker
67-
---------------
68-
69-
First install docker, then run
70-
71-
.. code:: bash
72-
73-
git clone https://github.com/nexB/vulnerablecode.git && cd vulnerablecode
74-
make envfile
75-
docker compose build
76-
docker compose up -d
77-
docker compose run vulnerablecode ./manage.py import --list
78-
79-
Then run an importer for nginx advisories (which is small)
80+
If you have a specific problem, suggestion or bug, please submit a
81+
`GitHub issue <https://github.com/aboutcode-org/vulnerablecode/issues>`_.
8082

81-
.. code:: bash
82-
83-
docker compose exec vulnerablecode ./manage.py import nginx_importer
84-
docker compose exec vulnerablecode ./manage.py improve --all
85-
86-
At this point, the VulnerableCode app and API should be up and running with
87-
some data at http://localhost
88-
89-
90-
Populate VulnerableCode database
91-
--------------------------------
92-
93-
VulnerableCode data collection works in two steps: importing data from multiple
94-
sources and then refining and improving how package and software vulnerabilities
95-
are related.
96-
97-
To run all importers and improvers use this
98-
99-
.. code:: bash
100-
101-
./manage.py import --all
102-
103-
.. code:: bash
104-
105-
./manage.py improve --all
106-
107-
108-
Local development installation
109-
------------------------------
110-
111-
On a Debian system, use this
112-
113-
.. code:: bash
114-
115-
sudo apt-get install python3-venv python3-dev postgresql libpq-dev build-essential
116-
git clone https://github.com/nexB/vulnerablecode.git && cd vulnerablecode
117-
make dev envfile postgres
118-
make test
119-
source venv/bin/activate
120-
./manage.py import nginx_importer
121-
./manage.py improve --all
122-
make run
123-
124-
At this point, the VulnerableCode app and API is up at http://127.0.0.1:8001/
83+
For quick questions or socializing, join the AboutCode community discussions on `Slack <https://join.slack.com/t/aboutcode-org/shared_invite/zt-3li3bfs78-mmtKG0Qhv~G2dSlNCZW2pA>`_.
12584

85+
Interested in commercial suppport? Contact the `AboutCode team <mailto:hello@aboutcode.org>`_.
12686

12787
License
128-
========
129-
130-
Copyright (c) nexB Inc. and others. All rights reserved.
131-
132-
VulnerableCode is a trademark of nexB Inc.
133-
134-
SPDX-License-Identifier: Apache-2.0 AND CC-BY-SA-4.0
135-
136-
VulnerableCode software is licensed under the Apache License version 2.0.
137-
138-
VulnerableCode data is licensed collectively under CC-BY-SA-4.0.
139-
140-
See https://www.apache.org/licenses/LICENSE-2.0 for the license text.
141-
142-
See https://creativecommons.org/licenses/by-sa/4.0/legalcode for the license text.
143-
144-
See https://github.com/nexB/vulnerablecode for support or download.
88+
=======
14589

146-
See https://aboutcode.org for more information about nexB OSS projects.
90+
* `Apache-2.0 <apache-2.0.LICENSE>`_ is the overall license.
91+
* `CC-BY-SA-4.0 <cc-by-sa-4.0.LICENSE>`_ applies to reference datasets.
92+
* There are multiple secondary permissive or copyleft licenses (LGPL, MIT,
93+
BSD, GPL 2/3, etc.) for third-party components and test suite code and data.
14794

14895

14996
Acknowledgements, Funding, Support and Sponsoring

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: "3"
22

33
services:
44
db:
5-
image: postgres:13
5+
image: postgres:15
66
command: -c config_file=/etc/postgresql/postgresql.conf
77
env_file:
88
- docker.env

docs/source/contributing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ resources to help you get started.
1717
Do Your Homework
1818
----------------
1919

20-
Before adding a contribution or create a new issue, take a look at the projects
20+
Before adding a contribution or create a new issue, take a look at the project's
2121
`README <https://github.com/aboutcode-org/vulnerablecode>`_, read through our
2222
`documentation <https://vulnerablecode.readthedocs.io/en/latest/>`_,
2323
and browse existing `issues <https://github.com/aboutcode-org/vulnerablecode/issues>`_,
@@ -73,7 +73,7 @@ overlooked. We value any suggestions to improve
7373

7474
.. tip::
7575
Our documentation is treated like code. Make sure to check our
76-
`writing guidelines <https://scancode-toolkit.readthedocs.io/en/latest/contribute/contrib_doc.html>`_
76+
`writing guidelines <https://scancode-toolkit.readthedocs.io/en/stable/getting-started/contribute/contributing-docs.html>`_
7777
to help guide new users.
7878

7979
Other Ways
@@ -87,7 +87,7 @@ questions, and interact with us and other community members on
8787
Helpful Resources
8888
-----------------
8989

90-
- Review our `comprehensive guide <https://scancode-toolkit.readthedocs.io/en/latest/contribute/index.html>`_
90+
- Review our `comprehensive guide <https://scancode-toolkit.readthedocs.io/en/stable/getting-started/contribute/index.html>`_
9191
for more details on how to add quality contributions to our codebase and documentation
9292
- Check this free resource on `How to contribute to an open source project on github <https://egghead.io/lessons/javascript-identifying-how-to-contribute-to-an-open-source-project-on-github>`_
9393
- Follow `this wiki page <https://aboutcode.readthedocs.io/en/latest/contributing/writing_good_commit_messages.html>`_

docs/source/installation.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ to run on a different port than 8000.
8484
are several steps that may be needed to secure such a deployment.
8585
Currently, this is not recommendend.
8686

87+
.. tip::
88+
89+
Set ``STAGING`` to ``False`` in production to disable the staging environment warning.
90+
8791
Execute a Command
8892
^^^^^^^^^^^^^^^^^
8993

0 commit comments

Comments
 (0)