Skip to content

Commit

Permalink
chore(ci): restrict workflow permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
ewanharris committed Nov 5, 2024
1 parent 29c1b72 commit fbbe656
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/clients/dotnet/config.overrides.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
"hashCodeMultiplierPrimeNumber": 9923,
"supportsOpenTelemetry": true,
"files": {
".github/workflows/main.yaml.mustache": {
"destinationFilename": ".github/workflows/main.yaml",
"templateType": "SupportingFiles"
},
"Client_OAuth2Client.mustache": {
"destinationFilename": "src/OpenFga.Sdk/ApiClient/OAuth2Client.cs",
"templateType": "SupportingFiles"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -81,6 +84,9 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v')
needs: publish

permissions:
contents: write

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
Expand Down
4 changes: 4 additions & 0 deletions config/common/files/.github/workflows/semgrep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ on:
push:
branches:
- main

permissions:
contents: read

jobs:
semgrep:
name: Scan
Expand Down

0 comments on commit fbbe656

Please sign in to comment.