Docker and CI/CD · Middle · Question 37 of 75
Why set permissions: explicitly for GITHUB_TOKEN?
- ✓Correct answer: To give the workflow only the access it needs
- 2Because the token doesn't work without it
- 3To make the token valid for longer than a day
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.