Skip to content
Merged
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
10 changes: 10 additions & 0 deletions .github/workflows/postsubmit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Hydrate Go Proxy

on:
push:
branches:
- main

jobs:
call-hydrate-go-proxy:
uses: aws-controllers-k8s/.github/.github/workflows/reusable-postsubmit.yaml@main

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 8 days ago

To fix the problem, we should add an explicit permissions block to the job definition (or at the workflow root), specifying only the minimal permissions required. Because this workflow delegates work to a reusable workflow using uses:, the permissions in this file control what is granted to the called workflow unless it further restricts them. As a safe minimal default, set all permissions to read (or none if absolutely no access is needed), and grant more if the called workflow requires it. The best place to insert the permissions block for a single-job workflow is at the job level, just before (or after) the uses line in job definition. Since we don't know the specific needs of the called workflow, we should use the recommended least privilege starting point, such as:

permissions:
  contents: read

If you know more is needed, you could expand this. For now, insert this block under the job call-hydrate-go-proxy:.


Suggested changeset 1
.github/workflows/postsubmit.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/postsubmit.yaml b/.github/workflows/postsubmit.yaml
--- a/.github/workflows/postsubmit.yaml
+++ b/.github/workflows/postsubmit.yaml
@@ -7,4 +7,6 @@
 
 jobs:
   call-hydrate-go-proxy:
+    permissions:
+      contents: read
     uses: aws-controllers-k8s/.github/.github/workflows/reusable-postsubmit.yaml@main
EOF
@@ -7,4 +7,6 @@

jobs:
call-hydrate-go-proxy:
permissions:
contents: read
uses: aws-controllers-k8s/.github/.github/workflows/reusable-postsubmit.yaml@main
Copilot is powered by AI and may make mistakes. Always verify output.
Loading
Loading