splunk / splunk/splunk-sdk-python
Unverified SSL context
未关闭
适合新手
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 743
- 派生
- 387
- 平均合并
- 42 分钟
- 30 天内合并 PR
- 4
描述
Unverified SSL context detected. This will permit insecure connections without verifyingSSL certificates. Can this use 'ssl.create_default_context()' instead.
Suggested Change:
if not verify:
# verify=False is an explicit, user-requested opt-out of certificate
# validation (e.g. for self-signed Splunk instances). Build the context
# from the public API rather than the private _create_unverified_context() helper.
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 splunklib/binding.py 大约第 1765 行开始,这里会为 verify 设置创建 SSL 上下文。检查现有的 verify=False 路径,并确认其使用 ssl.create_default_context(),同时保留针对自签名实例的显式退出验证。完成不安全上下文检测的处理,且不改变请求的验证行为后,工作即告完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- security
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 冷清
- 描述清晰度
- 描述清楚
- 新手友好度
- 82/100