Skip to content

chore(security): remove drift codeql.yml, enable GitHub-managed default setup - #107

Closed
don-petry wants to merge 24 commits into
mainfrom
claude/issue-95-20260414-1335
Closed

don-petry wants to merge 24 commits into
mainfrom
claude/issue-95-20260414-1335

Conversation

@don-petry

Copy link
Copy Markdown
Contributor

Summary

  • Enabled GitHub-managed CodeQL default setup via API (state=configured, query_suite=default)
  • Removed the per-repo codeql.yml workflow file, which is classified as drift by the org CI standards

Why

Per ci-standards.md §2, CodeQL must be configured through GitHub's default setup (Settings → Code security), not via a per-repo workflow file. The standard explicitly states: "per-repo codeql.yml files are treated as drift by the compliance audit."

The existing codeql.yml was an advanced setup that duplicated what GitHub's managed default setup provides automatically, including auto-detected languages and managed analyzer versions.

Changes

  • Deleted .github/workflows/codeql.yml (drift per org standard)
  • Default setup configured via: gh api -X PATCH repos/petry-projects/TalkTerm/code-scanning/default-setup -F state=configured -F query_suite=default

Closes #95

Generated with Claude Code

…lt setup

Per ci-standards.md §2, CodeQL should be configured via GitHub-managed
default setup (Settings → Code security), not a per-repo workflow file.
Per-repo codeql.yml files are treated as drift by the compliance audit.

Enabled default setup via:
  gh api -X PATCH repos/petry-projects/TalkTerm/code-scanning/default-setup     -F state=configured -F query_suite=default

Closes #95

Co-authored-by: don-petry <don-petry@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 14, 2026 13:37
@coderabbitai

coderabbitai Bot commented Apr 14, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@github-actions[bot] has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 57 minutes and 43 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 57 minutes and 43 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cfecf122-edb5-451b-8fa3-910ce7748e00

📥 Commits

Reviewing files that changed from the base of the PR and between fc577a0 and 78db240.

📒 Files selected for processing (1)
  • .github/workflows/codeql.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/issue-95-20260414-1335

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 and usage tips.

@don-petry

Copy link
Copy Markdown
Contributor Author

@don-petry — this PR is ready for review and merge. It fixes the CodeQL compliance finding by removing the drift codeql.yml workflow file and configuring GitHub-managed default setup (which was enabled via API during this run).

Copilot AI 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.

Pull request overview

Removes the repository-managed CodeQL workflow to align with org CI standards that require GitHub-managed CodeQL default setup (configured in repo settings rather than via workflow code).

Changes:

  • Deleted .github/workflows/codeql.yml (previous advanced CodeQL workflow).
  • Relies on GitHub’s Code Scanning default setup being configured (state=configured, query_suite=default) outside the repo.
Comments suppressed due to low confidence (1)

.github/workflows/codeql.yml:1

  • Deleting this workflow removes the CodeQL actions language scan (the workflow/pipeline security query pack). GitHub-managed CodeQL default setup typically scans only code languages (e.g., JS/TS) and does not include the GitHub Actions query suite; if Actions scanning is still desired, add a minimal dedicated workflow for language: actions (or confirm the org standard explicitly accepts losing Actions scans).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@don-petry

don-petry commented Apr 16, 2026

Copy link
Copy Markdown
Contributor Author
Outdated review (superseded by re-review at 890dbab8c46a3d7cd4d8faf97340abbc92030b1f) — click to expand.

Automated review — APPROVED

Risk: LOW
Reviewed commit: 71bec416293fb30115e4e914ae0fe242721f8151
Cascade: triage → audit (see triage: haiku 4.5 → deep: sonnet 4.6 + duck: gpt-5.4 → audit: opus 4.6 for models)

Note: Automated approval was blocked by GitHub branch protection (cannot approve own PR). This comment records the cascade verdict. A human reviewer must click Approve to satisfy the branch protection rule.

Summary

PR deletes a per-repo codeql.yml that the org CI standard §2 explicitly classifies as drift, and the out-of-band default-setup configuration claim is independently verifiable via the GitHub API: state=configured with languages=['actions','python'] and query_suite=default. CodeQL analysis records on refs/heads/main confirm both /language:actions and /language:python categories are actively running, so the 'actions' security scanning the deep review worried about is not lost — and python scanning is a net gain. The deep review's critical coverage-reduction finding was based on a conservative prior about default setup; empirical verification refutes it.

Findings

Info

  • [info] (verification) — Independently verified via gh api repos/petry-projects/TalkTerm/code-scanning/default-setup: state=configured, languages=['actions','python'], query_suite=default, updated_at=2026-04-09. The claimed out-of-band side effect is real and persisted.
  • [info] (coverage-equivalence) — CodeQL analyses on refs/heads/main at 2026-04-14T20:24 show both /language:actions and /language:python categories executed under default setup. Actions workflow security scanning (expression injection, GITHUB_ENV misuse, dangerous shell patterns) is preserved. Python scanning is newly covered (the deleted advanced workflow did not scan python). Repo language breakdown (HTML 149KB, Python 85KB, Groovy 5KB) indicates the deleted workflow's 'javascript-typescript' language was not providing meaningful JS/TS code coverage.
  • [info] (standards-compliance) — petry-projects/.github standards/ci-standards.md §2 states: 'per-repo codeql.yml files are treated as drift by the compliance audit... delete the file and enable default setup. The two configurations are mutually exclusive at the GitHub level — leaving the workflow file behind after flipping default setup on causes both to run and double-bills CI minutes.' This PR implements exactly the prescribed remediation.
  • [info] (ci-status) — All status checks SUCCESS (CodeQL python+actions, SonarCloud 0 new issues / 0 hotspots, AgentShield, CodeRabbit). mergeStateStatus=BLOCKED only because reviewDecision=REVIEW_REQUIRED — human approval still needed per branch protection.
  • [info] (supply-chain) — PR is a pure deletion (additions=0, deletions=38, changedFiles=1). No new dependencies, actions, secrets, workflow triggers, or permission grants introduced. Authored by claude[bot] + don-petry; commit on head SHA 71bec41 matches PR_HEAD_SHA.

Minor

CI status

All status checks SUCCESS (CodeQL python+actions, SonarCloud 0 new issues / 0 hotspots, AgentShield, CodeRabbit). mergeStateStatus=BLOCKED due to branch protection requiring human reviewer approval (REVIEW_REQUIRED), not due to failing checks.


Reviewed by the don-petry PR-review cascade (triage: haiku 4.5 → deep: sonnet 4.6 + duck: gpt-5.4 → audit: opus 4.6). Reply with @don-petry if you need a human.

@petry-projects-pr-review-agent petry-projects-pr-review-agent 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.

Reviewed by the don-petry PR-review cascade (triage: haiku 4.5 → deep: sonnet 4.6 + duck: gpt-5.4 → audit: opus 4.6). Reply with @don-petry if you need a human.

@petry-projects-pr-review-agent petry-projects-pr-review-agent 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.

Reviewed by the don-petry PR-review cascade (triage: haiku 4.5 → deep: sonnet 4.6 + duck: gpt-5.4 → audit: opus 4.6). Reply with @don-petry if you need a human.

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed by the don-petry PR-review cascade (triage: haiku 4.5 → deep: sonnet 4.6 + duck: gpt-5.4 → audit: opus 4.6). Reply with @don-petry if you need a human.

@don-petry don-petry closed this May 11, 2026
auto-merge was automatically disabled May 11, 2026 21:40

Pull request was closed

@don-petry don-petry reopened this May 11, 2026
@sonarqubecloud

Copy link
Copy Markdown

donpetry-bot
donpetry-bot previously approved these changes May 14, 2026

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review — APPROVED ✓

Risk: LOW
Reviewed commit: 6a372436378de366f758f136a4c8f26fa577c8f7
Review mode: triage-approved (single reviewer)

Summary

Triage cleared this PR as low-risk and confirmation review agrees. The PR is now effectively a no-op: the target file .github/workflows/codeql.yml was already removed from main by PR #115 ("chore(ci): remove stray codeql.yml workflow"), so this PR's diff vs base is empty — additions=0, deletions=0, changedFiles=0. The head commit is just merge commits from main keeping the branch fresh. The substantive change was already approved in the prior cascade review at 71bec41 and the outcome (CodeQL via GitHub-managed default setup, no per-repo codeql.yml) is now the live state of main.

Linked issue analysis

Closes #95 ("CodeQL per-repo workflow is drift per org standard"). The remediation prescribed by petry-projects/.github ci-standards.md §2 — delete codeql.yml and rely on GitHub-managed default setup — is now realized on main (via #115). CodeQL default-setup analysis is empirically running on main: the head SHA shows successful Analyze (actions) and Analyze (python) checks under the managed setup. Issue is substantively addressed.

Findings

Info

  • [info] (no-op-merge) — gh api compare/main...HEAD returns ahead=10, behind=0, files=[]. All 10 commits ahead are merge commits from main; no file diff remains. Merging this PR is a harmless fast-forward of trivial merge metadata.
  • [info] (already-realized) — .github/workflows/codeql.yml is absent from both main and the PR head, confirming PR #115 already delivered the file removal. Closing this PR (or merging it as a no-op) both produce the same end state.
  • [info] (coverage-preserved) — Successful Analyze (actions) and Analyze (python) CodeQL check runs at HEAD confirm GitHub-managed default setup is active and scanning both languages, matching the prior review's empirical verification at 71bec41.

CI status

All required checks SUCCESS: CodeQL Analyze (actions), CodeQL Analyze (python), SonarCloud (0 new issues / 0 hotspots), AgentShield, Secret scan (gitleaks), Claude Code, Dependency audit (ecosystem detect; language-specific jobs skipped as expected). Dependabot auto-merge and a few language-specific audit jobs are SKIPPED as expected. reviewDecision=APPROVED, mergeable=MERGEABLE. mergeStateStatus=BLOCKED is residual from prior protection state; not caused by any failing check.


Reviewed automatically by the PR-review agent (single-reviewer mode: opus 4.7). Reply if you need a human review.

@donpetry-bot
donpetry-bot enabled auto-merge (squash) May 14, 2026 10:31

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review — APPROVED ✓

Risk: LOW
Reviewed commit: 39980fc8f51658c71362335b8ac0b9a8fbacacb7
Review mode: triage-approved (single reviewer)

Summary

Triage cleared this PR as low-risk and confirmation review agrees. The PR is now a no-op merge: .github/workflows/codeql.yml was already removed from main by PR #115 ("chore(ci): remove stray codeql.yml workflow"), so this PR's diff vs base is empty — additions=0, deletions=0, changedFiles=0 across 12 merge commits ahead of main. The substantive change was approved in a prior cascade review at 71bec41 and is now the live state of main. The 4 new commits since the prior review at 6a372436 are unrelated merges from main bringing in PR #176's claude.ymldev-lead.yml rename; none affect this PR's intent.

Linked issue analysis

Closes #95 ("CodeQL per-repo workflow is drift per org standard"). The remediation prescribed by petry-projects/.github ci-standards.md §2 — delete codeql.yml and rely on GitHub-managed default setup — is realized on main (via #115). CodeQL default-setup analysis is empirically running at HEAD: Analyze (actions) and Analyze (python) check runs both SUCCESS. Issue is substantively addressed.

Findings

Info

  • [info] (no-op-merge) — gh api compare/main...HEAD returns ahead=12, behind=0, files=[]. All 12 commits ahead are merge commits from main; no file diff remains. Merging this PR is a harmless fast-forward of merge metadata; closing it produces the same end state.
  • [info] (already-realized) — .github/workflows/codeql.yml confirmed absent from main (GET contents/.github/workflows/codeql.yml?ref=main → 404). PR #115 already delivered the file removal.
  • [info] (incremental-diff) — Changes since prior review 6a372436 (4 commits, files=claude.yml,dev-lead.yml) are unrelated merge-ins from PR #176's dev-lead rollout, not edits to this PR's branch.
  • [info] (coverage-preserved) — Successful Analyze (actions) and Analyze (python) CodeQL check runs at HEAD confirm GitHub-managed default setup remains active and scanning both languages, matching the prior review's empirical verification.

CI status

All required checks SUCCESS: CodeQL Analyze (actions), CodeQL Analyze (python), CodeQL aggregate, CodeRabbit, SonarCloud (0 new issues / 0 hotspots). reviewDecision=APPROVED, mergeable=MERGEABLE. mergeStateStatus=BLOCKED is residual from prior protection state, not caused by any failing check.


Reviewed automatically by the PR-review agent (single-reviewer mode: opus 4.7). Reply if you need a human review.

@donpetry-bot
donpetry-bot dismissed their stale review May 17, 2026 05:40

Superseded by automated re-review at 39980fc.

@don-petry

Copy link
Copy Markdown
Contributor Author

@dev-lead - please fix this PR

@sonarqubecloud

Copy link
Copy Markdown

@donpetry-bot

Copy link
Copy Markdown
Contributor

Automated review — human attention needed

This PR has been through 3 automated review cycles (cap: 3) without converging on an approval-and-merge state. Further automated review has been paused to avoid infinite loops.

Please take a look manually, or close this PR if it's no longer needed. Once a human review resolves the situation, remove the needs-human-review label and the cascade can be re-engaged on the next push.

Posted by the donpetry-bot PR-review cascade.

@donpetry-bot donpetry-bot added the needs-human-review Requires human review label May 30, 2026
@donpetry-bot
donpetry-bot requested a review from a team May 30, 2026 20:37
@don-petry

Copy link
Copy Markdown
Contributor Author

Closing due to merge conflict that cannot be auto-rebased. Re-implementing from fresh main via dev-lead.

@don-petry don-petry closed this Jun 2, 2026
auto-merge was automatically disabled June 2, 2026 12:22

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-human-review Requires human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compliance: codeql-default-setup-not-configured

4 participants