ci: add shared security scanning workflow - #2356
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. |
There was a problem hiding this comment.
Pull request overview
Adds organization-standard Zizmor GitHub Actions security scanning (via OpenTelemetry shared workflows) and applies related workflow-hardening tweaks across existing CI automation (checkout credential persistence, action pinning, and minor workflow hygiene).
Changes:
- Add a new
.github/workflows/zizmor.ymlworkflow that runs the shared Zizmor scanner and uploads SARIF to GitHub code scanning. - Harden multiple workflows by setting
actions/checkouttopersist-credentials: falsewhere pushes are not needed, and add targeted Zizmor ignore metadata where appropriate. - Pin several third-party actions to immutable SHAs in the shared
.github/actions/setupcomposite action and add Dependabot update cooldown.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/zizmor.yml | Adds shared Zizmor scanning workflow with minimal permissions and SARIF upload. |
| .github/workflows/update-target-allocator-chart.yaml | Updates reusable-workflow invocation for chart updates (but currently drops secret inheritance). |
| .github/workflows/update-obi-chart.yaml | Updates reusable-workflow invocation for chart updates (but currently drops secret inheritance). |
| .github/workflows/ta-test.yaml | Disables persisted checkout credentials for a test workflow checkout. |
| .github/workflows/sync-readme.yaml | Disables persisted credentials for the read-only checkout; keeps persisted token where pushing is required. |
| .github/workflows/release.yaml | Disables persisted checkout credentials and refactors Helm registry login to use env vars. |
| .github/workflows/pre-commit.yaml | Disables persisted checkout credentials. |
| .github/workflows/operator-test.yaml | Disables persisted checkout credentials for operator test workflows. |
| .github/workflows/lint.yaml | Disables persisted checkout credentials. |
| .github/workflows/kube-stack-test.yaml | Disables persisted checkout credentials. |
| .github/workflows/fossa.yml | Disables persisted checkout credentials. |
| .github/workflows/ebpf-test.yaml | Disables persisted checkout credentials. |
| .github/workflows/ebpf-instrumentation-test.yaml | Disables persisted checkout credentials. |
| .github/workflows/demo-test.yaml | Disables persisted checkout credentials. |
| .github/workflows/collector-test.yaml | Disables persisted checkout credentials. |
| .github/dependabot.yml | Adds Dependabot update cooldown configuration. |
| .github/actions/setup/action.yaml | Pins setup actions to immutable SHAs (Helm, Python, chart-testing, kind). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
TylerHelmuth
left a comment
There was a problem hiding this comment.
Blocking because I dont want to accidentally merge in new private key change if we dont need it.
| secrets: | ||
| OTELBOT_PRIVATE_KEY: | ||
| required: true |
There was a problem hiding this comment.
The reusable workflow already uses OTELBOT_PRIVATE_KEY to create an OTelBot token. Previously, callers used secrets: inherit, which exposed every available repository secret. This PR narrows that to only OTELBOT_PRIVATE_KEY.
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.