Skip to content

Commit

Permalink
[core] Harden GitHub Actions permissions (#1161)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Oct 15, 2022
1 parent adad83d commit 350f885
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
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
5 changes: 4 additions & 1 deletion .github/workflows/no-response.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: No Response
name: No response

# Both `issue_comment` and `scheduled` event types are required for this Action
# to work properly.
Expand All @@ -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
4 changes: 3 additions & 1 deletion .github/workflows/release-docker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Release Docker images'
name: Release Docker images

on:
workflow_dispatch:
Expand All @@ -16,6 +16,8 @@ jobs:
docker-release:
name: 'retag and push'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Debug
run: |
Expand Down

0 comments on commit 350f885

Please sign in to comment.