Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

GitHub Workflows security hardening (#11343)

Alex080b92124077
diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.yml
index 2f9e580bfcd..45a69062707 100644
--- a/.github/workflows/crowdin.yml
+++ b/.github/workflows/crowdin.yml
@@ -4,6 +4,7 @@ on:
schedule:
- cron: '0 3 * * *' # Daily at 03:00
+permissions: {}
jobs:
setup:
runs-on: ubuntu-latest
@@ -28,6 +29,9 @@ jobs:
echo "::set-output name=crowdin_release_branch::release"
crowdin:
+ permissions:
+ contents: write # for git push
+
runs-on: ubuntu-latest
needs: setup
timeout-minutes: 60
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index c76c12e581a..e36498c59fd 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -7,6 +7,10 @@ on:
push:
tags:
- v*
+
+permissions:
+ contents: read # to fetch code (actions/checkout)
+
jobs:
publish:
# restrict this job to base repo for now
diff --git a/.github/workflows/pullpreview.yml b/.github/workflows/pullpreview.yml
index 345c8769ae7..aba4e13f9fc 100644
--- a/.github/workflows/pullpreview.yml
+++ b/.github/workflows/pullpreview.yml
@@ -7,8 +7,17 @@ on:
pull_request:
types: [labeled, unlabeled, synchronize, closed, reopened]
+permissions:
+ contents: read # to fetch code (actions/checkout)
+
jobs:
deploy:
+ permissions:
+ contents: read # to fetch code (actions/checkout)
+ deployments: write # to delete deployments
+ pull-requests: write # to remove labels
+ statuses: write # to create commit status
+
if: github.repository == 'opf/openproject' && ( github.event_name == 'schedule' || github.event_name == 'push' || github.event.label.name == 'pullpreview' || contains(github.event.pull_request.labels.*.name, 'pullpreview') )
runs-on: ubuntu-latest
timeout-minutes: 30