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
13 changes: 13 additions & 0 deletions .github/workflows/add-help-wanted.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Add Help Wanted Label

on:
issues:
types: [labeled]

permissions:
issues: write

jobs:
label:
uses: kubestellar/infra/.github/workflows/reusable-add-help-wanted.yml@main
secrets: inherit
12 changes: 12 additions & 0 deletions .github/workflows/assignment-helper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Assignment Helper

on:
issue_comment:
types: [created]

permissions:
issues: write

jobs:
assignment-helper:
uses: kubestellar/infra/.github/workflows/reusable-assignment-helper.yml@main
14 changes: 14 additions & 0 deletions .github/workflows/feedback.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Feedback Wanted

on:
pull_request:
types: [closed]

permissions:
contents: read
pull-requests: write

jobs:
feedback:
uses: kubestellar/infra/.github/workflows/reusable-feedback.yml@main
secrets: inherit
17 changes: 17 additions & 0 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Greetings

on:
pull_request_target:
types: [opened, reopened]
issues:
types: [opened, reopened]

permissions:
contents: read
issues: write
pull-requests: write

jobs:
greet:
uses: kubestellar/infra/.github/workflows/reusable-greetings.yml@main
secrets: inherit
15 changes: 15 additions & 0 deletions .github/workflows/label-helper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Label Helper

on:
issue_comment:
types: [created]

permissions:
contents: read
issues: write
pull-requests: write

jobs:
label-helper:
uses: kubestellar/infra/.github/workflows/reusable-label-helper.yml@main
secrets: inherit
14 changes: 14 additions & 0 deletions .github/workflows/pr-verifier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: PR Verifier

on:
pull_request_target:
types: [opened, edited, synchronize, reopened]

permissions:
checks: write
pull-requests: read

jobs:
verify:
uses: kubestellar/infra/.github/workflows/reusable-pr-verifier.yml@main
secrets: inherit
13 changes: 13 additions & 0 deletions .github/workflows/pr-verify-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "PR Title Verifier"

on:
pull_request:
types: [opened, edited, synchronize, reopened]

permissions:
contents: read

jobs:
verify:
uses: kubestellar/infra/.github/workflows/reusable-pr-verify-title.yml@main
secrets: inherit
14 changes: 14 additions & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: OpenSSF Scorecard

on:
branch_protection_rule:
schedule:
- cron: '0 6 * * 1'
push:
branches: [ "main" ]
workflow_dispatch:

jobs:
analysis:
uses: kubestellar/infra/.github/workflows/reusable-scorecard.yml@main
secrets: inherit
Comment on lines +13 to +14

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 the problem, explicitly declare permissions so that the GITHUB_TOKEN granted to this workflow/job is minimized instead of inheriting potentially read‑write defaults. For a read‑only analysis workflow that invokes a scorecard check, the usual baseline is contents: read at the workflow root, which applies to all jobs unless overridden.

The best fix without changing existing functionality is to add a permissions block at the top level of .github/workflows/scorecard.yml, immediately after the name: line (or anywhere at the root level, before jobs:). This will ensure the analysis job runs with read‑only access to repository contents, which is sufficient for security/scorecard analysis and avoids unnecessary write privileges. No imports or additional methods are required, since this is just a YAML configuration change.

Concretely:

  • Edit .github/workflows/scorecard.yml.
  • Insert:
permissions:
  contents: read
  • Place it between line 1 (name: OpenSSF Scorecard) and the on: block at line 3 (or equivalently between the blank line following the name and on:), keeping indentation consistent.
Suggested changeset 1
.github/workflows/scorecard.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/scorecard.yml b/.github/workflows/scorecard.yml
--- a/.github/workflows/scorecard.yml
+++ b/.github/workflows/scorecard.yml
@@ -1,5 +1,8 @@
 name: OpenSSF Scorecard
 
+permissions:
+  contents: read
+
 on:
   branch_protection_rule:
   schedule:
EOF
@@ -1,5 +1,8 @@
name: OpenSSF Scorecard

permissions:
contents: read

on:
branch_protection_rule:
schedule:
Copilot is powered by AI and may make mistakes. Always verify output.
Loading