PyCQA/bandit

GitHub: PyCQA/bandit

Bandit 是一款专注于 Python 代码安全审计的静态分析工具,利用 AST 技术自动检测常见的安全漏洞和编码风险。

Stars: 7827 | Forks: 732

.. image:: https://raw.githubusercontent.com/pycqa/bandit/main/logo/logotype-sm.png :alt: Bandit ====== .. image:: https://github.com/PyCQA/bandit/actions/workflows/pythonpackage.yml/badge.svg?branch=main :target: https://github.com/PyCQA/bandit/actions?query=workflow%3A%22Build+and+Test+Bandit%22+branch%3Amain :alt: 构建状态 .. image:: https://readthedocs.org/projects/bandit/badge/?version=latest :target: https://readthedocs.org/projects/bandit/ :alt: 文档状态 .. image:: https://img.shields.io/pypi/v/bandit.svg :target: https://pypi.org/project/bandit/ :alt: 最新版本 .. image:: https://img.shields.io/pypi/pyversions/bandit.svg :target: https://pypi.org/project/bandit/ :alt: Python 版本 .. image:: https://img.shields.io/pypi/format/bandit.svg :target: https://pypi.org/project/bandit/ :alt: 格式 .. image:: https://img.shields.io/badge/license-Apache%202-blue.svg :target: https://github.com/PyCQA/bandit/blob/main/LICENSE :alt: 许可证 .. image:: https://img.shields.io/discord/825463413634891776.svg :target: https://discord.gg/qYxpadCgkx :alt: Discord 来自 PyCQA 的安全检查工具 ## 概述 Bandit 是一个旨在发现 Python 代码中常见安全问题的工具。为了做到这一点,Bandit 会处理每个文件,从中构建 AST,并针对 AST 节点运行相应的插件。一旦 Bandit 完成对所有文件的扫描,它就会生成一份报告。 Bandit 最初是在 OpenStack 安全项目中开发的,后来迁移到了 PyCQA。 .. image:: https://raw.githubusercontent.com/pycqa/bandit/main/bandit-terminal.png :alt: Bandit 示例屏幕截图 ## 展示您的风格 .. image:: https://img.shields.io/badge/security-bandit-yellow.svg :target: https://github.com/PyCQA/bandit :alt: 安全状态 在您项目的 README 中使用我们的徽章! 使用 Markdown:: ``` [![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit) ``` 使用 RST:: ``` .. image:: https://img.shields.io/badge/security-bandit-yellow.svg :target: https://github.com/PyCQA/bandit :alt: Security Status ``` ## 参考资料 Python AST 模块文档:https://docs.python.org/3/library/ast.html Green Tree Snakes - 缺失的 Python AST 文档: https://greentreesnakes.readthedocs.org/en/latest/ Bandit 目前涵盖或可扩展涵盖的各种 AST 节点类型的文档: https://greentreesnakes.readthedocs.org/en/latest/nodes.html ## 容器镜像 Bandit 以容器镜像的形式提供,该镜像在 bandit 仓库中使用 GitHub Actions 构建。该镜像可在 ghcr.io 上获取: .. code-block:: console ``` docker pull ghcr.io/pycqa/bandit/bandit ``` 该镜像为以下架构构建: 要拉取特定架构,请使用以下格式: .. code-block:: console ``` docker pull --platform= ghcr.io/pycqa/bandit/bandit:latest ``` 每个镜像都使用 sigstore cosign 签名,可以使用以下 cosign 命令验证来源: .. code-block:: console ``` cosign verify ghcr.io/pycqa/bandit/bandit:latest \ --certificate-identity https://github.com/pycqa/bandit/.github/workflows/build-publish-image.yml@refs/tags/ \ --certificate-oidc-issuer https://token.actions.githubusercontent.com ``` 其中 `` 是 Bandit 的发布版本。 ## 赞助商 Bandit 的开发得益于以下赞助商的支持: .. list-table:: :width: 100% :class: borderless 如果您也 ❤️ Bandit,请考虑赞助。
标签:AST, CI/CD, DevSecOps, docx, GUI应用, Linter, LNA, odt, pptx, PyCQA, Python, Python 安全, Rust语言, SAST, XML 请求, 上游代理, 云安全监控, 代码扫描, 代码检查, 代码质量, 安全专业人员, 安全审计, 安全开发, 开源安全, 抽象语法树, 文档结构分析, 无后门, 漏洞检测, 盲注攻击, 自动化payload嵌入, 自动化测试, 请求拦截, 软件供应链安全, 远程方法调用, 逆向工具, 错误基检测, 静态代码分析, 静态分析