Why can GitHub Actions checkout the repository, when I specify contents: none
permission?
Consider the code:
on:
workflow_dispatch:
permissions:
contents: none
jobs:
job-1:
name: Job 1
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v4
It succeeds, although permissions.contents: none
remove the permission from secrets.GITHUB_TOKEN
.