Skip to content

Commit 4379a23

Browse files
authored
[python] Explicitly define github workflow permissions (#21311)
* Explicitly define github workflow permissions (python) * Update samples
1 parent f735c6e commit 4379a23

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-0
lines changed

modules/openapi-generator/src/main/resources/python/github-workflow.mustache

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ name: {{packageName}} Python package
88

99
on: [push, pull_request]
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
build:
1316

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/.github/workflows/python.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ name: openapi_client Python package
77

88
on: [push, pull_request]
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
build:
1215

samples/client/echo_api/python/.github/workflows/python.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ name: openapi_client Python package
77

88
on: [push, pull_request]
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
build:
1215

samples/openapi3/client/petstore/python-aiohttp/.github/workflows/python.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ name: petstore_api Python package
77

88
on: [push, pull_request]
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
build:
1215

samples/openapi3/client/petstore/python/.github/workflows/python.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ name: petstore_api Python package
77

88
on: [push, pull_request]
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
build:
1215

0 commit comments

Comments
 (0)