Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Switch to CodeSQL v3 #102

Merged
merged 1 commit into from
Feb 13, 2025
Merged

Switch to CodeSQL v3 #102

merged 1 commit into from
Feb 13, 2025

Conversation

kingster
Copy link
Member

@kingster kingster commented Feb 13, 2025

Summary by CodeRabbit

  • Chores
    • Upgraded our static code analysis workflow to the latest supported versions. These updates improve performance, security, and reliability in our background quality checks, ensuring a more robust scanning process without altering visible functionality.

Copy link

coderabbitai bot commented Feb 13, 2025

Walkthrough

This pull request updates the GitHub CodeQL analysis workflow. In the workflow file, the versions of the CodeQL actions for both initialization and analysis have been bumped from v2 to v3. No changes have been made to the workflow’s underlying logic or structure.

Changes

File(s) Change Summary
.github/.../codeql-analysis.yml Updated CodeQL actions: changed init and analyze steps from v2 to v3.

Poem

Oh, what a hop in our code today,
Version numbers leap, bright as the day!
From v2 to v3, the actions now shine,
A little update, oh so fine.
Hopping along, our workflow's divine!


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/codeql-analysis.yml (1)

88-89: Update commented-out autobuild action version.

While the active CodeQL actions have been updated to v3, there's a commented-out autobuild action still referencing v2.

-    #   uses: github/codeql-action/autobuild@v2
+    #   uses: github/codeql-action/autobuild@v3
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 647281c and 2315169.

📒 Files selected for processing (1)
  • .github/workflows/codeql-analysis.yml (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Build Tinyphone macOS
  • GitHub Check: Build Tinyphone Windows
  • GitHub Check: Build Tinyphone Linux
  • GitHub Check: Analyze (cpp)
🔇 Additional comments (1)
.github/workflows/codeql-analysis.yml (1)

59-59:

✅ Verification successful

Verify CodeQL v3 compatibility and consider new features.

The upgrade to CodeQL v3 looks good. However, let's verify the compatibility and new features available.

Also applies to: 103-103


🌐 Web query:

What are the breaking changes and new features in GitHub CodeQL v3 compared to v2?

💡 Result:

The transition from GitHub CodeQL Action v2 to v3 introduced several breaking changes and new features aimed at improving performance, security, and usability:

Breaking Changes

Workflow Configuration

  • Deprecation of actions/download-artifact@v3: Starting November 2024, workflows must migrate to actions/download-artifact@v4 for debug artifact handling[4][10].
  • Python Dependency Installation Disabled by Default: The Action no longer installs Python dependencies automatically (improving analysis speed). Override via CODEQL_ACTION_DISABLE_PYTHON_DEPENDENCY_INSTALLATION=false temporarily[4].

Java/Kotlin Analysis

  • Legacy environment variables (ODASA_JAVA_LAYOUT, ODASA_TOOLS, etc.) are no longer supported in Java/Kotlin extractors[1].

Bundle Tagging

  • CodeQL bundles now use semantic versioning (e.g., codeql-bundle-v2.13.4) instead of date-based tags like codeql-bundle-20230615[4][6].

CLI Requirements

  • Minimum CLI version increased to CodeQL 2.11.6+ for compatibility with newer Actions[4].

New Features

Performance Improvements

  • Zstandard Compression: Bundles now use Zstandard compression (~30% smaller size) for faster downloads[6].
  • Fine-Grained Dependency Tracking: IDE language servers enable incremental error-checking after code edits[1][6].

Analysis Enhancements

  • CodeQL Model Packs (GA): Extend coverage for custom libraries/frameworks via published model packs (C/C++, C#, Java/Kotlin, Python, Ruby)[2].
  • Precompiled Queries (.qlx): Improve cross-CLI compatibility and reduce query compilation time[3][6].

Security & Reliability

  • SARIF File Limits Increased: Maximum SARIF runs per file raised from 15 to 20[4].
  • CVE Fixes: Addressed vulnerabilities like CVE-2024-25129 (data exfiltration risks)[6].

Language-Specific Updates

  • Python:
    • Globs (e.g., folder/**/*.py) are now properly handled in paths configurations[1].
    • New query py/http-response-splitting detects HTTP header injection vulnerabilities[1].
  • Go/C#/Java: Dependency caching reduces redundant scans[5].

Migration Summary

Aspect CodeQL v2 CodeQL v3
Artifact Download download-artifact@v3 download-artifact@v4 [4][10]
Python Dependencies Installed by default Disabled by default [4]
Bundle Tags Date-based (e.g., 20230615) Semantic versioning (e.g., v2.x) [4][6]
Query Execution Legacy QL compilation Precompiled .qlx support [3][6]

For full migration steps, refer to GitHub's CodeQL Action v3 documentation[8][9].

Citations:


CodeQL v3 Upgrade Verified – Confirm New Defaults as Needed

The workflow upgrade to CodeQL v3 is correctly applied on both the initialization (line 59) and analysis (line 103) steps. Based on the latest documentation, please double-check the following in your project context:

  • Python Dependencies: CodeQL v3 disables automatic Python dependency installation by default. If your analysis requires Python support, add an explicit flag (e.g., CODEQL_ACTION_DISABLE_PYTHON_DEPENDENCY_INSTALLATION=false).
  • Artifact Handling: Although not directly changed in this file, be aware that future workflows may need to upgrade from actions/download-artifact@v3 to v4 for debug artifact management.
  • Legacy Configurations: For projects using Java/Kotlin extractors or similar settings, confirm that any legacy environment variables are updated per v3 requirements.

Overall, no direct modifications are needed in this file, but please verify that these new defaults align with your project’s needs.

@AppVeyorBot
Copy link

1 similar comment
@AppVeyorBot
Copy link

@kingster kingster merged commit c52f231 into master Feb 13, 2025
8 checks passed
@kingster kingster deleted the codeql-v3 branch February 13, 2025 10:52
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants