Skip to content

Add cicd rule: scorecard_wrapper_missing_job_permissions #390

Closed

Description

@hyperpolymath

Rule proposal

Add detection rule cicd_rules.scorecard_wrapper_missing_job_permissions to catch scorecard wrappers that use the standards reusable but lack the required job-level permissions block.

Detection

A .github/workflows/scorecard.yml file qualifies when ALL of:

  • Contains scorecard-reusable.yml (i.e., uses the standards reusable)
  • Does NOT contain security-events: write in the same file (i.e., missing job-level perms)

The fix shape is documented in standards scorecard-reusable.yml docstring:

Caller MUST grant security-events: write and id-token: write on the calling job. The reusable re-asserts these on its own analysis job, but called-workflow permissions are CAPPED by the caller's permissions block.

Estate baseline 2026-05-30

Running this detection by hand finds 37 affected wrappers across the estate (35 unique top-level + 2 inert nested-monorepo copies). Every scheduled Scorecard run on those repos silently fails with startup_failure because ossf/scorecard-action cannot upload SARIF.

Severity

HIGH — silent CI failure with no logs is exactly the class of bug Hypatia is best positioned to catch automatically.

Prior art

  • julia-professional-registry#19 (2026-05-27) — first discovery + fix
  • absolute-zero#68 (2026-05-30, OPEN) — demonstrative fix in second repo
  • Memory: feedback_scorecard_wrapper_caller_permissions.md

Acceptance

  • Rule emits a finding for each scorecard.yml satisfying the criterion
  • Recommended-fix snippet included in finding output
  • Rule has a path_allow_prefixes carve-out for inline (non-reusable) scorecard.yml that may have its own perms shape

Metadata

Metadata

Assignees

No one assigned

    Labels

    cicd

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions