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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
python-version: 3.11.11

- name: Install uv
uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182 # v5.4.1
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
enable-cache: true
pyproject-file: 'pyproject.toml'
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182 # v5.4.1
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
enable-cache: true
pyproject-file: 'pyproject.toml'
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
python-version: 3.12

- name: Install uv
uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182 # v5.4.1
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
enable-cache: true
pyproject-file: 'integration_tests/django5/pyproject.toml'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-references.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
python-version: 3.11.11

- name: Install uv
uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182 # v5.4.1
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
enable-cache: true
pyproject-file: 'pyproject.toml'
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
should-release: ${{ steps.check.outputs.should-release }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 security Floating tags in security-sensitive workflow

release.yml upgrades to @v6 using mutable floating tags, while ci.yml and generate-references.yml consistently pin all actions to specific commit SHAs (e.g. actions/checkout@85e6279...). This workflow has elevated permissions (contents: write, actions: write, id-token: write) and accesses multiple secrets for PyPI publishing and the GitHub App releaser token, making it the highest-priority workflow to harden against supply-chain attacks.

The same issue applies to actions/setup-python@v6 (line 99), actions/create-github-app-token@v3 (line 86), actions/cache@v5 (line 117), and actions/checkout@v6 on line 236.

Consider pinning each action to its full commit SHA (with the tag in a comment for readability), matching the pattern already used in the other two workflows.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/release.yml
Line: 32

Comment:
**Floating tags in security-sensitive workflow**

`release.yml` upgrades to `@v6` using mutable floating tags, while `ci.yml` and `generate-references.yml` consistently pin all actions to specific commit SHAs (e.g. `actions/checkout@85e6279...`). This workflow has elevated permissions (`contents: write`, `actions: write`, `id-token: write`) and accesses multiple secrets for PyPI publishing and the GitHub App releaser token, making it the highest-priority workflow to harden against supply-chain attacks.

The same issue applies to `actions/setup-python@v6` (line 99), `actions/create-github-app-token@v3` (line 86), `actions/cache@v5` (line 117), and `actions/checkout@v6` on line 236.

Consider pinning each action to its full commit SHA (with the tag in a comment for readability), matching the pattern already used in the other two workflows.

How can I resolve this? If you propose a fix, please make it concise.

with:
ref: main
fetch-depth: 0
Expand Down Expand Up @@ -89,19 +89,19 @@ jobs:
private-key: ${{ secrets.GH_APP_POSTHOG_PYTHON_RELEASER_PRIVATE_KEY }}

- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: main
fetch-depth: 0
token: ${{ steps.releaser.outputs.token }}

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: 3.11.11

- name: Install uv
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
enable-cache: true
pyproject-file: "pyproject.toml"
Expand All @@ -114,7 +114,7 @@ jobs:

- name: Cache Sampo CLI
id: cache-sampo
uses: actions/cache@v3
uses: actions/cache@v5
with:
path: ~/.cargo/bin/sampo
key: sampo-${{ runner.os }}-${{ runner.arch }}
Expand Down Expand Up @@ -233,7 +233,7 @@ jobs:
if: always() && needs.release.result == 'success' && needs.notify-approval-needed.outputs.slack_ts != ''
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Notify Slack - Released
uses: posthog/.github/.github/actions/slack-thread-reply@main
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v24
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ packages = [

[tool.uv]
exclude-newer = "7 days"
required-version = ">=0.8.0"

[tool.pytest.ini_options]
asyncio_mode = "auto"
Expand Down
Loading