GITHUB_TOKEN Permissions Quiz

5 questions Pass: 70% +25 pts (50 with Pro)

Quiz covering Implement Security Best Practices

What you'll be asked

  1. What is the primary purpose of the GITHUB_TOKEN in a GitHub Actions workflow?
  2. Which principle should be followed when configuring permissions for the GITHUB_TOKEN in a workflow file?
  3. If you set 'permissions: contents: read' at the top level of your workflow file, what happens to the default permissions of the GITHUB_TOKEN?
  4. A workflow needs to create a release and upload an asset. Which permission scope must be granted to the GITHUB_TOKEN?
  5. You have a workflow that triggers on 'pull_request_target'. Why is it critical to explicitly restrict GITHUB_TOKEN permissions in this scenario?

Answers and explanations come after you submit.