Skip to content

Commit 70873f4

Browse files
GAdityaVarmarjrudin
authored andcommitted
SECCMP-1797: Harden permissions - add top-level read, fix contents: write
Adds top-level permissions: contents: read to restrict the default GITHUB_TOKEN. Also fixes the previous contents: write on the copyright-validation job to contents: read. This follows the principle of least privilege recommended in GitHub's PwnRequest security guidance.
1 parent 17558bc commit 70873f4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/pr-workflow.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
name: PR Workflow
22

33
on:
4-
# Using pull_request_target instead of pull_request to handle PRs from forks
54
pull_request_target:
65
types: [opened, edited, reopened, synchronize]
7-
# No branch filtering - will run on all PRs
6+
7+
permissions:
8+
contents: read
89

910
jobs:
1011
jira-pr-check:
1112
name: 🏷️ Validate JIRA ticket ID
12-
# Use the reusable workflow from the central repository
1313
uses: marklogic/pr-workflows/.github/workflows/jira-id-check.yml@main
1414
with:
15-
# Pass the PR title from the event context
1615
pr-title: ${{ github.event.pull_request.title }}
1716
copyright-validation:
1817
name: © Validate Copyright Headers

0 commit comments

Comments
 (0)