Skip to content

fix(ci): correct reusable-workflow caller permissions and inputs - #102

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/reusable-caller-permissions-3
Sep 21, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
fix/reusable-caller-permissions-3

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Two proven fatal classes, both confirmed by GitHub's own error text:

  1. permissions: nested under with: — it is read as a workflow input, and undeclared inputs are rejected at creation (Invalid input, toolchain is not defined in the referenced workflow — januskey run 34410358241). The block is moved to job level, and the undeclared toolchain input is dropped (rust-ci-reusable declares runs-on/enable_audit/enable_coverage/coverage_floor/clippy_args/test_args/check_args/working_directory).
  2. Caller granting fewer permissions than the callee declares — Error calling workflow … requesting '<perm>', but is only allowed '<none>'. The job now grants the canonical actions: read, contents: read, security-events: write.

Verified with git apply --check against current main before opening.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 5d14fab4-327a-43b4-a55f-d655f49ce5fc

📥 Commits

Reviewing files that changed from the base of the PR and between fc3583a and 0538760.

📒 Files selected for processing (2)
  • .github/workflows/governance.yml
  • .github/workflows/mirror.yml
 _____________________________________________________________________
< RabbitShergill is my Punjabi cousin. He's a bit musically inclined. >
 ---------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hyperpolymath
hyperpolymath merged commit 29393a3 into main Sep 21, 2026
15 of 18 checks passed
@hyperpolymath
hyperpolymath deleted the fix/reusable-caller-permissions-3 branch September 21, 2026 07:49
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 39 issues detected

Severity Count
🔴 Critical 1
🟠 High 16
🟡 Medium 22

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Job `triage` in label-triage.yml has no `timeout-minutes:` declaration. Default is 6 hours — a stuck codeload fetch or runner hang can burn budget. Add `timeout-minutes: 10` (or proportional).",
    "type": "missing_timeout_minutes",
    "file": "label-triage.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium",
    "recipe_id": "recipe-add-workflow-timeout-minutes",
    "job": "triage"
  },
  {
    "reason": "Job `sync` in labels.yml has no `timeout-minutes:` declaration. Default is 6 hours — a stuck codeload fetch or runner hang can burn budget. Add `timeout-minutes: 10` (or proportional).",
    "type": "missing_timeout_minutes",
    "file": "labels.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium",
    "recipe_id": "recipe-add-workflow-timeout-minutes",
    "job": "sync"
  },
  {
    "reason": "Required file missing (condition: public_repo)",
    "type": "missing_requirement",
    "file": "SECURITY.md",
    "action": "create",
    "rule_module": "cicd_rules",
    "severity": "high"
  },
  {
    "line": 56,
    "reason": "job in .github/workflows/dependabot-automerge.yml references `secrets.*` but does not install `step-security/harden-runner` — review outbound-egress monitoring",
    "type": "RE001",
    "file": ".github/workflows/dependabot-automerge.yml",
    "action": "report",
    "rule_module": "research_extensions",
    "severity": "warn"
  },
  {
    "line": 74,
    "reason": "job in .github/workflows/hypatia-scan.yml references `secrets.*` but does not install `step-security/harden-runner` — review outbound-egress monitoring",
    "type": "RE001",
    "file": ".github/workflows/hypatia-scan.yml",
    "action": "report",
    "rule_module": "research_extensions",
    "severity": "warn"
  },
  {
    "line": 52,
    "reason": "job in .github/workflows/label-triage.yml references `secrets.*` but does not install `step-security/harden-runner` — review outbound-egress monitoring",
    "type": "RE001",
    "file": ".github/workflows/label-triage.yml",
    "action": "report",
    "rule_module": "research_extensions",
    "severity": "warn"
  },
  {
    "line": 38,
    "reason": "job in .github/workflows/labels.yml references `secrets.*` but does not install `step-security/harden-runner` — review outbound-egress monitoring",
    "type": "RE001",
    "file": ".github/workflows/labels.yml",
    "action": "report",
    "rule_module": "research_extensions",
    "severity": "warn"
  },
  {
    "line": 48,
    "reason": "workflow .github/workflows/dependabot-automerge.yml:48 gates on `github.actor == 'dependabot[bot]'` — `github.actor` is the run-triggering user, which an attacker controls on `pull_request_target` from a fork",
    "type": "RE008",
    "file": ".github/workflows/dependabot-automerge.yml",
    "action": "report",
    "rule_module": "research_extensions",
    "severity": "critical"
  },
  {
    "line": null,
    "reason": "workflow .github/workflows/dependabot-automerge.yml has top-level `permissions:` with `contents: write` AND performs a write (push/commit/release/PR). It is over-broad, but narrowing the workflow level alone WOULD BREAK IT — no job declares its own `permissions:`.",
    "type": "WH002",
    "file": ".github/workflows/dependabot-automerge.yml",
    "action": "report",
    "rule_module": "workflow_hardening",
    "severity": "warn"
  },
  {
    "line": 12,
    "reason": "workflow .github/workflows/mirror.yml:12 uses `secrets: inherit` — forwards every caller secret to the reusable workflow",
    "type": "WH008",
    "file": ".github/workflows/mirror.yml",
    "action": "report",
    "rule_module": "workflow_hardening",
    "severity": "warn"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

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.

1 participant