Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/codegen.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
on:

Check warning on line 1 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

codegen.yml:1: overly broad permissions: default permissions used due to no permissions: block
schedule:
# daily at 12:30 am
- cron: '30 0 * * *'
Expand All @@ -6,20 +6,20 @@

name: codegen
jobs:
discovery:

Check warning on line 9 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

codegen.yml:9: overly broad permissions: default permissions used due to no permissions: block
uses: googleapis/discovery-artifact-manager/.github/workflows/list-services.yml@master

Check failure on line 10 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

codegen.yml:10: unpinned action reference: action is not pinned to a hash (required by blanket policy)
batch:

Check warning on line 11 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

codegen.yml:11: overly broad permissions: default permissions used due to no permissions: block
runs-on: ubuntu-24.04
needs: discovery
outputs:
services: ${{ steps.chunk.outputs.result }}
steps:
- uses: actions/github-script@v9

Check failure on line 17 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

codegen.yml:17: unpinned action reference: action is not pinned to a hash (required by blanket policy)
id: chunk
with:
script: |
console.log('splitting service names list into batches')
const services = ${{ needs.discovery.outputs.services }}

Check failure on line 22 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/template-injection

code injection via template expansion: may expand into attacker-controllable code
const result = {
"one": [],
"two": [],
Expand All @@ -31,7 +31,7 @@
}
}
return result
generate_batch1:

Check warning on line 34 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

codegen.yml:34: overly broad permissions: default permissions used due to no permissions: block
runs-on: ubuntu-24.04
needs: batch
strategy:
Expand All @@ -40,24 +40,24 @@
matrix:
service: ${{fromJson(needs.batch.outputs.services).one}}
steps:
- run: echo generating ${{ matrix.service }}

Check failure on line 43 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/template-injection

code injection via template expansion: may expand into attacker-controllable code

Check failure on line 43 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

template-injection

codegen.yml:43: code injection via template expansion: may expand into attacker-controllable code
- uses: actions/checkout@v7

Check failure on line 44 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

codegen.yml:44: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
fetch-depth: 1
path: google-api-php-client-services
- uses: actions/checkout@v7

Check failure on line 48 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

codegen.yml:48: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
repository: googleapis/discovery-artifact-manager
fetch-depth: 1
path: discovery-artifact-manager
- uses: actions/setup-python@v6
- uses: actions/setup-python@v7
with:
python-version: "3.14"
- id: find-preferred-versions
run: |
versions=$( cat discovery-artifact-manager/discoveries/index.json | jq -r '[.items[] | select(.name == "${{ matrix.service }}") | select(.name == "admin" or .preferred).version] | join(",")' )

Check failure on line 58 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/template-injection

code injection via template expansion: may expand into attacker-controllable code

Check failure on line 58 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

template-injection

codegen.yml:58: code injection via template expansion: may expand into attacker-controllable code
echo "::set-output name=versions::$versions"
- run: ./google-api-php-client-services/.github/workflows/generate.sh ${{ matrix.service }} ${{ steps.find-preferred-versions.outputs.versions }}

Check failure on line 60 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/template-injection

code injection via template expansion: may expand into attacker-controllable code

Check failure on line 60 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/template-injection

code injection via template expansion: may expand into attacker-controllable code

Check failure on line 60 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

template-injection

codegen.yml:60: code injection via template expansion: may expand into attacker-controllable code
- uses: googleapis/code-suggester@v5
env:
ACCESS_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
Expand All @@ -74,7 +74,7 @@
force: true
fork: true

generate_batch2:

Check warning on line 77 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

codegen.yml:77: overly broad permissions: default permissions used due to no permissions: block
runs-on: ubuntu-24.04
needs: batch
strategy:
Expand All @@ -83,7 +83,7 @@
matrix:
service: ${{fromJson(needs.batch.outputs.services).two}}
steps:
- run: echo generating ${{ matrix.service }}

Check failure on line 86 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/template-injection

code injection via template expansion: may expand into attacker-controllable code

Check failure on line 86 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

template-injection

codegen.yml:86: code injection via template expansion: may expand into attacker-controllable code
- uses: actions/checkout@v7
with:
fetch-depth: 1
Expand All @@ -93,14 +93,14 @@
repository: googleapis/discovery-artifact-manager
fetch-depth: 1
path: discovery-artifact-manager
- uses: actions/setup-python@v6
- uses: actions/setup-python@v7
with:
python-version: "3.14"
- id: find-preferred-versions
run: |
versions=$( cat discovery-artifact-manager/discoveries/index.json | jq -r '[.items[] | select(.name == "${{ matrix.service }}") | select(.name == "admin" or .preferred).version] | join(",")' )

Check failure on line 101 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/template-injection

code injection via template expansion: may expand into attacker-controllable code

Check failure on line 101 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

template-injection

codegen.yml:101: code injection via template expansion: may expand into attacker-controllable code
echo "::set-output name=versions::$versions"
- run: ./google-api-php-client-services/.github/workflows/generate.sh ${{ matrix.service }} ${{ steps.find-preferred-versions.outputs.versions }}

Check failure on line 103 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/template-injection

code injection via template expansion: may expand into attacker-controllable code

Check failure on line 103 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/template-injection

code injection via template expansion: may expand into attacker-controllable code

Check failure on line 103 in .github/workflows/codegen.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

template-injection

codegen.yml:103: code injection via template expansion: may expand into attacker-controllable code
- uses: googleapis/code-suggester@v5
env:
ACCESS_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test Suite

Check warning on line 1 in .github/workflows/tests.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

tests.yml:1: overly broad permissions: default permissions used due to no permissions: block
on:
push:
branches:
Expand All @@ -6,7 +6,7 @@
pull_request:

jobs:
test:

Check warning on line 9 in .github/workflows/tests.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

tests.yml:9: overly broad permissions: default permissions used due to no permissions: block
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -30,13 +30,13 @@
command: composer install
- name: Run Script
run: vendor/bin/phpunit
generator:

Check warning on line 33 in .github/workflows/tests.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

tests.yml:33: overly broad permissions: default permissions used due to no permissions: block
runs-on: ubuntu-24.04
name: Generator Unit Tests
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: "3.14"
- name: Install dependencies
Expand All @@ -46,7 +46,7 @@
- name: Run Tests
run: |
bash generator/run_tests.sh
casing:

Check warning on line 49 in .github/workflows/tests.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

tests.yml:49: overly broad permissions: default permissions used due to no permissions: block
runs-on: macos-latest
strategy:
matrix:
Expand Down
Loading