ci: add shared security scanning workflow#2251
Conversation
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
e8e0d48 to
b0765a5
Compare
b0765a5 to
1cc5535
Compare
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Adds Zizmor security scanning via the OpenTelemetry shared workflow and adjusts existing GitHub Actions workflows to remediate Zizmor findings (token/credentials hardening and template-injection-safe variable usage).
Changes:
- Added a new
zizmorworkflow that uploads SARIF results to GitHub code scanning using a pinned shared workflow. - Updated multiple workflows to set
persist-credentials: falseon checkout (and targeted exceptions) and tightened GitHub App token permissions. - Adjusted shell argument interpolation in workflows/actions to address template injection / env findings and added “zizmor” to cspell.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/zizmor.yml | Introduces Zizmor scanning via the pinned OpenTelemetry reusable workflow with restricted permissions. |
| .github/workflows/renovate-semconv.yml | Changes checkout credential persistence and switches branch push strategy (no longer using an app token). |
| .github/workflows/release-retry.yml | Disables persisted checkout credentials to reduce token exposure. |
| .github/workflows/release-request.yml | Disables persisted checkout credentials; tightens app token permissions. |
| .github/workflows/release-request-weekly.yml | Disables persisted checkout credentials; tightens app token permissions; avoids expression interpolation in shell arg. |
| .github/workflows/release-perform.yml | Disables persisted checkout credentials to reduce token exposure. |
| .github/workflows/release-hook-on-push.yml | Disables persisted checkout credentials to reduce token exposure. |
| .github/workflows/release-hook-on-closed.yml | Disables persisted checkout credentials; avoids expression interpolation in shell arg. |
| .github/workflows/fossa.yml | Disables persisted checkout credentials to reduce token exposure. |
| .github/workflows/conventional-commits.yml | Disables persisted checkout credentials to reduce token exposure. |
| .github/workflows/ci.yml | Disables persisted checkout credentials across CI jobs. |
| .github/workflows/ci-markdownlint.yml | Disables persisted checkout credentials to reduce token exposure. |
| .github/workflows/ci-markdown-link.yml | Disables persisted checkout credentials to reduce token exposure. |
| .github/workflows/ci-example-dice-roller.yml | Disables persisted checkout credentials to reduce token exposure. |
| .github/workflows/ci-build-docker.yml | Disables persisted checkout credentials to reduce token exposure. |
| .github/actions/test_dice_roller/action.yml | Adds Zizmor ignore annotation for $GITHUB_ENV usage in a composite action. |
| .cspell.yml | Adds “zizmor” to dictionary to avoid spellcheck failures. |
Comments suppressed due to low confidence (1)
.github/workflows/renovate-semconv.yml:1
- This workflow now pushes using the persisted
GITHUB_TOKENcredentials (the GitHub App token step was removed). Pushes performed withGITHUB_TOKENtypically do not trigger other GitHub Actions workflows, which can change downstream automation behavior compared to using an app token. If follow-on workflows (or other automations) are expected to run on these pushes, consider reintroducingactions/create-github-app-tokenwith explicit minimal permissions (as done in the release workflows), and use that token forgit pushinstead of relying on persisted credentials.
name: Renovate Semantic Conventions Post-Update
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Tracked in open-telemetry/sig-security#293.
Adds zizmor scanning through the OpenTelemetry shared workflow.
The workflow:
regularpersona on pull requests, pushes tomain, and a randomized weekly schedule;After merge
zizmorcode-scanning result.If enforcement unexpectedly blocks a valid change, restore
require_zizmor = falseinopen-telemetry/adminwhile leaving scanning enabled.