Skip to content

Commit

Permalink
[core] Harden GitHub Actions permissions (#34769)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Oct 19, 2022
1 parent 9f2711b commit b9ab567
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/check-if-pr-has-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ jobs:
test-label-applied:
# Tests that label is added on the PR
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: mnajdova/[email protected]
with:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/maintenance.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: 'Maintenance'
name: Maintenance

on:
# So that PRs touching the same files as the push are updated
push:
Expand All @@ -20,6 +21,9 @@ jobs:
# We rely on other pushes to mark these branches as outdated.
if: ${{ github.actor != 'l10nbot' }}
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- run: echo "${{ github.actor }}"
- name: check if prs are dirty
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Issue Mark Duplicate
name: Mark duplicate

on:
issue_comment:
Expand All @@ -7,6 +7,10 @@ on:
jobs:
mark-duplicate:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
pull-requests: write
steps:
- name: mark-duplicate
uses: actions-cool/issues-helper@v3
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/no-response.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
jobs:
noResponse:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: lee-dohm/[email protected]
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/support-stackoverflow.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Configuration for support-requests - https://github.com/dessant/support-requests
name: 'Support Stack Overflow'
name: Support Stack Overflow

on:
issues:
types: [labeled, unlabeled, reopened]

permissions:
issues: write

jobs:
mark-support:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- uses: dessant/support-requests@v2
with:
Expand Down

0 comments on commit b9ab567

Please sign in to comment.