Skip to content

fix(ci): resolve all zizmor security scanning alerts#368

Merged
rygel merged 1 commit intodevelopfrom
fix/security-scanning-alerts
Mar 20, 2026
Merged

fix(ci): resolve all zizmor security scanning alerts#368
rygel merged 1 commit intodevelopfrom
fix/security-scanning-alerts

Conversation

@rygel
Copy link
Copy Markdown
Owner

@rygel rygel commented Mar 20, 2026

Summary

Resolves all 64 alerts reported in GitHub code scanning (zizmor).

dangerous-triggers (1 error)

  • build-performance-monitor.yml: Added trusted-source guard to the workflow_run job condition — requires github.event.workflow_run.head_repository.full_name == github.repository. Prevents privilege escalation when a fork's PR triggers a workflow that runs with repo permissions.

artipacked (2 warnings)

  • release.yml: Added persist-credentials: false to checkout step.
  • dependency-updates.yml: Added persist-credentials: false to checkout step.

excessive-permissions (16 warnings)

  • experimental-rust.yml: Added permissions: contents: read at workflow level. All 16 jobs now inherit read-only access instead of the default contents: write.

template-injection (45 notes)

Moved all inline ${{ }} expressions out of shell script bodies and into env: blocks. Variables are then referenced as shell/env vars ($VAR, $env:VAR in PowerShell, process.env.VAR in github-script). Affected files:

  • tests.yml: detect-changes/flags step, prepare/Restore dependencies step, prepare/Build projects step, test-summary/Check test results step (20 expressions total).
  • build-performance-monitor.yml: Calculate build metrics step (5), Create job summary step (5), Comment PR with build time github-script (4), Alert on regression github-script (3).
  • dependency-updates.yml: Summary step (1).

Test plan

  • CI runs clean on this PR (tests.yml, security scans)
  • build-performance-monitor.yml correctly gates on trusted repos
  • No functional behaviour changes — only injection surface is reduced

🤖 Generated with Claude Code

Addresses all 64 alerts across 4 rules reported in GitHub code scanning:

- dangerous-triggers (1 error): Add trusted-source guard to
  build-performance-monitor.yml workflow_run trigger — only runs when
  the triggering workflow originated from the same repository (not a
  fork), preventing privilege escalation via untrusted code.

- artipacked (2 warnings): Add persist-credentials: false to checkout
  steps in release.yml and dependency-updates.yml so Git credentials
  are not stored in .git/config after checkout.

- excessive-permissions (16 warnings): Add permissions: contents: read
  at workflow level in experimental-rust.yml so all 16 jobs inherit
  read-only permissions instead of the default write.

- template-injection (45 notes): Move all inline ${{ }} expressions
  from shell script bodies to env: blocks in tests.yml,
  build-performance-monitor.yml, and dependency-updates.yml.
  github-script usages updated to read from process.env instead of
  inline interpolation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Build Performance Report

⏱️ Build Time: 12 minutes

📊 Comparison with main branch:

  • Baseline (avg): 10 minutes
  • Current: 12 minutes
  • Change: 📈 20%

✅ Within acceptable range


This is an automated performance check

@rygel rygel merged commit 1cef256 into develop Mar 20, 2026
16 checks passed
@rygel rygel deleted the fix/security-scanning-alerts branch March 20, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants