Skip to content

Commit 2591cb1

Browse files
authored
Limit GitHub actions to repositories in jenkinsci GitHub org (#2587)
No permissions to push to the wiki from other repositories No permissions to push to the API viewer from other repositories No significant benefit to security scan on other repositories
1 parent c85d134 commit 2591cb1

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

.github/workflows/api-viewer.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ concurrency:
2020

2121
jobs:
2222
build:
23-
if: github.repository_owner == 'jenkinsci'
23+
# Only push to GitHub pages from repository in jenkinsci GitHub organization
24+
if: ${{ github.repository_owner == 'jenkinsci' }}
2425
runs-on: ubuntu-latest
2526
steps:
2627
- name: Checkout

.github/workflows/jenkins-security-scan.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ permissions:
1818

1919
jobs:
2020
security-scan:
21+
# Only run security scan from repository in jenkinsci GitHub organization
22+
if: ${{ github.repository_owner == 'jenkinsci' }}
2123
uses: jenkins-infra/jenkins-security-scan/.github/workflows/jenkins-security-scan.yaml@v2
2224
with:
2325
java-cache: 'maven' # Optionally enable use of a build dependency cache. Specify 'maven' or 'gradle' as appropriate.

.github/workflows/wiki.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ permissions:
1313

1414
jobs:
1515
push-to-wiki:
16+
# Only push to wiki from repository in jenkinsci GitHub organization
17+
if: ${{ github.repository_owner == 'jenkinsci' }}
1618
runs-on: ubuntu-latest
1719
steps:
1820
- name: Checkout repo

0 commit comments

Comments
 (0)