diff --git a/.github/dependabot.yml b/.github/dependabot.yml index bf7a714..eb913d1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,16 +1,23 @@ - version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" + +multi-ecosystem-groups: + dependencies: schedule: # Check for updates on the first Sunday of every month, 8PM UTC interval: "cron" cronjob: "0 20 * * sun#1" +updates: + - package-ecosystem: "github-actions" + directory: "/" + patterns: [ "*" ] + multi-ecosystem-group: "dependencies" + cooldown: + default-days: 7 + - package-ecosystem: "pre-commit" directory: "/" - schedule: - # Check for updates on the first Sunday of every month, 8PM UTC - interval: "cron" - cronjob: "0 20 * * sun#1" + patterns: [ "*" ] + multi-ecosystem-group: "dependencies" + cooldown: + default-days: 7 diff --git a/.github/workflows/check-pr-template.yml b/.github/workflows/check-pr-template.yml index 9196bac..31dccfd 100644 --- a/.github/workflows/check-pr-template.yml +++ b/.github/workflows/check-pr-template.yml @@ -4,6 +4,9 @@ on: pull_request: types: [opened, edited, reopened, synchronize] +permissions: + contents: read + jobs: check-pr-template: name: Check PR template diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c37e4a..0c14d34 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,9 @@ concurrency: group: ${{ github.ref }} cancel-in-progress: true +permissions: + contents: read + defaults: run: shell: bash diff --git a/.github/workflows/new-issue.yml b/.github/workflows/new-issue.yml index e4a99c0..58e6d18 100644 --- a/.github/workflows/new-issue.yml +++ b/.github/workflows/new-issue.yml @@ -11,8 +11,11 @@ jobs: add-to-project: name: Add issue to BeeWare project runs-on: ubuntu-latest + # The add-to-project action authenticates with BRUTUS_PAT_TOKEN, so the + # job's own GITHUB_TOKEN needs no permissions. + permissions: {} steps: - - uses: actions/add-to-project@v2.0.0 + - uses: actions/add-to-project@5afcf98fcd03f1c2f92c3c83f58ae24323cc57fd # v2.0.0 with: project-url: https://github.com/orgs/beeware/projects/1 github-token: ${{ secrets.BRUTUS_PAT_TOKEN }} diff --git a/.github/zizmor.yml b/.github/zizmor.yml new file mode 100644 index 0000000..b834aff --- /dev/null +++ b/.github/zizmor.yml @@ -0,0 +1,9 @@ +rules: + unpinned-uses: + config: + # Allow BeeWare-provided actions to be unpinned. If an attacker is in a + # position to exploit those action, they're probably able to exploit + # repositories directly; and it's significantly easier for our internal + # actions to automatically be the most recent versions. + policies: + beeware/*: ref-pin diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7718a48..61ef95b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,3 +8,7 @@ repos: - id: check-case-conflict - id: end-of-file-fixer - id: trailing-whitespace + - repo: https://github.com/zizmorcore/zizmor-pre-commit + rev: v1.26.1 + hooks: + - id: zizmor