Skip to content

Commit 58db0aa

Browse files
committed
fix: remove all mentions of (dev-)requirements.txt
1 parent b4e54f5 commit 58db0aa

File tree

9 files changed

+60
-70
lines changed

9 files changed

+60
-70
lines changed

.github/workflows/cve_scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
python-version: '3.11'
2828
cache: 'pip'
29-
cache-dependency-path: '**/requirements.txt'
29+
cache-dependency-path: '**/pyproject.toml'
3030
- name: Get date
3131
id: get-date
3232
run: |

.github/workflows/fuzzing.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ jobs:
2727
run: |
2828
sudo apt-get update
2929
sudo apt-get install -y build-essential gcc g++ cmake
30-
30+
3131
- name: Install newer GCC
3232
run: |
3333
sudo apt-get update
3434
sudo apt-get install -y gcc-10 g++-10
3535
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100
3636
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100
37-
37+
3838
- name: Set up compiler environment
3939
run: |
4040
export CC=gcc
@@ -54,14 +54,13 @@ jobs:
5454
pip install --upgrade atheris
5555
pip install --upgrade atheris-libprotobuf-mutator -v
5656
pip install --upgrade protobuf
57-
57+
5858
- name: Install Cve-bin-tool
5959
run: |
6060
python -m pip install --upgrade pip
6161
python -m pip install --upgrade setuptools
62-
python -m pip install --upgrade -r dev-requirements.txt
63-
python -m pip install --upgrade .
64-
62+
python -m pip install --upgrade .[dev]
63+
6564
- name: Get date
6665
id: get-date
6766
run: |
@@ -88,7 +87,7 @@ jobs:
8887
[[ -e fuzz-cache ]] && mkdir -p .cache && mv fuzz-cache ~/.cache/cve-bin-tool
8988
NO_EXIT_CVE_NUM=1 python -m cve_bin_tool.cli test/assets/test-kerberos-5-1.15.1.out --disable-data-source CURL,EPSS,GAD,NVD,OSV,PURL2CPE,RSD
9089
cp -r ~/.cache/cve-bin-tool fuzz-cache
91-
90+
9291
- name: Run Fuzzing
9392
id: fuzzing
9493
env:

.github/workflows/sbom.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
with:
3232
python-version: ${{ matrix.python }}
3333
cache: 'pip'
34-
cache-dependency-path: '**/requirements.txt'
34+
cache-dependency-path: '**/pyproject.toml'
3535
- name: Install dependencies and cve-bin-tool
3636
run: |
3737
python -m pip install --upgrade pip

.github/workflows/testing.yml

Lines changed: 42 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,7 @@ jobs:
161161
python -m pip install --upgrade wheel
162162
python -m pip install --upgrade pdftotext
163163
python -m pip install --upgrade reportlab
164-
python -m pip install --upgrade -r dev-requirements.txt
165-
python -m pip install --upgrade .
164+
python -m pip install --upgrade .[dev]
166165
- name: Try single CLI run of tool
167166
if: env.sbom != 'true'
168167
run: |
@@ -258,8 +257,7 @@ jobs:
258257
python -m pip install --upgrade wheel
259258
python -m pip install --upgrade pdftotext
260259
python -m pip install --upgrade reportlab
261-
python -m pip install --upgrade -r dev-requirements.txt
262-
python -m pip install --editable .
260+
python -m pip install --editable .[dev]
263261
- name: Try single CLI run of tool
264262
if: env.sbom != 'true'
265263
run: |
@@ -270,10 +268,10 @@ jobs:
270268
if: env.sbom != 'true'
271269
run: >
272270
pytest
273-
--cov
271+
--cov
274272
--cov-report=xml
275273
--cov-append -n 8
276-
--junitxml=junit.xml
274+
--junitxml=junit.xml
277275
-o junit_family=legacy
278276
-v --durations=50
279277
--ignore=test/test_cli.py
@@ -360,15 +358,14 @@ jobs:
360358
with:
361359
path: cache
362360
key: Linux-cve-bin-tool-${{ steps.get-date.outputs.yesterday }}
363-
361+
364362
- name: Install cve-bin-tool
365363
if: env.sbom != 'true'
366364
run: |
367365
python -m pip install --upgrade pip
368366
python -m pip install --upgrade setuptools
369367
python -m pip install --upgrade wheel
370-
python -m pip install --upgrade -r dev-requirements.txt
371-
python -m pip install --editable .
368+
python -m pip install --editable .[dev]
372369
- name: Try single CLI run of tool
373370
if: env.sbom != 'true'
374371
run: |
@@ -378,13 +375,13 @@ jobs:
378375
- name: Run language scanner tests
379376
if: env.sbom != 'true'
380377
run: >
381-
pytest
378+
pytest
382379
--cov
383380
--cov-report=xml
384-
--junitxml=junit.xml
381+
--junitxml=junit.xml
385382
-o junit_family=legacy
386-
--cov-append -n 8
387-
-v --durations=50
383+
--cov-append -n 8
384+
-v --durations=50
388385
test/test_language_scanner.py
389386
- name: Upload code coverage to codecov
390387
if: env.sbom != 'true'
@@ -463,15 +460,14 @@ jobs:
463460
with:
464461
path: cache
465462
key: Linux-cve-bin-tool-${{ steps.get-date.outputs.yesterday }}
466-
463+
467464
- name: Install cve-bin-tool
468465
if: env.sbom != 'true'
469466
run: |
470467
python -m pip install --upgrade pip
471468
python -m pip install --upgrade setuptools
472469
python -m pip install --upgrade wheel
473-
python -m pip install --upgrade -r dev-requirements.txt
474-
python -m pip install --editable .
470+
python -m pip install --editable .[dev]
475471
- name: Try single CLI run of tool
476472
if: env.sbom != 'true'
477473
run: |
@@ -481,12 +477,12 @@ jobs:
481477
- name: Run binary scanner tests
482478
if: env.sbom != 'true'
483479
run: >
484-
pytest
485-
--cov
486-
--cov-report=xml
487-
--junitxml=junit.xml
480+
pytest
481+
--cov
482+
--cov-report=xml
483+
--junitxml=junit.xml
488484
-o junit_family=legacy
489-
--cov-append -n 8
485+
--cov-append -n 8
490486
-v --durations=50
491487
test/test_scanner.py
492488
- name: Upload code coverage to codecov
@@ -573,8 +569,7 @@ jobs:
573569
python -m pip install --upgrade pip
574570
python -m pip install --upgrade setuptools
575571
python -m pip install --upgrade wheel
576-
python -m pip install --upgrade -r dev-requirements.txt
577-
python -m pip install --editable .
572+
python -m pip install --editable .[dev]
578573
- name: Try single CLI run of tool
579574
if: env.sbom != 'true'
580575
run: |
@@ -584,12 +579,12 @@ jobs:
584579
- name: Run synchronous tests
585580
if: env.sbom != 'true'
586581
run: >
587-
pytest
588-
-v --cov
589-
--cov-report=xml
590-
--junitxml=junit.xml
582+
pytest
583+
-v --cov
584+
--cov-report=xml
585+
--junitxml=junit.xml
591586
-o junit_family=legacy
592-
--cov-append
587+
--cov-append
593588
--durations=50
594589
test/test_cli.py
595590
test/test_cvedb.py
@@ -716,8 +711,7 @@ jobs:
716711
python -m pip install --upgrade pip
717712
python -m pip install --upgrade setuptools
718713
python -m pip install --upgrade wheel
719-
python -m pip install --upgrade -r dev-requirements.txt
720-
python -m pip install --editable .
714+
python -m pip install --editable .[dev]
721715
- name: Install playwright dependencies for HTML tests
722716
run: |
723717
python -m playwright install chromium --with-deps
@@ -807,19 +801,18 @@ jobs:
807801
python -m pip install --upgrade pip
808802
python -m pip install --upgrade setuptools
809803
python -m pip install --upgrade wheel
810-
python -m pip install --upgrade -r dev-requirements.txt
811-
python -m pip install --upgrade .
804+
python -m pip install --upgrade .[dev]
812805
- name: Try single CLI run of tool
813806
run: |
814807
python -m cve_bin_tool.cli test/assets/test-kerberos-5-1.15.1.out
815808
- name: Run async tests
816809
run: >
817-
pytest
818-
--cov
810+
pytest
811+
--cov
819812
--cov-report=xml
820-
--junitxml=junit.xml
813+
--junitxml=junit.xml
821814
-o junit_family=legacy
822-
--cov-append -n 8
815+
--cov-append -n 8
823816
-v --durations=50
824817
--ignore=test/test_cli.py
825818
--ignore=test/test_cvedb.py
@@ -828,25 +821,25 @@ jobs:
828821
--ignore=test/test_json.py
829822
- name: Run synchronous tests
830823
run: >
831-
pytest
832-
-v --cov
824+
pytest
825+
-v --cov
833826
--cov-report=xml
834-
--junitxml=junit.xml
827+
--junitxml=junit.xml
835828
-o junit_family=legacy
836829
--cov-append
837-
--cov-report=xml
830+
--cov-report=xml
838831
--durations=50
839832
test/test_cli.py
840833
test/test_cvedb.py
841834
- name: Cache conda
842835
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
843836
env:
844-
# Increase to reset cache if requirements.txt file has not changed
837+
# Increase to reset cache if dependencies have not changed
845838
CACHE_NUMBER: 0
846839
with:
847840
path: ~/conda_pkgs_dir
848841
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
849-
hashFiles('requirements.txt') }}
842+
hashFiles('pyproject.toml') }}
850843
- uses: conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f # v3.2.0
851844
with:
852845
auto-update-conda: true
@@ -859,18 +852,17 @@ jobs:
859852
python -m pip install --upgrade setuptools
860853
python -m pip install --upgrade wheel
861854
python -m pip install --upgrade reportlab
862-
python -m pip install --upgrade -r dev-requirements.txt
863-
python -m pip install --upgrade .
855+
python -m pip install --upgrade .[dev]
864856
- name: Test PDF generation on Windows
865-
run: >
866-
pytest
867-
test/test_output_engine.py
868-
-k test_output_pdf
857+
run: >
858+
pytest
859+
test/test_output_engine.py
860+
-k test_output_pdf
869861
--cov
870862
--cov-append
871863
--cov-report=xml
872-
--junitxml=junit.xml
873-
-o junit_family=legacy
864+
--junitxml=junit.xml
865+
-o junit_family=legacy
874866
--durations=50
875867
- name: Upload code coverage to codecov
876868
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1

.github/workflows/update-js-dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
4040
with:
4141
path: ~/.cache/pip
42-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
42+
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
4343
restore-keys: |
4444
${{ runner.os }}-pip-
4545

CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,18 +125,18 @@ While you're in a venv, the `python` command will point to whatever version you
125125

126126
## Installing dependencies
127127

128-
The packages you need to run CVE Binary Tool are listed in the `requirements.txt` file in the main cve-bin-tool directory. You can install all of them using the following pip command:
128+
The packages you need to run CVE Binary Tool are listed in the `dependencies` section of the `pyproject.toml` file in the main cve-bin-tool directory. You can install all of them using the following pip command:
129129

130130
```bash
131-
pip install -U -r requirements.txt
131+
pip install -U -r .
132132
```
133133

134-
The `-U` in that line above will update you to the latest versions of packages as needed, which we recommend because people running security tools generally want to have all the latest updates if possible. The `-r requirements.txt` specifies the file with all the requirements.
134+
The `-U` in that line above will update you to the latest versions of packages as needed, which we recommend because people running security tools generally want to have all the latest updates if possible.
135135

136136
We also have a recommended list of dependencies just for developers that include things like the flake8 linter. You probably want to install them too if you're intending to be a developer.
137137

138138
```bash
139-
pip install -r dev-requirements.txt
139+
pip install -r .[dev]
140140
```
141141

142142
## Running your local copy of CVE Binary Tool
@@ -183,7 +183,7 @@ pip install -e .
183183

184184
The CVE Binary Tool has a set of tests that can be run using `pytest` command. Typically you want to run `pytest` in the cve-bin-tool directory to run the short test suite and make sure tests pass.
185185

186-
After running `pytest`, you may get several test failures relating to `ModuleNotFound` error. If you have run `pip install -r dev-requirements.txt` or equivalent and are sure you have the required modules installed, your issue may be related to Python's module search path. You can run this command instead :
186+
After running `pytest`, you may get several test failures relating to `ModuleNotFound` error. If you have run `pip install -r .[dev]` or equivalent and are sure you have the required modules installed, your issue may be related to Python's module search path. You can run this command instead :
187187

188188
```bash
189189
python -m pytest
@@ -211,10 +211,10 @@ CVE Binary Tool uses a few tools to improve code quality and readability:
211211
- `interrogate` checks your code base for missing docstrings.
212212
- `codespell` Detects common misspellings in text files.
213213

214-
We provide a `dev-requirements.txt` file which includes all the precise versions of tools as they'll be used in GitHub Actions. You an install them all using pip:
214+
We have a list of optional dev dependencies in our `pyproject.toml` file which includes all the precise versions of tools as they'll be used in GitHub Actions. You can install them all using pip:
215215

216216
```bash
217-
pip install -r dev-requirements.txt
217+
pip install -r .[dev]
218218
```
219219

220220
### Using pre-commit to run linters automatically

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
include requirements.txt
21
include *.md
32
include test/binaries/*.c
43
include test/csv/*.csv

doc/how_to_guides/cve_scanner_gh_action.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
uses: actions/cache@v3
3939
with:
4040
path: ~/.cache/pip
41-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
41+
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
4242
restore-keys: |
4343
${{ runner.os }}-pip-
4444
- name: get cached database

doc/how_to_guides/cve_scanner_gh_action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: actions/cache@v3
2626
with:
2727
path: ~/.cache/pip
28-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
28+
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
2929
restore-keys: |
3030
${{ runner.os }}-pip-
3131
- name: get cached database

0 commit comments

Comments
 (0)