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

fix: address security risks in GitHub Actions workflows #1651

Merged
merged 4 commits into from
Feb 12, 2025
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Tests
permissions:
contents: read
runs-on: ubuntu-22.04
steps:
- name: Checkout Repo
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: 'yarn'

- name: Install Dependencies
run: yarn install --frozen-lockfile
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/style-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on: [push, pull_request_target]
jobs:
eslint_check_upload:
runs-on: ubuntu-latest
permissions:
contents: read
name: ESLint Check and Report Upload

steps:
Expand Down Expand Up @@ -36,6 +38,8 @@ jobs:
annotation:
# Skip the annotation action in push events
if: github.event_name == 'pull_request_target'
permissions:
checks: write
needs: eslint_check_upload
runs-on: ubuntu-latest
name: ESLint Annotation
Expand All @@ -52,6 +56,8 @@ jobs:
prettier_check:
# In the forked PR, it's hard to format code and push to the branch directly, so the action only check the format correctness.
if: github.event_name != 'push' && github.event.pull_request.head.repo.full_name != 'rrweb-io/rrweb'
permissions:
contents: read
runs-on: ubuntu-latest
name: Format Check
steps:
Expand All @@ -73,6 +79,8 @@ jobs:
# Skip the format code action in forked PRs
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == 'rrweb-io/rrweb'
runs-on: ubuntu-latest
permissions:
contents: write
name: Format Code
steps:
- uses: actions/checkout@v3
Expand Down
Loading