Skip to content

Commit

Permalink
Adjust permissions in GitHub Actions (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
btschwertfeger authored Mar 16, 2024
1 parent c32927c commit 15df270
Show file tree
Hide file tree
Showing 18 changed files with 39 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ on:
type: string
required: true

permissions: read-all

jobs:
Build:
runs-on: ${{ inputs.os }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/_build_doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ on:
type: string
required: true

permissions: read-all

jobs:
Build:
runs-on: ${{ inputs.os }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/_codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ on:
FUTURES_SANDBOX_SECRET:
required: true

permissions: read-all

jobs:
CodeCov:
name: Coverage
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/_codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ name: CodeQL
on:
workflow_call:

# Don't change this permissions. These must match those of the analyze job.
permissions:
actions: read
contents: read
security-events: write

jobs:
analyze:
name: Analyze
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/_pre_commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ name: Pre-Commit
on:
workflow_call:

permissions: read-all

jobs:
Pre-Commit:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/_pypi_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ on:
API_TOKEN:
required: true

permissions: read-all

jobs:
PyPI-Publish:
name: Upload to ${{ inputs.REPOSITORY_URL }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/_test_futures_private.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ on:
FUTURES_SANDBOX_SECRET:
required: true

permissions: read-all

jobs:
Test-Futures:
name: Test ${{ inputs.os }} ${{ inputs.python-version }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/_test_futures_public.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ on:
type: string
required: true

permissions: read-all

jobs:
Test-Futures:
name: Test ${{ inputs.os }} ${{ inputs.python-version }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/_test_nft_private.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ on:
SPOT_SECRET_KEY:
required: true

permissions: read-all

jobs:
Test-NFT:
name: Test ${{ inputs.os }} ${{ inputs.python-version }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/_test_nft_public.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ on:
type: string
required: true

permissions: read-all

jobs:
Test-NFT:
name: Test ${{ inputs.os }} ${{ inputs.python-version }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/_test_spot_private.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ on:
SPOT_SECRET_KEY:
required: true

permissions: read-all

jobs:
Test-Spot:
name: Test ${{ inputs.os }} ${{ inputs.python-version }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/_test_spot_public.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ on:
type: string
required: true

permissions: read-all

jobs:
Test-Spot:
name: Test ${{ inputs.os }} ${{ inputs.python-version }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/manual_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ name: PR Manual Build
on:
workflow_dispatch:

permissions: read-all

jobs:
Build:
uses: ./.github/workflows/_build.yaml
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/manual_codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ name: PR Manual CodeQL
on:
workflow_dispatch:

permissions: read-all

jobs:
CodeQL:
uses: ./.github/workflows/_codeql.yaml
2 changes: 2 additions & 0 deletions .github/workflows/manual_pre_commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ name: PR Manual Pre-Commit
on:
workflow_dispatch:

permissions: read-all

jobs:
Pre-Commit:
uses: ./.github/workflows/_pre_commit.yaml
2 changes: 2 additions & 0 deletions .github/workflows/manual_test_futures.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ name: PR Manual Test Futures
on:
workflow_dispatch:

permissions: read-all

jobs:
Test-Futures-Public:
uses: ./.github/workflows/_test_futures_public.yaml
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/manual_test_spot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ name: PR Manual Test Spot
on:
workflow_dispatch:

permissions: read-all

jobs:
Test-Spot-Public:
uses: ./.github/workflows/_test_spot_public.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# policy, and support documentation.

name: Scorecard supply-chain security

on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
Expand Down

0 comments on commit 15df270

Please sign in to comment.