Skip to content

ci: add shared security scanning workflow - #2557

Closed
opentelemetrybot wants to merge 4 commits into
open-telemetry:mainfrom
opentelemetrybot:zizmor-rollout/batch-8-20260824
Closed

ci: add shared security scanning workflow#2557
opentelemetrybot wants to merge 4 commits into
open-telemetry:mainfrom
opentelemetrybot:zizmor-rollout/batch-8-20260824

Conversation

@opentelemetrybot

Copy link
Copy Markdown
Contributor

Tracked in open-telemetry/sig-security#293.

Adds zizmor scanning through the OpenTelemetry shared workflow.

The workflow:

  • runs the regular persona on pull requests, pushes to main, and a randomized weekly schedule;
  • uploads results to GitHub code scanning;
  • uses the shared workflow pinned to an immutable commit.

After merge

  1. Confirm the Zizmor workflow succeeds on the merged default-branch commit and its code-scanning analysis has no findings.
  2. Mark the corresponding admin PR ready for review and merge it to require zizmor code scanning.
  3. On the next repository pull request, confirm GitHub reports a required zizmor code-scanning result.

If enforcement unexpectedly blocks a valid change, restore require_zizmor = false in open-telemetry/admin while leaving scanning enabled.

@trask
trask requested a lite review from Copilot August 25, 2026 03:25
@github-actions github-actions Bot added the ci label Aug 25, 2026
@github-advanced-security

Copy link
Copy Markdown

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:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds repository-wide GitHub Actions security scanning via the OpenTelemetry shared zizmor reusable workflow, and applies related workflow hardening changes (credential persistence, safer shell interpolation, and tighter secret passing).

Changes:

  • Add a new .github/workflows/zizmor.yml workflow using the pinned OpenTelemetry shared zizmor workflow and uploading SARIF to code scanning.
  • Harden multiple workflows by disabling actions/checkout credential persistence, avoiding secrets: inherit where possible, and reducing risky expression interpolation in shell.
  • Add Dependabot cooldown configuration to reduce update PR churn.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/zizmor.yml Adds shared zizmor scanning workflow pinned to an immutable commit.
.github/workflows/release-layer-ruby.yml Disables checkout credential persistence; narrows secrets passed to reusable workflows; improves shell quoting for gh.
.github/workflows/release-layer-python.yml Disables checkout credential persistence; narrows secrets passed to reusable workflows; improves shell quoting for gh.
.github/workflows/release-layer-nodejs.yml Disables checkout credential persistence; narrows secrets passed to reusable workflows; improves shell quoting for gh.
.github/workflows/release-layer-java.yml Disables checkout credential persistence; narrows secrets passed to reusable workflows; improves shell quoting for gh.
.github/workflows/release-layer-collector.yml Disables checkout credential persistence; narrows secrets passed to reusable workflows; improves shell quoting for gh.
.github/workflows/publish-layer-collector.yml Hardens shell interpolation for dispatch inputs and build args; narrows secrets passed to layer publish workflow.
.github/workflows/pr-checks.yaml Adds zizmor suppression comment for pull_request_target trigger and disables checkout credential persistence.
.github/workflows/layer-publish.yml Declares workflow-call secrets; reduces risky interpolation by passing inputs via env in shell steps.
.github/workflows/integration-test.yml Declares required workflow-call secret for AWS role; reduces risky interpolation by passing inputs via env; disables checkout credential persistence.
.github/workflows/fossa.yml Disables checkout credential persistence.
.github/workflows/codeql.yml Disables checkout credential persistence.
.github/workflows/ci-terraform.yml Disables checkout credential persistence.
.github/workflows/ci-shellcheck.yml Disables checkout credential persistence.
.github/workflows/ci-python.yml Disables checkout credential persistence.
.github/workflows/ci-nodejs.yml Disables checkout credential persistence.
.github/workflows/ci-java.yml Disables checkout credential persistence.
.github/workflows/ci-collector.yml Disables checkout credential persistence; improves shell quoting.
.github/workflows/check-links.yaml Replaces read-all with explicit permissions; disables checkout credential persistence.
.github/dependabot.yml Adds cooldown.default-days settings across ecosystems.
.github/actions/build-collector-layer/action.yml Hardens shell interpolation for action inputs by passing via env and quoting.
Suppressed comments (1)

.github/workflows/publish-layer-collector.yml:146

  • The JSON emitted to $GITHUB_OUTPUT for release_jobs has the same quoting issue: the inner double quotes around architecture / aws_region are not escaped. This will break the shell quoting and/or produce invalid JSON, causing fromJSON(needs.prepare-release-jobs.outputs.release_jobs) to fail.
          fi
          echo "release_jobs={"architecture": ${architectures}, "aws_region": ${aws_regions}}" | tr -d '[:space:]' >> $GITHUB_OUTPUT
        env:
          GITHUB_EVENT_INPUTS_ARCHITECTURE: ${{ github.event.inputs.architecture }}
          GITHUB_EVENT_INPUTS_AWS_REGION: ${{ github.event.inputs.aws-region }}

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +85 to +89
architectures="[\"${GITHUB_EVENT_INPUTS_ARCHITECTURE}\"]"
fi
echo "build_jobs={"architecture": ${architectures}}" | tr -d '[:space:]' >> $GITHUB_OUTPUT
env:
GITHUB_EVENT_INPUTS_ARCHITECTURE: ${{ github.event.inputs.architecture }}

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.

Comment on lines +143 to +146
echo "release_jobs={"architecture": ${architectures}, "aws_region": ${aws_regions}}" | tr -d '[:space:]' >> $GITHUB_OUTPUT
env:
GITHUB_EVENT_INPUTS_ARCHITECTURE: ${{ github.event.inputs.architecture }}
GITHUB_EVENT_INPUTS_AWS_REGION: ${{ github.event.inputs.aws-region }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants