GitHub Actions Workflows currently use default permissions, which may provide more permissions than is needed.
Suggested Solution
Remove permissions at the top level of GitHub Actions Workflows.
Grant only required permissions in each job.
Add workflow_dispatch.
Bump actions/checkout from 2 to 3.
Bump actions/setup-go from 2 to 3.
Bump CodeQL actions from 1 to 2.
Use check-latest feature of setup-go.
Issue To Be Solved
GitHub Actions Workflows currently use default permissions, which may provide more permissions than is needed.
Suggested Solution
Remove permissions at the top level of GitHub Actions Workflows. Grant only required permissions in each job. Add workflow_dispatch. Bump actions/checkout from 2 to 3. Bump actions/setup-go from 2 to 3. Bump CodeQL actions from 1 to 2. Use check-latest feature of setup-go.