跳到主内容
@wquguru
精选90GitHub ChangelogAI 编程与模型

CodeQL 2.27.2:Go CFG破坏性变更及macOS 27构建限制

CodeQL 2.27.2 improves C++, Go, Rust, and JavaScript analysis

原文
发到 X
推荐理由

Go CFG 发生破坏性变更,使用 CodeQL 编写自定义查询的开发者必须检查并适配新接口,否则查询将失效;同时 macOS 27 环境下的构建支持受限,需提前规划。

CodeQL 2.27.2 is now available, adding a C++ regular-expression parser and analysis improvements across several languages. CodeQL is the static analysis engine behind GitHub code scanning, which helps you find and remediate security issues in your code. The Default suite runs 498 security queries covering 170 CWEs. The Extended suite adds 131 queries covering 32 more CWEs.

CodeQL 2.27.2 现已发布,新增 C++ 正则表达式解析器,并改进了多种语言的代码分析功能。CodeQL 是 GitHub 代码扫描背后的静态分析引擎,可帮助您发现并修复代码中的安全问题。Default 套件运行 498 个安全查询,覆盖 170 种 CWE(通用弱点枚举)。Extended 套件额外增加 131 个查询,覆盖另外 32 种 CWE。

Language and framework support

语言和框架支持

C/C++

  • CodeQL now parses regular expressions that use the ECMAScript grammar in std::regex.
  • We’ve added SQL-injection sink models for the Comdb2 C API as well as flow summaries for Bloomberg BDE codecs and byte-stream deserializers.
  • CodeQL 现在能够解析 std::regex 中使用 ECMAScript 语法的正则表达式。
  • 我们为 Comdb2 C API 添加了 SQL 注入漏洞模型,并为 Bloomberg BDE 编解码器和字节流反序列化器添加了数据流摘要。

Go

  • CodeQL now models the github.com/coder/websocket import path, in addition to nhooyr.io/websocket.
  • 除了 nhooyr.io/websocket 之外,CodeQL 现在还对 github.com/coder/websocket 导入路径进行了建模。

Rust

  • The Rust extractor now supports the AnyAttr and DocComment classes.
  • We’ve improved data flow for async blocks used with await as well as added flow summaries for native-tls, async-native-tls, and tokio-native-tls.
  • Rust 提取器现在支持 AnyAttr 和 DocComment 类。
  • 我们改进了与 await 一起使用的异步块的数据流,并为 native-tls、async-native-tls 和 tokio-native-tls 添加了数据流摘要。

JavaScript/TypeScript

  • CodeQL now recognizes the Workflow SDK’s "use workflow" and "use step" directives.
  • We’ve improved Hapi route-handler and request-input tracking through custom route-registration helpers and higher-order functions.
  • CodeQL 现在能够识别 Workflow SDK 的 "use workflow" 和 "use step" 指令。
  • 通过自定义路由注册辅助函数和高阶函数,我们改进了对 Hapi 路由处理程序和请求输入跟踪的能力。

macOS 27 compatibility

macOS 27 兼容性

  • With the release of macOS 27 and Xcode 27, Apple stopped shipping multi-architecture x86-64/arm64 binaries. These binaries are required by CodeQL to perform traced analysis. For this reason, CodeQL’s autobuild and manual build modes will not be supported for compiled languages on macOS 27 with any Xcode version, and on macOS 26 when Xcode 27 is selected. When using these build modes, please use at most macOS 26 and Xcode 26. We are also working on improving support for build mode none on macOS to help mitigate this limitation.
  • 随着 macOS 27 和 Xcode 27 的发布,Apple 不再提供多架构 x86-64/arm64 二进制文件。这些二进制文件是 CodeQL 执行追踪分析所必需的。因此,对于 macOS 27 上的任何 Xcode 版本,以及 macOS 26 上选择 Xcode 27 时,CodeQL 的自动构建和手动构建模式将不再支持编译型语言。在使用这些构建模式时,请最多使用 macOS 26 和 Xcode 26。我们还正在努力改进 macOS 上无构建模式的支持,以缓解此限制。

Query changes

查询变更

C#

  • The cs/web/missing-x-frame-options query now recognizes ASP.NET Core response headers and Content Security Policy frame-ancestors directives as clickjacking protections.
  • The cs/web/xss query no longer treats Razor tag-helper attribute values written with WriteLiteral as XSS sinks.
  • cs/web/missing-x-frame-options 查询现在将 ASP.NET Core 响应头和内容安全策略(CSP)中的 frame-ancestors 指令视为点击劫持防护措施。
  • cs/web/xss 查询不再将通过 WriteLiteral 编写的 Razor 标签助手属性值视为 XSS 漏洞点。

GitHub Actions

  • You can now remove owners from the trusted set used by the actions/unpinned-tag query by adding an entry prefixed with !, such as !github. This lets you report unpinned tags for first-party owners.
  • 您现在可以通过添加以 ! 为前缀的条目(例如 !github)从 actions/unpinned-tag 查询所使用的可信所有者集合中移除所有者。这允许您报告第一方所有者的未固定标签。

CodeQL CLI

  • The CLI now reports invalid qlpack: and from: values in query suites as clear errors instead of crashing.
  • CodeQL now rejects YAML data-extension integers outside the signed 32-bit range instead of silently truncating some values.
  • Error and warning messages on standard error now include ERROR: and WARNING: prefixes. Structured output, including logs and SARIF, remains unchanged.
  • codeql query compile now accepts --dil-constants with --dump-dil to include optimized constant tuple sets in emitted DIL.
  • Commands that load data extensions now only warn when none of the patterns in a pack’s dataExtensions list match any files.
  • CLI 现在会将查询套件中无效的 qlpack: 和 from: 值报告为明确的错误,而不是直接崩溃。
  • CodeQL 现在会拒绝超出有符号 32 位范围之外的 YAML 数据扩展整数,而不会静默截断部分值。
  • 标准错误上的错误和警告消息现在包含 ERROR: 和 WARNING: 前缀。结构化输出(包括日志和 SARIF)保持不变。
  • codeql query compile 现在接受 --dil-constants 与 --dump-dil,以在发出的 DIL 中包含优化的常量元组集。
  • 加载数据扩展的命令现在仅在 pack 的 dataExtensions 列表中的任何模式都不匹配任何文件时发出警告。

Go library breaking change

Go 库破坏性变更

The Go control-flow graph (CFG) now uses the shared CFG library. It includes additional nodes for constructs such as assignments, parameters and results, range statements, and deferred calls, and excludes nodes that aren’t reachable from the entry point. This changes CFG nodes, edges, locations, textual representations, and basic-block boundaries, so you may need to update queries that rely on the previous representation.

Go 控制流图 (CFG) 现在使用共享 CFG 库。它包括用于赋值、参数和结果、范围语句以及延迟调用等构造的其他节点,并排除了从入口点不可达的节点。这改变了 CFG 节点、边、位置、文本表示和基本块边界,因此您可能需要更新依赖先前表示形式的查询。

The update:

更新内容:

  • Removes BasicBlocks::Cfg.
  • Adds ControlFlow::EntryNode, ControlFlow::ExitNode, and SwitchStmt.getExpr.
  • Deprecates IfStmt.getCond in favor of IfStmt.getCondition.
  • Changes the return types of IfStmt.getThen and LoopStmt.getBody to Stmt.
  • Consolidates several IR instruction classes.
  • 移除 BasicBlocks::Cfg。
  • 添加 ControlFlow::EntryNode、ControlFlow::ExitNode 和 SwitchStmt.getExpr。
  • 弃用 IfStmt.getCond,改用 IfStmt.getCondition。
  • 将 IfStmt.getThen 和 LoopStmt.getBody 的返回类型更改为 Stmt。
  • 合并多个 IR 指令类。

For full details, see the CodeQL 2.27.2 changelog. GitHub automatically deploys every new CodeQL version to users of GitHub code scanning on github.com. A future GitHub Enterprise Server (GHES) release will also include the new functionality in CodeQL 2.27.2. If you use an older version of GHES, you can manually upgrade your CodeQL version.

如需完整详情,请参阅 CodeQL 2.27.2 版本说明。GitHub 会自动将每个新的 CodeQL 版本部署给 github.com 上 GitHub 代码扫描的用户。未来的 GitHub Enterprise Server (GHES) 版本也将包含 CodeQL 2.27.2 中的新功能。如果您使用的是较旧版本的 GHES,可以手动升级您的 CodeQL 版本。

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

关联信息,但可能不是同一事件