Skip to content

Commit 7ba2f8d

Browse files
committed
Add dependency scanning with pip-audit, and pin third-party actions to commit hashes
1 parent a18009f commit 7ba2f8d

4 files changed

Lines changed: 468 additions & 288 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
steps:
3535
# Install dependencies, with caching
3636
- uses: actions/checkout@v6
37-
- uses: astral-sh/setup-uv@v7
37+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
3838
with:
3939
enable-cache: true
4040
cache-dependency-glob: uv.lock
@@ -44,13 +44,13 @@ jobs:
4444
uv sync --all-extras --group test-server
4545
4646
# Start integration test databases
47-
- uses: supercharge/mongodb-github-action@1.12.1
47+
- uses: supercharge/mongodb-github-action@315db7fe45ac2880b7758f1933e6e5d59afd5e94 # 1.12.1
4848
with:
4949
mongodb-version: '5.0'
5050
- uses: supercharge/redis-github-action@v2
5151
with:
5252
redis-version: '6'
53-
- uses: rrainn/dynamodb-action@v4.0.0
53+
- uses: rrainn/dynamodb-action@36eaff1005b37a22258716d4280f9e0377b834aa # v4.0.0
5454
- name: Run custom test server
5555
run: |
5656
cd test && uv run gunicorn -D -c server/gunicorn-cfg.py server:app
@@ -64,7 +64,7 @@ jobs:
6464
# Latest python version: send coverage report to codecov
6565
- name: 'Upload coverage report to Codecov'
6666
if: ${{ matrix.python-version == env.LATEST_PY_VERSION }}
67-
uses: codecov/codecov-action@v6
67+
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
6868

6969
# Run code analysis checks
7070
analyze:
@@ -74,5 +74,9 @@ jobs:
7474
- uses: actions/setup-python@v6
7575
with:
7676
python-version: ${{ env.LATEST_PY_VERSION }}
77-
- name: Run style checks and linting via pre-commit hooks
78-
uses: pre-commit/action@v3.0.0
77+
- name: Run style checks & linting
78+
uses: j178/prek-action@bdca6f102f98e2b4c7029491a53dfd366469e33d # v2.0.4
79+
- name: Scan dependencies for known vulnerabilities
80+
uses: pypa/gh-action-pip-audit@1220774d901786e6f652ae159f7b6bc8fea6d266 # v1.1.0
81+
with:
82+
vulnerability-service: osv

‎.github/workflows/deploy.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
id-token: write
2323
steps:
2424
- uses: actions/checkout@v6
25-
- uses: astral-sh/setup-uv@v7
25+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
2626

2727
- name: Set pre-release version
2828
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}

‎.pre-commit-config.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ repos:
88
- id: mixed-line-ending
99
- id: trailing-whitespace
1010
- repo: https://github.com/astral-sh/ruff-pre-commit
11-
rev: v0.15.8
11+
rev: v0.15.13
1212
hooks:
1313
- id: ruff
1414
args: [--fix]
1515
- id: ruff-format
1616
- repo: https://github.com/pre-commit/mirrors-mypy
17-
rev: v1.20.0
17+
rev: v2.1.0
1818
hooks:
1919
- id: mypy
2020
files: aiohttp_client_cache
@@ -24,6 +24,6 @@ repos:
2424
hooks:
2525
- id: prettier
2626
- repo: https://github.com/crate-ci/typos
27-
rev: v1.45.0
27+
rev: v1.46.1
2828
hooks:
2929
- id: typos

0 commit comments

Comments
 (0)