Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/trigger-konflux-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Trigger Konflux build
on:
workflow_dispatch:

jobs:
trigger-konflux-build:
uses: securesign/actions/.github/workflows/trigger-konflux-build.yaml@main
with:
branch: main
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
Comment on lines +7 to +11

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 3 months ago

To fix this problem, we should add a permissions key at the job level (within the trigger-konflux-build job) or at the workflow root. Since this workflow simply triggers a reusable workflow, the safest starting point is to restrict permissions to read-only, unless there are explicit reasons for broader access. The minimal appropriate block is usually contents: read, which provides read access to the repository code, or an even more restrictive block if possible (e.g., none). The explicit block prevents the GITHUB_TOKEN from being granted unnecessary privileges for this triggering job. The change is to insert the permissions: key immediately above or within the job definition.


Suggested changeset 1
.github/workflows/trigger-konflux-build.yaml

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/trigger-konflux-build.yaml b/.github/workflows/trigger-konflux-build.yaml
--- a/.github/workflows/trigger-konflux-build.yaml
+++ b/.github/workflows/trigger-konflux-build.yaml
@@ -4,6 +4,8 @@
 
 jobs:
   trigger-konflux-build:
+    permissions:
+      contents: read
     uses: securesign/actions/.github/workflows/trigger-konflux-build.yaml@main
     with:
       branch: main
EOF
@@ -4,6 +4,8 @@

jobs:
trigger-konflux-build:
permissions:
contents: read
uses: securesign/actions/.github/workflows/trigger-konflux-build.yaml@main
with:
branch: main
Copilot is powered by AI and may make mistakes. Always verify output.
2 changes: 1 addition & 1 deletion internal/constants/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ var (
// ModelTransparencyCliImage is the default image for the model transparency CLI
// used as an init container to validate model signatures
ModelTransparencyCliImage = "registry.redhat.io/rhtas/model-transparency-rhel9@" +
"sha256:6db7fa2b956875a6f507811166b47b164d463dea78ab4403c6d7648d838b8acb"
"sha256:9de7bb01cf83f4f65a361f874fc2171a79143a07d3dee17588a4e24d89939bdc"
)
Loading