Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ jobs:
runs-on: ubuntu-latest

steps:
# fetch-depth: 0 pulls the full history and tags so `git describe` below can resolve them
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -22,16 +25,18 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
# Previously WyriHaximus/github-action-get-previous-tag@master and
# DamianReeves/write-file-action@master. Both were third-party actions tracking a mutable
# branch, in the one workflow that holds secrets.PYPI -- a compromise of either upstream
# would have leaked the publish token. Inlined so there is no third-party code in this job.
- name: Get Previous tag
id: previoustag
uses: WyriHaximus/github-action-get-previous-tag@master
run: echo "tag=$(git describe --tags --abbrev=0)" >> "$GITHUB_OUTPUT"
- name: Set release tag in VERSION
uses: DamianReeves/write-file-action@master
with:
path: VERSION
contents: |
${{ steps.previoustag.outputs.tag }}
write-mode: overwrite
env:
# passed via env rather than interpolated into the script to avoid a shell-injection sink
PREVIOUS_TAG: ${{ steps.previoustag.outputs.tag }}
run: printf '%s\n' "$PREVIOUS_TAG" > VERSION
- name: Build and publish
env:
TWINE_USERNAME: __token__
Expand Down
17 changes: 13 additions & 4 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ name = "pypi"

[packages]
requests = "*"
# deepdiff is needed for comparing data structures. 8.0.0 introduced breaking changes
deepdiff = ">8"
# deepdiff is needed for comparing data structures. 8.0.0 introduced breaking changes, as did 9.0.0,
# so stay on 8.x. 8.6.2 is the floor for CVE-2025-58367 (Delta class pollution) and CVE-2026-33155.
deepdiff = ">=8.6.2,<9"
# uvicorn is a Python library for running ASGI applications
uvicorn = ">=0.28.0"
# urllib3 is not imported directly; it comes in transitively via requests. Pinned here only as a
# security floor: <2.7.0 is affected by CVE-2025-66418, CVE-2025-66471, CVE-2026-21441 (decompression
# bombs) and CVE-2026-44431 (headers leaked across origins on proxied redirects).
urllib3 = ">=2.7.0"

[dev-packages]
# setuptools is needed for building the package
Expand All @@ -35,8 +40,12 @@ pytest-asyncio = ">=0.23.8"
types-requests="*"
# bandit is needed for security checks
bandit = ">=1.8.3"
# ruff is needed for linting
ruff = ">=0.11.5"
# ruff is needed for linting. Capped below 0.13 deliberately: this repo has no pyproject.toml or
# ruff.toml, so ruff's built-in defaults ARE the lint config, and ruff changes its default rule
# selection and formatter stable style across pre-1.0 minor releases. 0.16.8 flagged 503 new errors
# (UP006/I001/FURB105) and reformatted 4 files with no source change. Lift this cap in a dedicated
# PR that adds an explicit ruff config, not in a security bump.
ruff = ">=0.11.5,<0.13"


# These dependencies are required for pipenv-setup. They conflict with ones above, so we install these
Expand Down
Loading
Loading