Skip to content

fix(ci): repair corrupted 'npermissions:' — ci.yml couldn't parse#61

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/ci-corrupted-permissions
Jun 25, 2026
Merged

fix(ci): repair corrupted 'npermissions:' — ci.yml couldn't parse#61
hyperpolymath merged 1 commit into
mainfrom
fix/ci-corrupted-permissions

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

A security-hardening script (c987edf) injected permissions: contents: read blocks but its newline rendered as a literal nnpermissions: at column 0 in 11 places (4 legitimately job-level, 7 bogus — a top-level dup + blocks inside step with: bodies). The file no longer parsed as YAML, so ci.yml couldn't run at all. Re-indents the 4 job-level blocks to proper permissions:, removes the 7 bogus ones, keeps the real top-level block — achieving the intended least-privilege hardening. YAML now valid. Found by the latent-CI sweep (batch-00). 🤖 Generated with Claude Code

…parse

A security-hardening script (c987edf) tried to add job-level
'permissions: contents: read' but its newline rendered as a literal 'n',
injecting 'npermissions:' at column 0 in 11 places — 4 legitimately job-level
(after runs-on:), 7 bogus (a top-level duplicate after on:, plus blocks inside
step with: bodies). The file no longer parsed as YAML, so ci.yml could not run
at all. Re-indents the 4 job-level blocks to proper 'permissions:' and removes
the 7 bogus ones; keeps the real top-level permissions. Achieves the original
least-privilege intent. YAML now valid (lint/test/build/mirror-to-gitlab).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hyperpolymath hyperpolymath merged commit c678ed8 into main Jun 25, 2026
20 of 27 checks passed
@hyperpolymath hyperpolymath deleted the fix/ci-corrupted-permissions branch June 25, 2026 18:20
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 61 issues detected

Severity Count
🔴 Critical 0
🟠 High 8
🟡 Medium 53
View findings
[
  {
    "reason": "Issue in mirror-sync.yml",
    "type": "npermissions_typo",
    "file": "mirror-sync.yml",
    "action": "fix_typo",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "codeql.yml lists `language: javascript-typescript` but the repo has no source files in any CodeQL-scannable language. The analyze job will exit 'no source files' on every run. Switch the matrix to `actions` (which scans workflow files — every repo has those).",
    "type": "codeql_language_matrix_mismatch",
    "file": "codeql.yml",
    "action": "switch_codeql_matrix_to_actions",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Issue in boj-build.yml",
    "type": "missing_timeout_minutes",
    "file": "boj-build.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in casket-pages.yml",
    "type": "missing_timeout_minutes",
    "file": "casket-pages.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in casket-pages.yml",
    "type": "missing_timeout_minutes",
    "file": "casket-pages.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "missing_timeout_minutes",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "missing_timeout_minutes",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "missing_timeout_minutes",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "missing_timeout_minutes",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in codeql.yml",
    "type": "missing_timeout_minutes",
    "file": "codeql.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

@sonarqubecloud

Copy link
Copy Markdown

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