bonitasoft / bonita-documentation-site

The sources of the Bonita Documentation site
https://documentation.bonitasoft.com/
GNU General Public License v2.0
9 stars 5 forks source link

ci: update workflows and github token permissions #579

Closed tbouffard closed 1 year ago

tbouffard commented 1 year ago

This update lets reduce the GITHUB_TOKEN default permissions to READ:

Covers #497

Notes

This PR applies to this repository the same configuration as we already did for documentation content repositories: see #443

Documentation of the actions that miss some permissions

Previous error with the netlify actions

The error was logged but didn't fail the build

RequestError [HttpError]: Resource not accessible by integration
at /home/runner/work/_actions/nwtgck/actions-netlify/v2.0/dist/index.js:10385:21
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
status: 403,
response: {
url: 'https://api.github.com/repos/bonitasoft/bonita-documentation-site/statuses/88a43d0b02af8bab6f942a20792f39bd45b57c8e',
status: 403,
…
},
data: {
message: 'Resource not accessible by integration',
documentation_url: 'https://docs.github.com/rest/commits/statuses#create-a-commit-status'
}
},
request: {
method: 'POST',
url: 'https://api.github.com/repos/bonitasoft/bonita-documentation-site/statuses/88a43d0b02af8bab6f942a20792f39bd45b57c8e',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'octokit-core.js/3.6.0 Node.js/16.16.0 (linux; x64)',
authorization: 'token [REDACTED]',
'content-type': 'application/json; charset=utf-8'
},
body: '{"context":"Netlify","description":"Netlify deployment","state":"success","target_url":"https://documentation.bonitasoft.com/"}',
request: { agent: [Agent], hook: [Function: bound bound register] }
}
sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information