Skip to content

Commit

Permalink
GitHub Workflows security hardening (#1249)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashashura committed Sep 25, 2022
1 parent 91d69ad commit 2aca54c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
prepare-yarn-cache-ubuntu:
uses: ./.github/workflows/prepare-cache.yml
Expand Down Expand Up @@ -125,6 +128,9 @@ jobs:
'echo "::error file={}::This needs to be regenerated by running \`tools:regenerate-docs\`" && false'
release:
permissions:
contents: write # for semantic-release

if:
# prettier-ignore
${{ github.event_name == 'push' && (github.event.ref == 'refs/heads/main' || github.event.ref == 'refs/heads/next') }}
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@ on:
- cron: '0 0 * * SUN'
workflow_dispatch:

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
test:
permissions:
contents: read # to fetch code (actions/checkout)
issues: write # to create comment
pull-requests: read # for searching pull requests

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit 2aca54c

Please sign in to comment.