Browse Source

chore(ci): set explicit least-privilege workflow permissions (#14809)

Arpit Jain 1 month ago
parent
commit
2042a040f1
2 changed files with 8 additions and 0 deletions
  1. 3 0
      .github/workflows/ci.yml
  2. 5 0
      .github/workflows/ecosystem-ci-trigger.yml

+ 3 - 0
.github/workflows/ci.yml

@@ -10,6 +10,9 @@ on:
       - main
       - minor
 
+permissions:
+  contents: read
+
 jobs:
   test:
     if: ${{ ! startsWith(github.event.head_commit.message, 'release:') && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) }}

+ 5 - 0
.github/workflows/ecosystem-ci-trigger.yml

@@ -4,6 +4,11 @@ on:
   issue_comment:
     types: [created]
 
+permissions:
+  contents: read
+  issues: write
+  pull-requests: read
+
 jobs:
   trigger:
     runs-on: ubuntu-latest