# 使用 Homebrew Cask 安装 codeql

查看 codeql 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install cask:codeql
```

其他安装命令:

### macOS

- Homebrew Cask (100%):

```sh
brew install --cask codeql
```

  证据: local Homebrew cask metadata

## 软件包事实

- **软件包键:** cask:codeql
- **软件包管理器:** Homebrew Cask
- **版本:** 2.26.2
- **来源摘要:** Semantic code analysis engine
- **主页:** <https://codeql.github.com/>
- **最后更新:** 2026-07-29T16:12:41Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- codeql (二进制)
- codeql (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2.26.2
## 项目历史与用法

CodeQL is GitHub's semantic code analysis engine and query language, packaged for command-line use through the CodeQL CLI. It is used for code scanning, security research, custom queries, and CI analysis.

### 项目历史

CodeQL originated at Semmle, whose semantic analysis technology was acquired by GitHub in 2019. GitHub subsequently made CodeQL central to GitHub Advanced Security and to code scanning workflows, with the CLI distributed from GitHub-controlled release repositories.

### 采用历史

Adoption moved from security research and Semmle users into GitHub's hosted code scanning product, GitHub Actions workflows, and enterprise security programs. The CLI remains important for users who need local analysis, custom queries, alternative CI systems, or prebuilt CodeQL databases.

### 使用方式

The CLI creates CodeQL databases, runs queries, analyzes code, produces SARIF results, manages CodeQL packs, and uploads results to GitHub code scanning. GitHub recommends the CodeQL bundle because it includes the CLI plus compatible queries and libraries.

### 为什么软件包爱好者会关心

Package nerds care because the Homebrew cask wraps a large, versioned security-analysis toolchain that is otherwise commonly installed from GitHub release bundles. Its formula/cask packaging makes CodeQL feel like a normal terminal tool despite its bundled queries, extractors, and platform-specific binaries.

### 时间线

- 2019: GitHub creates the codeql-cli-binaries repository for CLI binaries.
- 2019: GitHub acquires Semmle, bringing CodeQL into GitHub.
- 2020: CodeQL becomes a core part of GitHub code scanning and Advanced Security workflows.
- 2026: Homebrew cask distributes CodeQL CLI 2.25.6.

### Related projects

- Related projects include github/codeql for queries and libraries, github/codeql-action for GitHub Actions integration, GitHub code scanning, SARIF tooling, and CodeQL for Visual Studio Code.

### 来源

- <https://github.com/github/codeql-cli-binaries>
- <https://docs.github.com/en/code-security/codeql-cli>
- <https://docs.github.com/api/article/body?pathname=/en/code-security/how-tos/find-and-fix-code-vulnerabilities/scan-from-the-command-line/set-up-codeql-cli>
- <https://formulae.brew.sh/api/cask/codeql.json>


## 安全说明

没有找到 codeql 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。


## 其他软件包管理器记录

- Nix - codeql: normalized package name match | nixpkgs package indexes: pkgs/by-name/co/codeql/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Scoop - main/codeql: normalized package name match | Scoop official bucket manifest trees: bucket/codeql.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/codeql.yml](https://github.com/mxcl/pkgdb/blob/main/combined/codeql.yml)


## 来源

- pkg.so package database
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
