build: harden codeql-analysis.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>
This commit is contained in:
Alex 2022-11-03 23:52:00 +02:00
parent c9f944cd62
commit 9653185048

View File

@ -11,8 +11,15 @@ on:
schedule:
- cron: '30 12 * * 2'
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
analyze:
permissions:
contents: read # to fetch code (actions/checkout)
security-events: write # (github/codeql-action/autobuild)
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
name: Analyze
runs-on: ubuntu-latest