Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Workflows security hardening #13324

Merged
merged 4 commits into from Sep 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/close-stale.yml
Expand Up @@ -3,6 +3,10 @@ on:
schedule:
- cron: '*/10 * * * *'

permissions:
issues: write # to close stale issues (actions/stale)
pull-requests: write # to close stale PRs (actions/stale)

jobs:
stale:
name: 'Close month old issues and PRs'
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/issues.yml
Expand Up @@ -4,6 +4,9 @@ on:
issues:
types: [labeled]

permissions:
issues: write # to close issues (peter-evans/close-issue)

jobs:
questions:
name: Questions
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/lock.yml
Expand Up @@ -4,8 +4,13 @@ on:
schedule:
- cron: '0 0 * * *'

permissions: {}
jobs:
lock:
permissions:
issues: write # to lock issues (dessant/lock-threads)
pull-requests: write # to lock PRs (dessant/lock-threads)

runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v3
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/nodejs.yml
Expand Up @@ -12,6 +12,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