AI觉醒星球
Awakening is here
Knowledge File / AI技能杠杆
2026-07-11 0 浏览 会员

CodeQL 2.26.0 新增 Kotlin 2.4.0 支持与 AI 提示注入检测

GitHub 发布 CodeQL 2.26.0,添加对 Kotlin 2.4.0 的支持,引入 JavaScript/TypeScript 系统提示注入查询,并提升多语言分析准确性。

SOURCE / AI技能杠杆 MIN / 9 ACCESS / 会员 POST / 2026-07-11 04:40:56

原贴

查看原文
作者:Allison 来源站点:github.blog 原贴时间:

原文

CodeQL is the static analysis engine behind GitHub code scanning , which finds and remediates security issues in your code. We’ve recently released CodeQL 2.26.0 , which adds support for Kotlin 2.4.0, introduces a JavaScript and TypeScript query for system prompt injection, and improves analysis accuracy across multiple languages. Kotlin : CodeQL now supports Kotlin versions up to 2.4.0. C# : We’ve added Razor Page handler method parameters, such as parameters for OnGet , OnPost , and OnPostAsync , as remote flow sources. Security queries such as cs/sql-injection can now detect vulnerabilities involving these parameters in PageModel subclasses. Go : We’ve added models for the log/slog package introduced in Go 1.21. The go/log-injection and go/clear-text-logging queries can now detect issues in code that uses slog package functions and slog.Logger methods. JavaScript/TypeScript : We’ve added prompt injection sinks for additional OpenAI, Anthropic, and Google GenAI SDK APIs, including Sora prompts, OpenAI Realtime session instructions, Anthropic legacy completion prompts, and Google GenAI cached content and system instructions. We’ve added the js/system-prompt-injection query to detect when untrusted, user-provided values flow into an AI model’s system prompt, allowing an attacker to manipulate the model’s behavior. We’ve added the experimental javascript/ssrf-ipv6-transition-incomplete-guard query to detect server-side request forgery (SSRF) guards that reject private IPv4 ranges but can be bypassed with IPv6 transition address formats. The go/unhandled-writable-file-close query now produces fewer false positives. It no longer flags a deferred call to Close when every execution path first handles a call to Sync on the same file handle. The py/modification-of-locals query no longer flags modifications to a locals() dictionary after it has passed out of the scope where it was created, reducing false positives. We’ve improved CryptoKit modeling for the swift/weak-sensitive-data-hashing and swift/weak-password-hashing queries. These queries may now detect additional results. We’ve updated the actions/pr-on-self-hosted-runner query to recognize the latest standard runner labels, reducing false positives. We’ve corrected the name, description, and alert message for actions/untrusted-checkout/medium to clarify that it applies to a nonprivileged context.

中文翻译

CodeQL 是 GitHub 代码扫描背后的静态分析引擎,用于查找和修复代码中的安全问题。我们最近发布了 CodeQL 2.26.0,该版本新增了对 Kotlin 2.4.0 的支持,引入了一个用于系统提示注入的 JavaScript 和 TypeScript 查询,并提升了多种语言的分析准确性。

Kotlin:CodeQL 现在支持高达 2.4.0 的 Kotlin 版本。

C#:我们添加了 Razor 页面处理程序方法参数,例如 OnGet、OnPost 和 OnPostAsync 的参数,作为远程流来源。诸如 cs/sql-injection 之类的安全查询现在可以检测 PageModel 子类中涉及这些参数的漏洞。

Go:我们为 Go 1.21 中引入的 log/slog 包添加了模型。go/log-injection 和 go/clear-text-logging 查询现在可以检测使用 slog 包函数和 slog.Logger 方法的代码中的问题。

JavaScript/TypeScript:我们为额外的 OpenAI、Anthropic 和 Google GenAI SDK API 添加了提示注入接收器,包括 Sora 提示、OpenAI Realtime 会话指令、Anthropic 遗留完成提示以及 Google GenAI 缓存内容和系统指令。我们添加了 js/system-prompt-injection 查询,用于检测不受信任的用户提供的值何时流入 AI 模型的系统提示,从而允许攻击者操纵模型的行为。我们添加了实验性查询 javascript/ssrf-ipv6-transition-incomplete-guard,用于检测拒绝私有 IPv4 范围但可通过 IPv6 过渡地址格式绕过的服务器端请求伪造(SSRF)防护。

go/unhandled-writable-file-close 查询现在产生更少的误报。当每个执行路径首先处理对同一文件句柄的 Sync 调用时,它不再标记对 Close 的延迟调用。

py/modification-of-locals 查询不再标记在 locals() 字典传递出其创建范围后的修改,从而减少误报。

我们改进了 swift/weak-sensitive-data-hashing 和 swift/weak-password-hashing 查询的 CryptoKit 建模。这些查询现在可能检测到更多结果。

我们更新了 actions/pr-on-self-hosted-runner 查询以识别最新的标准运行器标签,从而减少误报。

我们修正了 actions/untrusted-checkout/medium 的名称、描述和警报消息,以明确其适用于非特权上下文。

核心信息

GitHub 发布 CodeQL 2.26.0,添加对 Kotlin 2.4.0 的支持,引入 JavaScript/TypeScript 系统提示注入查询,并提升多语言分析准确性。

  • GitHub 发布 CodeQL 2.26.0,添加对 Kotlin 2.4.0 的支持,引入 JavaScript/TypeScript 系统提示注入查询,并提升多语言分析准确性。
  • 原贴提到:CodeQL is the static analysis engine behind GitHub code scanning , which
  • 来源:github.blog
试看内容

成为会员查看完整内容

你已经看到了这篇内容的前置整理,剩余深度部分仅对会员开放。

详细解读 信息差价值 参考来源
成为会员查看完整内容
上一篇 Ghost Font:一种人类能读懂但AI无法识别的反AI字体 下一篇 秘密扫描检测器类型名称更清晰