Skip to content
Draft
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
7 changes: 5 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ jobs:
- "3.14"
- "3.13"
- "3.12"
permissions:
contents: read

steps:
- uses: actions/checkout@v7
- uses: jdx/mise-action@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: jdx/mise-action@9e7f7633ff6f6d6048a9418a68d48f288f50eb14 # v4.2.3
with:
tool_versions: |
python ${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: jdx/mise-action@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: jdx/mise-action@9e7f7633ff6f6d6048a9418a68d48f288f50eb14 # v4.2.3
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
Expand Down
5 changes: 5 additions & 0 deletions .jules/sentinel.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Sentinel Security Journal

This journal contains critical security learnings specific to this project.

## 2025-02-14 - Supply Chain Hardening via Action Pinning & Least-Privilege Permissions
**Vulnerability:** Workflows referenced a mutable and non-existent version tag (`@v7`) for `actions/checkout` and lacked explicit token permissions, leaving them open to potential tag-hijacking supply-chain attacks and overly permissive default GITHUB_TOKEN write access.
**Learning:** Using tags like `@v4` or `@v7` is insecure because tag references are mutable and can be modified or spoofed by malicious actors in the upstream dependency repository, leading to code injection during CI/CD runs.
**Prevention:** Always pin third-party GitHub Actions to their secure, immutable full-length commit SHAs and explicitly restrict permissions to `contents: read` at the job level.
4 changes: 2 additions & 2 deletions tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ def test_greet_empty_fallback():


if __name__ == "__main__":
from pytest import main
import pytest

main()
pytest.main()
Loading