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

Lock down GitHub workflows #807

Merged
merged 3 commits into from
Mar 22, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/lazy-ants-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"skuba": patch
---

template/oss-npm-package: Lock down GitHub workflow permissions

This aligns with [OpenSSF guidance](https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions).
7 changes: 6 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@
name: CodeQL

on:
push:
pull_request:
push:
schedule:
- cron: '0 22 * * 0'

permissions: {}

jobs:
analyze:
name: Analyze
permissions:
actions: read
security-events: write
runs-on: ubuntu-latest

strategy:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- beta
- master

permissions: {}

jobs:
release:
name: Publish & Deploy
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ on:
workflows:
- Release

permissions: {}

jobs:
core:
name: Lint & Test
permissions:
checks: write
runs-on: ubuntu-latest
steps:
- name: Check out repo
Expand Down
4 changes: 4 additions & 0 deletions template/oss-npm-package/.github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ on:
- beta
- master

permissions: {}

jobs:
release:
name: Publish & Deploy
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Check out repo
Expand Down
4 changes: 4 additions & 0 deletions template/oss-npm-package/.github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ on:
- pull_request
- push

permissions: {}

jobs:
validate:
name: Lint & Test
permissions:
checks: write
runs-on: ubuntu-latest
steps:
- name: Check out repo
Expand Down