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

chore(OSSF): update token permissions to improve ossf scorecard #763

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ on:
branches: [ main ]

permissions:
contents: read
pull-requests: write
actions: read
statuses: write

jobs:
build:
Expand Down Expand Up @@ -83,5 +86,3 @@ jobs:
wait-on: "http://localhost:3000"
wait-on-timeout: 120
run: npm run cypress:run


3 changes: 3 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ on:
- cron: '25 10 * * 1'

permissions:
security-events: write
contents: read
actions: read
statuses: write

jobs:
analyze:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ permissions:
jobs:
dependency-review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ name: Code Cleanliness

on: [pull_request]

env: # environment variables (available in any part of the action)
NODE_VERSION: 18

permissions:
contents: read
pull-requests: none
actions: read

env: # environment variables (available in any part of the action)
NODE_VERSION: 18

jobs:
linting:
Expand Down Expand Up @@ -34,4 +36,4 @@ jobs:
- name: Code Linting
run: |
npm run lint
npm run lint --workspaces --if-present
npm run lint --workspaces --if-present
2 changes: 2 additions & 0 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ name: Publish to NPM
on:
release:
types: [published]

permissions:
contents: read
actions: read

jobs:
build:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ on:
push:
branches: [ "main" ]

# Declare default permissions as read only.
permissions: read-all
permissions:
contents: read
security-events: write
id-token: write

jobs:
analysis:
Expand Down
Loading