Conversation
GitHub workflow_dispatch API requires the workflow file to exist on the default branch. This file is a placeholder to satisfy the requirement and the actual workflow logic is on the gmsl-rpi-6.13.y branch. Signed-off-by: Ioana Risteiu <Ioana.Risteiu@analog.com>
| runs-on: ubuntu-latest | ||
| steps: | ||
| - run: echo "Start Kuiper Image Build." No newline at end of file |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 19 days ago
In general, the fix is to explicitly define a permissions: block for the workflow or for the build job so that the automatically-provided GITHUB_TOKEN has only the minimal required scope. For this particular workflow, the job only prints a message and does not interact with the repository or GitHub APIs, so it can safely run with fully disabled permissions (permissions: {}) or with a minimal read-only scope like contents: read. Using permissions: {} is the strictest option and clearly documents that the token is not intended to be used.
The single best way to fix this without changing existing functionality is to add a top-level permissions: block (so it applies to all current and future jobs in this workflow) between the on: block and the jobs: block. We will set it to an empty mapping, which disables all default scopes for the GITHUB_TOKEN in this workflow:
permissions: {}Concretely, in .github/workflows/gmsl-image-build.yml, insert this permissions: line after the on: configuration (after line 8/9 in the provided snippet) and before jobs:. No imports or additional definitions are needed; this is purely YAML configuration for the GitHub Actions workflow.
| @@ -7,6 +7,7 @@ | ||
| required: true | ||
| type: string | ||
|
|
||
| permissions: {} | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest |
Pull Request Description
GitHub workflow_dispatch API requires the workflow file to exist on the default branch. This file is a placeholder to satisfy the requirement and the actual workflow logic is on the gmsl-rpi-6.13.y branch.
PR Type
PR Checklist