diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..396139f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,25 @@ +version: 2 +updates: + # Actions are SHA-pinned in the workflows, so this is what moves those pins. + # Without it, a pinned action never receives a security fix. + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + commit-message: + prefix: "ci" + groups: + actions: + patterns: ["*"] + + # CodeSnake has no runtime dependencies; this covers the optional [tools] + # and [dev] extras in pyproject.toml. + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "weekly" + commit-message: + prefix: "deps" + groups: + tools: + patterns: ["*"] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b065452..43f4706 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,16 +5,26 @@ on: branches: [main] pull_request: +# Deny by default; each job grants only what it needs. +permissions: {} + jobs: test: runs-on: ubuntu-latest + permissions: + contents: read strategy: fail-fast: false matrix: python-version: ["3.10", "3.11", "3.12", "3.13"] steps: - - uses: actions/checkout@v7 - - uses: actions/setup-python@v7 + # Actions are pinned to a commit SHA: a tag is a mutable ref, and whoever + # can move it can run arbitrary code in this workflow. + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + # Do not leave the job token in .git/config for later steps to reuse. + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ matrix.python-version }} - name: Install