aboutcode-org / aboutcode-org/vulnerablecode

Are we identifying all affected Ubuntu packages?

オープン
#1,095 コメント 2 件 リアクション 0 件 担当者 1 名 @johnmhoran が担当を希望しています GitHub で見る
Data collection enhancement
主要言語
Python
スター
702
フォーク
328
平均マージ
3日 8時間
マージ済み PR(30日)
3

説明

While working on the SUSE Oval importer, I've been exploring the Debian and Ubuntu OVAL importers and noticed that in one set of test files, we are reporting `potrace` as an affected package but arguably should also report `libpotrace0` as an affected package.

I think the relevant `oval_parser.py` code is [here](https://github.com/nexB/vulnerablecode/blob/main/vulnerabilities/oval_parser.py#L103-L120). This function searches the `` element for a `var_ref` field and when found uses RegEx to extract the name of a package from the `comment` field.

With the test file [ubuntu_oval_data.xml](https://github.com/nexB/vulnerablecode/blob/main/vulnerabilities/tests/test_data/ubuntu_oval_data.xml), for example, it seems the term `potrace` is extracted from `comment="The 'potrace' package binaries."` on [line 83](https://github.com/nexB/vulnerablecode/blob/main/vulnerabilities/tests/test_data/ubuntu_oval_data.xml#L83).

However, in the `` element [below](https://github.com/nexB/vulnerablecode/blob/main/vulnerabilities/tests/test_data/ubuntu_oval_data.xml#L97-L106), there is not only a similar `comment` field, but two nested `` elements, one with the text `libpotrace0` and the other with the text `potrace`. I suspect that we actually want to report both of these as affected packages, but current report only `potrace` (see [ubuntu-oval-expected.json](https://github.com/nexB/vulnerablecode/blob/main/vulnerabilities/tests/test_data/ubuntu-oval-expected.json#L12)).

BTW, based on minor sampling thus far, it appears that neither Debian nor SUSE includes a `` element in their respective OVAL XML structures.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。