fix: pilot findings (pip-audit scope, SPDX license, E501 in tests) #1

Merged
christianmanivong merged 2 commits from fix/pilot-findings into main 2026-10-22 19:10:48 +00:00
2 changed files with 20 additions and 9 deletions
Showing only changes of commit ba133d9de3 - Show all commits

No files matched your search

+16 -9
View File
@@ -137,18 +137,25 @@ jobs:
with:
python-version: "3.12"
- name: Install
# Two venvs: the tools, and the package alone. Auditing the tools' venv
# reported the runner's own pip instead of anything the package brings.
run: |
python -m venv .venv
echo "$PWD/.venv/bin" >> "$GITHUB_PATH"
.venv/bin/pip install -q "$STANDARD" bandit pip-audit
if [ -n "${{ inputs.pre-install }}" ]; then .venv/bin/pip install -q ${{ inputs.pre-install }}; fi
.venv/bin/pip install -q .
python -m venv .tools
.tools/bin/pip install -q --upgrade pip
.tools/bin/pip install -q "$STANDARD" bandit pip-audit
python -m venv .audit
.audit/bin/pip install -q --upgrade pip
if [ -n "${{ inputs.pre-install }}" ]; then .audit/bin/pip install -q ${{ inputs.pre-install }}; fi
.audit/bin/pip install -q .
- name: bandit
run: bandit -q -r "$(napalm-standard package)"
run: .tools/bin/bandit -q -r "$(.tools/bin/napalm-standard package)"
- name: pip-audit
# The installed set: what a user gets today from the package's ranges.
# A package not on PyPI yet (the driver itself, a git pre-install) is skipped with a note.
run: pip-audit --skip-editable --progress-spinner off
# What a user gets today from the package's ranges. Packages installed from
# a URL (the package itself, a git pre-install) are not on PyPI's index yet.
run: |
.audit/bin/pip freeze --all | grep -vE ' @ |^-e ' > audit-requirements.txt
cat audit-requirements.txt
.tools/bin/pip-audit -r audit-requirements.txt --no-deps --disable-pip --progress-spinner off
build:
runs-on: ubuntu-latest
+4
View File
@@ -12,6 +12,10 @@ The format follows [Keep a Changelog](https://keepachangelog.com/), versions fol
- E501 is off under `tests/`: recorded device output keeps its lines (found in the
device-types pilot).
### Fixed
- `security` audited the runner's own pip instead of the package: pip-audit now
checks a venv holding only the package and its dependencies.
## [0.1.0] - 2026-10-22
### Added