Skip to content

Commit e50c278

Browse files
authored
Merge pull request DSpace#1938 from tdonohue/harden_github_workflows
GitHub Workflows security hardening (for dspace-angular)
2 parents 8e87266 + d0bcf5e commit e50c278

4 files changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ name: Build
66
# Run this Build for all pushes / PRs to current branch
77
on: [push, pull_request]
88

9+
permissions:
10+
contents: read # to fetch code (actions/checkout)
11+
912
jobs:
1013
tests:
1114
runs-on: ubuntu-latest

.github/workflows/docker.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
- 'dspace-**'
1313
pull_request:
1414

15+
permissions:
16+
contents: read # to fetch code (actions/checkout)
17+
1518
jobs:
1619
docker:
1720
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'

.github/workflows/issue_opened.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
issues:
66
types: [opened]
77

8+
permissions: {}
89
jobs:
910
automation:
1011
runs-on: ubuntu-latest

.github/workflows/label_merge_conflicts.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ on:
1111
pull_request_target:
1212
types: [ synchronize ]
1313

14+
permissions: {}
15+
1416
jobs:
1517
triage:
1618
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
1719
if: github.repository == 'dspace/dspace-angular'
1820
runs-on: ubuntu-latest
1921
permissions:
20-
issues: write
2122
pull-requests: write
2223
steps:
2324
# See: https://github.com/prince-chrismc/label-merge-conflicts-action

0 commit comments

Comments
 (0)