Loading tutorials
on, jobs, steps) and know that workflows can run third-party actions. It also assumes you know how pull requests and issues work. The previous chapter covered what the GITHUB_TOKEN is. Here the question is what happens when somethi5 min readon, jobs, steps) and that you know what the GITHUB_TOKEN is from the earlier chapters. You should also be comfortable with the GitHub CLI (gh) or the repository settings pages. By the end, you will be able to set the default 6 min readon, jobs, steps) and know that each job gets a GITHUB_TOKEN. It also assumes you know that the token's permissions decide what API calls a step can make. Here you learn the syntax for controlling those permissions and the rules for how GitHu6 min readpermissions key sets what the GITHUB_TOKEN may do. Earlier chapters covered the key and its access levels. This one covers what each common scope allows, which actions need it, and how to pick the right one.5 min readpermissions: {} pattern: removing every permission from the GITHUB_TOKEN at workflow level, then granting access back one job at a time. It assumes you can read workflow YAML (on, jobs, steps) and that you know the permissions key accepts read, write, and `non4 min readon, jobs, steps) and YAML. It also assumes you know what the GITHUB_TOKEN is and what the permissions key looks like. Here you learn where the key can go, how the levels interact, and how to build a workflow where each job holds only5 min readpermissions can be set at workflow level and job level. It also assumes you have set the repository default to read-only. The question here is how to work out which scopes a given job needs, instead of guessing or copying write-all.5 min readpermissions key from the earlier chapters, and you can use the gh CLI or call the GitHub REST API. It covers what a token permission error looks like, how to map it to the permission that is missing, and which failures a `permissions5 min readon, jobs, steps), that you know the permissions key from earlier chapters, and that you know how workflow-level and job-level permissions combine. Here you will see that the token your job receives depends on who triggered the run and whic5 min readpermissions block at workflow and job level, and that you have seen workflow_call and uses: at least once. It covers how the GITHUB_TOKEN passes from a calling workflow into a reusable (called) workflow, who controls its permissions, and which mistakes ca5 min readGITHUB_TOKEN is created per job, and have seen the permissions key from earlier chapters. Here you will learn where actions/checkout stores the token, who can read it, and how to stop it from lingering.6 min readpermissions key works at workflow and job level, and have a basic idea of what an IAM role is in a cloud provider. It covers the id-token permission, which is different from the other scopes you have seen. It does not grant access to 6 min readpermissions key works at workflow and job level. It also assumes you know that the token for a fork's pull_request run is read-only. Here you will see why the pull_request_target event is the usual place where that safety is lost5 min readpermissions block at workflow and job level. It also assumes you know the repository default workflow permissions setting and how to use gh with the GitHub API. Earlier chapters showed how to write minimal permissions for one workflow. Here the goal is to che5 min readpermissions block at workflow and job level and know what contents: read and pull-requests: write mean. Least privilege usually means tightening the GITHUB_TOKEN. Some tasks fall outside what any GITHUB_TOKEN can do, and then you need a different creden5 min read