Skip to content

Commit

Permalink
[PERF-324] Improve Workflow Permissions (#105)
Browse files Browse the repository at this point in the history
* Improve Workflow Permissions

* set checks: write

* removed redundant read permissions
  • Loading branch information
chrisgocode authored Jun 11, 2024
1 parent 38f7d37 commit 9fcf489
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/Package_pre_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ name: Package Pre-Release-Code
on:
workflow_dispatch:

permissions: read-all

env:
PACKAGE_NAME: Suite_3_Performance_Test_Suite_Package_Pre-Release

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ on:
branches:
- main

permissions: read-all

jobs:
analyze:
name: Analyze Code
runs-on: ubuntu-latest
env:
SRC_DIR: src/edfi-paging-test
permissions:
actions: read
contents: read
security-events: write

strategy:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
paths:
- 'src/**'

permissions: read-all

jobs:
scan-actions:
name: Scan Actions
Expand All @@ -21,8 +23,6 @@ jobs:
name: Analyze Code Dependencies
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/edfi_paging_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ on:
- main
workflow_dispatch:

permissions: read-all

jobs:
test-edfi-paging-test:
name: Run unit, style, and type checks
Expand All @@ -25,6 +27,9 @@ jobs:
PACKAGE_NAME: edfi-paging-test
SRC_DIR: src/edfi-paging-test
LOCK_FILE: src/edfi-paging-test/poetry.lock
permissions:
checks: write

steps:
- name: Checkout code
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/edfi_performance_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ on:
- main
workflow_dispatch:

permissions: read-all

jobs:
test-edfi-performance-test:
name: Run unit, style, and type checks
Expand All @@ -25,6 +27,9 @@ jobs:
PACKAGE_NAME: edfi-performance-test
SRC_DIR: src/edfi-performance-test
LOCK_FILE: src/edfi-performance-test/poetry.lock
permissions:
checks: write

steps:
- name: Checkout code
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/start-VM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ name: Start Azure VM
on:
workflow_dispatch:

permissions: read-all

env:
AzureADServicePrincipalPassword: ${{ secrets.AZURE_SERVICE_PRINCIPAL_PASSWORD }}
AzureADApplicationId: ${{ vars.AZURE_SERVICE_APPLICATION_ID }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/stop-VM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ name: Stop Azure VM
on:
workflow_dispatch:

permissions: read-all

env:
AzureADServicePrincipalPassword: ${{ secrets.AZURE_SERVICE_PRINCIPAL_PASSWORD }}
AzureADApplicationId: ${{ vars.AZURE_SERVICE_APPLICATION_ID }}
Expand Down

0 comments on commit 9fcf489

Please sign in to comment.