Skip to content

Commit

Permalink
Switch from safety to pip-audit (#1918)
Browse files Browse the repository at this point in the history
  • Loading branch information
davfsa authored May 17, 2024
1 parent c9c8298 commit 43fb2c6
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ jobs:
exit 1
fi
- name: Safety
- name: Audit
if: always()
run: |
nox -s safety
nox -s audit
- name: Mypy
if: always()
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ This includes:
- `test`
- Run tests and installation of the package on different OS's and python versions.
- `linting`
- Linting (`flake8`), type checking (`mypy`), safety (`safety`) and spelling (`codespell`).
- Linting (`flake8`), type checking (`mypy`), audit (`pip-audit`) and spelling (`codespell`).
- `twemoji`
- Force test all discord emojis.
- `pages`
Expand Down
1 change: 1 addition & 0 deletions dev-requirements/audit.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pip-audit
4 changes: 0 additions & 4 deletions dev-requirements/safety.txt

This file was deleted.

16 changes: 13 additions & 3 deletions pipelines/safety.nox.py → pipelines/audit.nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,17 @@


@nox.session()
def safety(session: nox.Session) -> None:
def audit(session: nox.Session) -> None:
"""Perform dependency scanning."""
session.install("-r", "requirements.txt", *nox.dev_requirements("safety"))
session.run("safety", "check", "--full-report")
session.install(*nox.dev_requirements("audit"))
session.run(
"pip-audit",
"-r",
"requirements.txt",
"-r",
"server-requirements.txt",
"-r",
"speedup-requirements.txt",
"--aliases",
"on",
)

0 comments on commit 43fb2c6

Please sign in to comment.