跳到主内容
精选82GitHub Changelog云与平台

CodeQL 2.26.3 改进 Actions 查询与 JS 建模

CodeQL 2.26.3 improves GitHub Actions queries and JavaScript modeling

原文
推荐理由

CodeQL 用户注意:2.26.3 移除了 SelfHostedQuery 模块,使用该模块的自定义查询需在升级前更新;同时新增多项 JS/TS/Vue 建模,建议升级以提升扫描准确率。

CodeQL 2.26.3 adds JavaScript, TypeScript, and Vue source modeling and improves the accuracy of several GitHub Actions queries. CodeQL is the static analysis engine behind GitHub code scanning, which helps you find and remediate security issues in your code.

CodeQL 2.26.3 增加了对 JavaScript、TypeScript 和 Vue 的源代码建模,并提高了多个 GitHub Actions 查询的准确性。CodeQL 是 GitHub 代码扫描背后的静态分析引擎,可帮助您发现并修复代码中的安全问题。

Language and framework support

语言和框架支持

GitHub Actions

GitHub Actions

  • Analysis now recognizes untrusted data in github.event.merge_group for workflows triggered by the merge_group event.
  • Breaking change: We’ve removed the codeql.actions.security.SelfHostedQuery module because runner labels don’t reliably distinguish self-hosted runners from managed runners. You’ll need to update any custom queries that rely on this module.
  • 分析现在可以识别由 merge_group 事件触发的工作流中 github.event.merge_group 内的不可信数据。
  • 重大变更:我们已移除 codeql.actions.security.SelfHostedQuery 模块,因为运行器标签无法可靠地区分自托管运行器和托管运行器。您需要更新任何依赖此模块的自定义查询。

JavaScript/TypeScript

JavaScript/TypeScript

  • Custom models can now reference specific files using a package name in the form file:<path>. This lets you define sources and sinks based on a file’s public exports.
  • We’ve added flow models for Vue’s ref, shallowRef, toRef, reactive, and computed Composition API helpers.
  • CodeQL now recognizes Vue Router’s useRoute() Composition API as a client-side remote flow source, including its query, params, path, fullPath, and hash members.
  • CodeQL now treats declared inputs properties in Sails Action2 controller files as remote flow sources. This may improve results for queries such as js/path-injection.
  • Queries using the response threat model now track promise-wrapped client response data into promise fulfillment values. This may improve results for queries such as js/xss.
  • 自定义模型现在可以使用 file:<path> 形式的包名引用特定文件。这使您可以根据文件的公共导出定义源和汇。
  • 我们为 Vue 的 ref、shallowRef、toRef、reactive 和 computed Composition API 辅助函数添加了流模型。
  • CodeQL 现在将 Vue Router 的 useRoute() Composition API 识别为客户端远程流源,包括其 query、params、path、fullPath 和 hash 成员。
  • CodeQL 现在将 Sails Action2 控制器文件中声明的输入属性视为远程流源。这可能会改进 js/path-injection 等查询的结果。
  • 使用响应威胁模型的查询现在将包装在 Promise 中的客户端响应数据跟踪到 Promise 的完成值中。这可能会改进 js/xss 等查询的结果。

C/C++

C/C++

  • We’ve added flow source models for RegQueryValue and related functions from the winreg.h Windows header.
  • 我们为 Windows 头文件 winreg.h 中的 RegQueryValue 及相关函数添加了流源模型。

Ruby

Ruby

  • We’ve removed library input to vendored gems from the set of taint sources, reducing false positives for several queries when you use vendoring.
  • 我们已从污点源集合中移除了对 vendored gems 的库输入,从而在使用 vendoring 时减少多个查询的误报。

Query changes

查询更改

GitHub Actions

GitHub Actions

  • We’ve improved the accuracy of the actions/output-clobbering/high query so it no longer reports simple jq path filters when their output remains JSON-encoded. We also implemented a fix for a performance issue in this query caused by unescaped regular expression input.
  • The actions/cache-poisoning/poisonable-step and actions/untrusted-checkout/critical queries now start paths at the expressions that control untrusted checkouts, making alerts easier to follow.
  • GitHub Actions queries now correctly classify the schedule event when determining whether a workflow can be externally triggered.
  • The actions/envvar-injection/critical query now requires the untrusted source and privileged context to originate from the same trigger event. It also no longer treats pull request head labels as injection-capable because they can’t contain newlines.
  • The actions/cache-poisoning/code-injection, actions/cache-poisoning/direct-cache, and actions/cache-poisoning/poisonable-step queries now account for read-only cache access on low-trust triggers running in the default branch scope. They retain results only for triggers that GitHub allows to write to that cache scope.
  • We’ve clarified the name and alert message of the actions/cache-poisoning/code-injection query.
  • 我们提高了 actions/output-clobbering/high 查询的准确性,使其不再报告简单的 jq 路径过滤器(当其输出保持 JSON 编码时)。我们还修复了此查询中由未转义的正则表达式输入引起的性能问题。
  • actions/cache-poisoning/poisonable-step 和 actions/untrusted-checkout/critical 查询现在从控制不可信签出的表达式开始路径,使警报更易于跟踪。
  • GitHub Actions 查询现在在确定工作流是否可以被外部触发时,能正确分类 schedule 事件。
  • actions/envvar-injection/critical 查询现在要求不可信来源和特权上下文必须来自同一触发事件。它也不再视拉取请求头部标签为可注入的,因为它们不能包含换行符。
  • actions/cache-poisoning/code-injection、actions/cache-poisoning/direct-cache 和 actions/cache-poisoning/poisonable-step 查询现在考虑了在默认分支范围内运行的低信任触发器的只读缓存访问。它们仅保留 GitHub 允许写入该缓存范围的触发器的结果。
  • 我们已澄清了 actions/cache-poisoning/code-injection 查询的名称和警报消息。

JavaScript/TypeScript

JavaScript/TypeScript

  • The js/missing-rate-limiting query now recognizes the @fastify/rate-limit package as a rate limiter.
  • js/missing-rate-limiting 查询现在识别 @fastify/rate-limit 包作为速率限制器。

For all changes, see the complete CodeQL 2.26.3 changelog.

有关所有更改,请参阅完整的 CodeQL 2.26.3 变更日志。

GitHub automatically deploys each new CodeQL version to users of GitHub code scanning on GitHub.com. A future GitHub Enterprise Server (GHES) release will include this functionality. If you use an older GHES version, you can manually upgrade CodeQL.

GitHub 会自动将每个新 CodeQL 版本部署给 GitHub.com 上使用 GitHub 代码扫描的用户。未来的 GitHub Enterprise Server (GHES) 版本将包含此功能。如果您使用较旧的 GHES 版本,可以手动升级 CodeQL。

The post CodeQL 2.26.3 improves GitHub Actions queries and JavaScript modeling appeared first on The GitHub Blog.

文章《CodeQL 2.26.3 改进 GitHub Actions 查询和 JavaScript 建模》首次出现在 GitHub 博客上。

更进一步:量化金融体系

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

进入量化体系 →

相似阅读

另一事件,读法相近