ci: Set workflow permissions

This commit is contained in:
Bernd Schorgers 2025-04-24 07:55:58 +02:00
parent 8f66d48e6e
commit 7025193763
No known key found for this signature in database
2 changed files with 48 additions and 0 deletions

45
.github/workflows/codeql.yml vendored Normal file
View file

@ -0,0 +1,45 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: "CodeQL check"
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '30 6 * * *'
permissions:
contents: read
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
security-events: write
packages: read
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize CodeQL
uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
with:
category: "/language:${{matrix.language}}"

View file

@ -12,6 +12,9 @@ concurrency:
group: ${{ github.head_ref }}-pr-validate group: ${{ github.head_ref }}-pr-validate
cancel-in-progress: true cancel-in-progress: true
permissions:
contents: read
jobs: jobs:
prepare: prepare:
name: Prepare data required for workflow name: Prepare data required for workflow