Repository navigation
ci: build and smoke-test pushes and pull requests - #15
Conversation
The build lives in build-xm.yml on the openipc branch, and GitHub takes a pull request's workflows from the PR's own tree, so nothing ran on this branch. This caller runs build-xm.yml@openipc on github.sha -- for a pull request the merge of the PR into the current base, for a push the pushed commit -- every SoC built and smoke-tested under qemu-hisilicon. It cannot release: that workflow uploads only on workflow_dispatch. Force-added, as on openipc-hisilicon: mainline's .gitignore `.*` rule covers .github.
PR Summary by QodoRun XM builds and smoke tests on pushes and pull requests
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1. Pull requests can request identity tokens
|
| permissions: | ||
| contents: write | ||
| id-token: write |
There was a problem hiding this comment.
1. Pull requests can request identity tokens 🐞 Bug ⛨ Security
The build job grants id-token: write and contents: write to the reusable workflow on both push and pull_request events, although this caller does not dispatch a release. For a pull request targeting openipc-xm, the called workflow has permission to request an identity token; the stated upload guard does not restrict that permission.
Agent Prompt
## Issue description
The CI caller grants publish-level permissions to the reusable workflow during pull-request builds, even though this caller is not intended to publish.
## Fix Focus Areas
- .github/workflows/ci.yml[14-25]
## Recommended Fix
Separate the reusable workflow's build and publish paths so this caller can invoke the build path with read-only contents permission and without ID-token permission. Keep elevated permissions on the dispatch-only publishing path.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Adds the
ci.ymlcaller, the same asopenipc-hisilicon's. It runsbuild-xm.yml@openipc(#14) ongithub.sha, so pushes and PRs toopenipc-xmare built and smoke-tested under qemu-hisilicon. It never releases; the workflow uploads only on dispatch. This PR's own run is the first CI run of the branch.