Przeglądaj źródła

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

Arpit Jain 1 miesiąc temu
rodzic
commit
2042a040f1

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

@@ -10,6 +10,9 @@ on:
       - main
       - main
       - minor
       - minor
 
 
+permissions:
+  contents: read
+
 jobs:
 jobs:
   test:
   test:
     if: ${{ ! startsWith(github.event.head_commit.message, 'release:') && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) }}
     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:
   issue_comment:
     types: [created]
     types: [created]
 
 
+permissions:
+  contents: read
+  issues: write
+  pull-requests: read
+
 jobs:
 jobs:
   trigger:
   trigger:
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest