Docker and CI/CD · Middle · Question 37 of 75

Why set permissions: explicitly for GITHUB_TOKEN?

Explanation

Least privilege limits the damage if a step or dependency is compromised. For example contents: read for tests, packages: write only in the publish job.

Further reading

Problem with a question

Docker and CI/CD · Middle · question 37

Test yourself

Take the Docker and CI/CD · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz