Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

apache_kafka_importer_v2 import error

未关闭
#2,280 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@kx7m2qd 已经在做这个了。

开始于 2026年5月2日。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
冷清
技术栈
kafka, python

调研方向

从 vulnerabilities/pipelines/v2_importers/apache_kafka_importer.py 和 vulnerabilities/pipes/apache_kafka.py 开始,重点关注 to_advisory_data 和 parse_range。针对已报告的 Kafka CVE 列表运行 apache_kafka_importer_v2,并检查“Apache Kafka Clients (kafka”值是如何传递到 SemverVersion 的。完成的标准是 importer 在没有 InvalidVersion 错误的情况下处理已报告的 advisory。

由索引模型根据 Issue 内容生成。

描述

Importing data using apache_kafka_importer_v2

INFO 2026-04-24 15:04:19.826634 UTC Pipeline [ApacheKafkaImporterPipeline] starting
INFO 2026-04-24 15:04:19.826728 UTC Step [fetch] starting
INFO 2026-04-24 15:04:19.826765 UTC Fetch `https://kafka.apache.org/community/cve-list/`
INFO 2026-04-24 15:04:20.560074 UTC Step [fetch] completed in 1 seconds
INFO 2026-04-24 15:04:20.560229 UTC Step [collect_and_store_advisories] starting
INFO 2026-04-24 15:04:20.561545 UTC Collecting 23 advisories
INFO 2026-04-24 15:04:20.563883 UTC Pipeline failed
INFO 2026-04-24 15:04:20.563969 UTC Running [on_failure] tasks
INFO 2026-04-24 15:04:20.564017 UTC Completed [on_failure] tasks in 0 seconds
'Apache Kafka Clients (kafka' is not a valid <class 'univers.versions.SemverVersion'>

Traceback:
  File "/home/ubuntu/vulnerablecode/vulnerabilities/pipelines/__init__.py", line 111, in execute
    step(self)
  File "/home/ubuntu/vulnerablecode/vulnerabilities/pipelines/__init__.py", line 327, in collect_and_store_advisories
    for advisory in progress.iter(self.collect_advisories()):
  File "/home/ubuntu/vulnerablecode/venv/lib/python3.12/site-packages/aboutcode/pipeline/__init__.py", line 314, in iter
    for item in iterator:
  File "/home/ubuntu/vulnerablecode/vulnerabilities/pipelines/v2_importers/apache_kafka_importer.py", line 70, in collect
_advisories
    yield self.to_advisory_data(table)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/vulnerablecode/vulnerabilities/pipelines/v2_importers/apache_kafka_importer.py", line 93, in to_advi
sory_data
    affected_constraints = parse_range(raw_affected)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/vulnerablecode/vulnerabilities/pipes/apache_kafka.py", line 63, in parse_range
    version=SemverVersion(lhs.strip()),
            ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<attrs generated init univers.versions.Version>", line 7, in __init__
    self.__attrs_post_init__()
  File "/home/ubuntu/vulnerablecode/venv/lib/python3.12/site-packages/univers/versions.py", line 87, in __attrs_post_init
__
    raise InvalidVersion(f"{self.string!r} is not a valid {self.__class__!r}")
Importing data using nvd_importer_v2
主要语言
Python
星标
716
派生
347
平均合并
12 小时 15 分钟
30 天内合并 PR
9

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

aboutcode-org/vulnerablecode 的其他 Issue

查看 aboutcode-org/vulnerablecode 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。