semgrep/semgrep-rules

GitHub: semgrep/semgrep-rules

Semgrep 社区版静态分析规则集合,为代码安全扫描提供开箱即用的检测规则。

Stars: 1205 | Forks: 565

# semgrep-rules [![由 semgrep 提供支持](https://img.shields.io/badge/powered%20by%20semgrep-2ACFA6)](https://semgrep.dev/) 加入 Semgrep 社区 Slack 欢迎!此仓库包含 [Semgrep](https://semgrep.dev/) 的社区版规则。 除了此仓库中的规则外,[Semgrep Registry](https://semgrep.dev/explore) 还提供专有的 [Pro 规则](https://semgrep.dev/products/semgrep-code/pro-rules),它们提供了额外的语言覆盖,并解锁了跨文件和深度数据流分析。 - 查找规则:通过 [Semgrep Registry 搜索](https://semgrep.dev/r) 搜索社区版和 Pro 规则。 - 使用规则:通过 [Semgrep AppSec Platform](https://semgrep.dev/login) 使用这些规则扫描您的代码 - 贡献规则:有关更多信息,请参见[为 Semgrep 规则做贡献](https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/)。 ## 使用 Semgrep 规则仓库 要开始编写和使用 Semgrep 规则,请参阅[学习 Semgrep 语法](https://semgrep.dev/learn)和[编写规则](https://semgrep.dev/docs/writing-rules/overview/)。然后,使用 [Semgrep 命令行接口(Semgrep CLI)](https://semgrep.dev/docs/getting-started/)在本地运行现有的和自定义的 Semgrep 规则,或者[在 CI 中持续使用 Semgrep 的同时结合 Semgrep AppSec Platform](https://semgrep.dev/docs/semgrep-app/getting-started-with-semgrep-app/)。 ## 编写 Semgrep 规则 有关信息,请参见[编写规则](https://semgrep.dev/docs/writing-rules/overview/),内容包括: - 模式语法,详细描述了 Semgrep 模式的功能,以及省略号操作符、元变量的示例用例。 - 规则语法,描述 Semgrep YAML 规则文件,它可以具有多个模式、详细的输出消息和自动修复。该语法允许使用布尔运算符组合单个模式。 您还可以通过[基于示例的交互式 Semgrep 规则教程](https://semgrep.dev/learn)学习如何编写规则。 ## 附加信息 ### 帮助 加入 [Slack](https://go.semgrep.dev/slack) 以最快地获得您的问题解答!或者通过 support@semgrep.com 联系团队。 ### 运行测试的 GitHub Action 如果您复刻此仓库或创建了自己的仓库,您可以将 GitHub Action 添加到您的工作流中,该操作将使用最新版本的 Semgrep 自动测试您的规则。请参见我们的 [semgrep-rules-test 示例](https://github.com/returntocorp/semgrep-rules/blob/develop/.github/workflows/semgrep-rules-test.yml)。 ### 规则集 规则集是源自 Semgrep Registry 的按用途、语言或框架分组的规则集合。如果您想修改现有的规则集或创建自己的规则集,请通过 support@semgrep.com 联系我们。
标签:IPv6支持, LNA, 错误基检测, 静态代码分析