Skip to content

ci: restore interim PR-triggered CodeQL workflow - #321

Closed
seonghobae wants to merge 1 commit into
masterfrom
ci/restore-codeql-pr-coverage
Closed

ci: restore interim PR-triggered CodeQL workflow#321
seonghobae wants to merge 1 commit into
masterfrom
ci/restore-codeql-pr-coverage

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • aFIPC currently has zero CodeQL coverage on pull requests. The central ContextualWisdomLab/.github required-workflow ruleset (CWL Central required workflows, id 18156473) is supposed to run codeql-pr.yml in every target repo's context, but it is not actually wired into that ruleset — a separate org-admin-only gap, tracked elsewhere, not fixable from this repo.
  • .github/workflows/codeql.yml was deleted in 83ecc6e (ci: centralize governance — remove local workflows duplicated by central .github #118) on the assumption central coverage already applied. That assumption is now verified false (2026-09-02).
  • This PR restores a minimal, repo-local pull_request-triggered CodeQL workflow as an interim safety net, clearly marked for removal once ruleset 18156473 is fixed centrally.

Language scope (verified, not guessed)

  • No first-party Python / JavaScript-TypeScript / Java-Kotlin source anywhere in the repo.
  • The ~980 .c/.h/.hpp files present are entirely under packrat/lib/ — vendored R package dependencies, not repo-authored code.
  • Every CodeQL analysis this repo has ever produced (before ci: centralize governance — remove local workflows duplicated by central .github #118 deleted the old workflow) used /language:actions only — never any other language.
  • So the workflow analyzes actions only, matching both historical precedent and the actual repo contents.

What it's based on

  • github/codeql-action version/SHA pinned to match ContextualWisdomLab/.github's current codeql-pr.yml (v4.37.8).
  • actions/checkout and step-security/harden-runner pins reused from this repo's own existing workflows (code-quality.yml, security-audit.yml) for internal consistency — both are Dependabot-managed here.
  • Intentionally does not copy central's merge-preview job or its custom SARIF-gate script (org-specific, not needed for a single-repo interim shim); uses the standard codeql-action/analyze SARIF upload to GitHub code scanning instead.

Test plan

  • actionlint .github/workflows/codeql.yml passes clean
  • Workflow run on this PR shows Analyze (actions) succeeding and uploading SARIF

🤖 Generated with Claude Code


Devin Review

Summary by CodeRabbit

  • 보안
    • PR에 대한 CodeQL 보안 분석 워크플로를 복원했습니다.
    • master 브랜치 대상 PR 및 수동 실행을 지원합니다.
    • 분석 결과가 보안 이벤트로 기록됩니다.

Ruleset 18156473 (CWL Central required workflows) was assumed by commit
83ecc6e (#118) to already run ContextualWisdomLab/.github's codeql-pr.yml
against every PR here, so the local codeql.yml was deleted. That assumption
was verified false on 2026-09-02: this repo has had zero CodeQL PR coverage
since. Fixing the ruleset itself needs org-admin access and is tracked
separately; this adds a minimal, repo-local safety net in the meantime,
scoped to the "actions" language this repo actually has (no first-party
Python/JS-TS/Java-Kotlin code; the vendored C/C++ under packrat/lib/ is not
repo-authored). Remove once the ruleset gap is fixed centrally.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 8a1d3014-b198-411b-a985-c8baf15bfac4

📥 Commits

Reviewing files that changed from the base of the PR and between f87c232 and bf7536c.

📒 Files selected for processing (1)
  • .github/workflows/codeql.yml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

CodeQL 워크플로를 추가했습니다. master 대상 PR과 수동 실행을 지원합니다. Actions 언어를 분석하고 보안 이벤트 결과를 기록합니다.

Changes

CodeQL 워크플로

Layer / File(s) Summary
CodeQL 실행 및 분석 구성
.github/workflows/codeql.yml
CodeQL 워크플로 이름과 복원 목적 주석을 추가했습니다. master 대상 pull_requestworkflow_dispatch 트리거를 정의했습니다. analyze 잡에서 harden-runner, 저장소 체크아웃, Actions 언어 초기화 및 CodeQL 분석을 실행합니다. 필요한 읽기 권한과 security-events: write 권한을 설정했습니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🔵 Low · up to bf753

This PR restores CodeQL scanning for pull requests targeting master, but pull requests targeting main may remain uncovered if that branch is active or protected. The change is otherwise mergeable with explicit owner follow-up to confirm the required target branches and extend the workflow if needed.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 PR의 주요 변경 사항인 PR 트리거 기반 CodeQL 워크플로 복원을 정확하고 간결하게 설명합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/restore-codeql-pr-coverage

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.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@seonghobae seonghobae added area: ci-cd CI, GitHub Actions, checks, release, or supply chain priority: high High-priority or P1 work status: needs-review Open pull request requiring current-head review or checks type: maintenance Maintenance, build, dependency, or operational upkeep labels Sep 2, 2026 — with ChatGPT Codex Connector
@seonghobae

Copy link
Copy Markdown
Collaborator Author

Closing as redundant: the actual root-cause fix has landed.

Org ruleset 18156473 was missing codeql-pr.yml, scorecard-pr.yml, and osv-scanner-pr.yml from its required-workflow list org-wide — this PR was an interim, repository-local stopgap for that gap while it stood.

The gap has since been fixed at the root: an org administrator granted admin:org scope, and codeql-pr.yml/scorecard-pr.yml/osv-scanner-pr.yml (pinned to ContextualWisdomLab/.github@refs/heads/main) were added directly to ruleset 18156473's workflows rule. Verified live from two angles:

  • Re-reading orgs/ContextualWisdomLab/rulesets/18156473 now shows all 10 required workflow paths.
  • Re-reading this repository's own inherited dispatch list (gh api repos/ContextualWisdomLab/aFIPC/rules/branches/master) now shows codeql-pr.yml present, confirming the central control is actually enforcing here, not just present in the ruleset's own definition.

aFIPC now receives central PR-head and merge-preview CodeQL coverage the same way every other repository under the ruleset does. See ContextualWisdomLab/.github's docs/org-required-workflow-rollout.md ("Code scanning required workflow posture" section) for the full evidence trail, and PR ContextualWisdomLab/.github#1719 for the corrected rollout doc.

Closing this interim workflow in favor of the central one, per this repo's own "remove once ruleset confirmed fixed" note in the PR description.

@seonghobae seonghobae closed this Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci-cd CI, GitHub Actions, checks, release, or supply chain priority: high High-priority or P1 work status: needs-review Open pull request requiring current-head review or checks type: maintenance Maintenance, build, dependency, or operational upkeep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant