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 #6565

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ env:
# Controls when the action will run.
on: [push, pull_request]

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

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@ name: Deploy TerriaMap

on: push

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

jobs:
deploy:
permissions:
contents: read # to fetch code (actions/checkout)
statuses: write # to create commit status (ci-deploy.sh)

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ on:
env:
NPM_TAG: latest

permissions: {}
jobs:
publish:
permissions:
contents: write # to create and push a tag
actions: read # to list jobs for workflow run (8398a7/action-slack)

name: Publish to NPM
runs-on: ubuntu-latest

Expand Down