Skip to content

.github/workflows: build gmsl kuiper image#239

Open
iristeiu06 wants to merge 1 commit intomainfrom
build_gmsl
Open

.github/workflows: build gmsl kuiper image#239
iristeiu06 wants to merge 1 commit intomainfrom
build_gmsl

Conversation

@iristeiu06
Copy link
Copy Markdown
Collaborator

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

  • Bug fix (change that fixes an issue)
  • New feature (change that adds new functionality)
  • Breaking change (has dependencies in other repos or will cause CI to fail)

PR Checklist

  • I have performed a self-review of the changes
  • I have commented my code, at least hard-to-understand parts
  • I have built Kuiper Linux image with the changes
  • I have tested new image in hardware, on relevant boards
  • I have signed off all commits from this PR
  • I have updated the documentation (wiki pages, ReadMe etc)

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>
Comment on lines +12 to +14
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

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

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.

Suggested changeset 1
.github/workflows/gmsl-image-build.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/gmsl-image-build.yml b/.github/workflows/gmsl-image-build.yml
--- a/.github/workflows/gmsl-image-build.yml
+++ b/.github/workflows/gmsl-image-build.yml
@@ -7,6 +7,7 @@
         required: true
         type: string
 
+permissions: {}
 jobs:
   build:
     runs-on: ubuntu-latest
EOF
@@ -7,6 +7,7 @@
required: true
type: string

permissions: {}
jobs:
build:
runs-on: ubuntu-latest
Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants