Skip to content

ci: scorecard publish workflow — extract run steps to composite actions#54

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/confident-albattani-okm8i5
Jun 20, 2026
Merged

ci: scorecard publish workflow — extract run steps to composite actions#54
hyperpolymath merged 1 commit into
mainfrom
claude/confident-albattani-okm8i5

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Re-architecture (as requested) to fully clear the Hypatia scorecard_publish_with_run_step finding that persisted after #53.

Why the earlier split didn't clear it

The rule is file-level: any run: step in a workflow file that publishes OpenSSF Scorecard results trips it. The #53 job-split moved the score gate to its own job, but the run step stayed in the same file (and the gate must stay in-file to consume the scorecard SARIF artifact within one workflow run), so the finding persisted.

Fix

Extract all run logic out of the scorecard-publishing workflow into local composite actions, leaving scorecard-enforcer.yml with zero run: steps (verified):

  • .github/actions/scorecard-gate — the minimum-score gate (consumes the SARIF).
  • .github/actions/repo-security-checks — the SECURITY.md + unpinned-action checks.

The publish job (which holds the OIDC id-token) and the whole workflow file are now uses:-only; the score-gate and check-critical jobs uses: the composite actions after checkout. Behaviour is unchanged — only the structure moved.

Verification

All three YAML files pass yaml.safe_load; scorecard-enforcer.yml has 0 run: step keys; the composite actions carry the run logic (1 + 2 steps). This should clear the file-level Hypatia rule on the next scan.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AqMopxUsgu78rg5fhWBUkk


Generated by Claude Code

The Hypatia `scorecard_publish_with_run_step` rule is file-level: any run: step
in a workflow that publishes OpenSSF Scorecard results trips it, so the earlier
job-split did not clear it. Move all run logic out of the scorecard-publishing
workflow into local composite actions, leaving scorecard-enforcer.yml with no
run: steps at all:

- .github/actions/scorecard-gate — the minimum-score gate (consumes the SARIF).
- .github/actions/repo-security-checks — SECURITY.md + unpinned-action checks.

The publish job (which holds the OIDC id-token) and the whole workflow file now
contain only `uses:` steps; the score-gate and check-critical jobs invoke the
composite actions after checkout.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AqMopxUsgu78rg5fhWBUkk
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 13 issues detected

Severity Count
🔴 Critical 0
🟠 High 5
🟡 Medium 8
View findings
[
  {
    "reason": "binary_to_term without :safe option -- deserialization attack (1 occurrences, CWE-502)",
    "type": "elixir_send_unsanitised",
    "file": "/home/runner/work/phronesis/phronesis/lib/phronesis/compiler.ex",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "Nominal-only SAST in phronesis: codeql.yml language matrix contains no language present in the repo and lacks `actions`, so CodeQL records zero results on every commit. Remediation: set the CodeQL matrix to `language: actions`.",
    "type": "StaticAnalysis",
    "file": "/home/runner/work/phronesis/phronesis",
    "action": "auto_fix",
    "rule_module": "scorecard",
    "severity": "medium",
    "remediation": "Add CodeQL or equivalent SAST workflow.",
    "scorecard_check": "SAST"
  },
  {
    "reason": "Repository has 6 non-main remote branch(es). Policy: single main branch only.",
    "type": "GS007",
    "file": ".",
    "action": "delete_remote_branches",
    "rule_module": "git_state",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/structural_drift/SD007 -- Hypatia structural_drift: SD007 -- 8 day(s) old",
    "type": "CSA001",
    "file": ".claude/CLAUDE.md",
    "action": "review",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/structural_drift/SD007 -- Hypatia structural_drift: SD007 -- 8 day(s) old",
    "type": "CSA001",
    "file": ".claude/CLAUDE.md",
    "action": "review",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/structural_drift/SD007 -- Hypatia structural_drift: SD007 -- 8 day(s) old",
    "type": "CSA001",
    "file": ".claude/CLAUDE.md",
    "action": "review",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/code_safety/elixir_send_unsanitised -- Hypatia code_safety: elixir_send_unsanitised -- 8 day(s) old [STALE]",
    "type": "CSA001",
    "file": "lib/phronesis/compiler.ex",
    "action": "escalate",
    "rule_module": "code_scanning_alerts",
    "severity": "high"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/workflow_audit/scorecard_publish_with_run_step -- Hypatia workflow_audit: scorecard_publish_with_run_step -- 20 day(s) old [STALE]",
    "type": "CSA001",
    "file": "scorecard-enforcer.yml",
    "action": "escalate",
    "rule_module": "code_scanning_alerts",
    "severity": "high"
  },
  {
    "reason": "Code-scanning alert hypatia/code_safety/elixir_send_unsanitised (high) at lib/phronesis/compiler.ex is 8 days old (threshold: 7 days) -- overdue for remediation",
    "type": "CSA003",
    "file": "lib/phronesis/compiler.ex",
    "action": "escalate",
    "rule_module": "code_scanning_alerts",
    "severity": "high"
  },
  {
    "reason": "Code-scanning alert hypatia/workflow_audit/scorecard_publish_with_run_step (high) at scorecard-enforcer.yml is 20 days old (threshold: 7 days) -- overdue for remediation",
    "type": "CSA003",
    "file": "scorecard-enforcer.yml",
    "action": "escalate",
    "rule_module": "code_scanning_alerts",
    "severity": "high"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

@hyperpolymath
hyperpolymath marked this pull request as ready for review June 20, 2026 04:36
@hyperpolymath
hyperpolymath merged commit e639338 into main Jun 20, 2026
10 checks passed
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