Skip to content

Commit

Permalink
Similar to #99 for GO feeds (#199)
Browse files Browse the repository at this point in the history
* Similar to #99 for GO feeds

Signed-off-by: Prabhu Subramanian <[email protected]>

---------

Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu authored Dec 17, 2024
1 parent df49ad0 commit 124fe27
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "appthreat-vulnerability-db"
version = "5.8.1"
version = "5.8.2"
description = "AppThreat's vulnerability database and package search library with a built-in file based storage. OSV, CVE, GitHub, npm are the primary sources of vulnerabilities."
authors = [
{name = "Team AppThreat", email = "[email protected]"},
Expand Down
1 change: 1 addition & 0 deletions test/data/osv-go.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"GHSA-v778-237x-gjrc","summary":"Misuse of ServerConfig.PublicKeyCallback may cause authorization bypass in golang.org/x/crypto","details":"Applications and libraries which misuse the ServerConfig.PublicKeyCallback callback may be susceptible to an authorization bypass.\n\nThe documentation for ServerConfig.PublicKeyCallback says that \"A call to this function does not guarantee that the key offered is in fact used to authenticate.\" Specifically, the SSH protocol allows clients to inquire about whether a public key is acceptable before proving control of the corresponding private key. PublicKeyCallback may be called with multiple keys, and the order in which the keys were provided cannot be used to infer which key the client successfully authenticated with, if any. Some applications, which store the key(s) passed to PublicKeyCallback (or derived information) and make security relevant determinations based on it once the connection is established, may make incorrect assumptions.\n\nFor example, an attacker may send public keys A and B, and then authenticate with A. PublicKeyCallback would be called only twice, first with A and then with B. A vulnerable application may then make authorization decisions based on key B for which the attacker does not actually control the private key.\n\nSince this API is widely misused, as a partial mitigation golang.org/x/[email protected] enforces the property that, when successfully authenticating via public key, the last key passed to ServerConfig.PublicKeyCallback will be the key used to authenticate the connection. PublicKeyCallback will now be called multiple times with the same key, if necessary. Note that the client may still not control the last key passed to PublicKeyCallback if the connection is then authenticated with a different method, such as PasswordCallback, KeyboardInteractiveCallback, or NoClientAuth.\n\nUsers should be using the Extensions field of the Permissions return value from the various authentication callbacks to record data associated with the authentication attempt instead of referencing external state. Once the connection is established the state corresponding to the successful authentication attempt can be retrieved via the ServerConn.Permissions field. Note that some third-party libraries misuse the Permissions type by sharing it across authentication attempts; users of third-party libraries should refer to the relevant projects for guidance.","aliases":["CVE-2024-45337","GO-2024-3321"],"modified":"2024-12-13T21:56:08Z","published":"2024-12-11T22:03:04Z","related":["CGA-228h-fjfr-4vfr","CGA-22m6-2hv7-7wqc","CGA-24pq-h5fw-43v3","CGA-24qr-hvcm-4q6h","CGA-24x9-q5mv-7v9v","CGA-25f7-3m9j-6x3w","CGA-2696-jcc9-wg7p","CGA-26wp-vph9-62vq","CGA-27mq-c8jc-h222","CGA-282g-jfq6-gvqf","CGA-2c37-2f5r-fvfm","CGA-2cq4-g93r-r7cx","CGA-2gj2-jr2x-5mgh","CGA-2hhc-rfjx-f4pm","CGA-2j5c-px48-8jgh","CGA-2m32-83jj-g3q4","CGA-2m7v-gpw4-26c3","CGA-2v9m-wm23-p9p8","CGA-2vmw-4c88-gjm9","CGA-3363-x4w5-7776","CGA-35ww-mr3v-6w38","CGA-35ww-v6f7-hx5c","CGA-36j3-j65h-3xcc","CGA-36v3-q669-gw4x","CGA-37fm-qjpv-4cx4","CGA-37gf-4mjx-5629","CGA-392f-crf2-77pr","CGA-39wv-69mw-6h45","CGA-3cp6-44f3-3vq9","CGA-3cxc-qxp5-8qj9","CGA-3f8p-vv39-3w73","CGA-3g5w-w2qq-gpj7","CGA-3hgp-9626-rg23","CGA-3hv7-g8r7-pmx2","CGA-3j2f-8wc3-wfrj","CGA-3jv7-v9p9-hmgx","CGA-3pfc-crhw-h2wh","CGA-3q4v-qxc2-3rc2","CGA-3r45-fq28-3c25","CGA-3rgj-87fj-6728","CGA-436r-p3r5-jqf9","CGA-43r9-hjw7-m833","CGA-43vg-5qp9-8rpx","CGA-44hq-5m6p-8q86","CGA-459h-4qpg-5j6c","CGA-473x-w4j2-38vx","CGA-4776-hhq4-jppr","CGA-48j5-fv57-x85q","CGA-4cmq-3qw8-c33m","CGA-4f32-2x3j-93qh","CGA-4f5v-pvmp-6ph8","CGA-4g46-hxjp-w3v5","CGA-4g9r-xhgv-5pvf","CGA-4jxx-jrm8-6v8h","CGA-4m39-wwwv-xwjx","CGA-4qq9-2mhh-69vv","CGA-4qwr-w3fg-h22g","CGA-4r86-767f-hm58","CGA-4w2h-ch3p-539h","CGA-4wwx-8234-9g87","CGA-52p2-fj4m-fxvh","CGA-54hp-796x-hxhq","CGA-54q9-7p22-g82c","CGA-5552-6828-hwgp","CGA-587j-389f-9gpp","CGA-58vx-6h3x-5qx2","CGA-5932-73x5-grp8","CGA-5fhh-43c2-ccq5","CGA-5g22-gv59-hhvx","CGA-5g53-phfv-7f36","CGA-5grx-x7x3-g64j","CGA-5mhp-3f8p-f6fw","CGA-5mw4-3x3q-qmxx","CGA-5p4w-9cg5-f227","CGA-5qp4-w7m8-p5hx","CGA-5vg8-mq5j-wg95","CGA-5w2h-wmmr-w558","CGA-5x49-fr4f-3r6j","CGA-5xg4-qfwc-j48x","CGA-62mq-jc64-fqwh","CGA-636w-mfc4-ccwh","CGA-6395-xhp7-85w4","CGA-64hq-862p-3pww","CGA-65rw-4h88-grmh","CGA-686g-m4w7-jjpv","CGA-68m5-3xv6-h4p5","CGA-6fph-5pff-5wrw","CGA-6ggg-hxhg-6r88","CGA-6ggr-vj32-5548","CGA-6ghr-2q92-3h6g","CGA-6h44-69mr-359m","CGA-6h6q-x48q-2f7m","CGA-6j37-68g3-9gx7","CGA-6q78-qj84-mhg3","CGA-6q8f-f288-p2r8","CGA-6rf3-47xp-mc9v","CGA-6rm2-vjqw-48pm","CGA-6v78-xcp2-pvj8","CGA-6v7c-jw3j-fx47","CGA-6vh6-q6gv-m796","CGA-6w46-mfhh-4w97","CGA-6whc-93q8-7j38","CGA-722j-p23c-v724","CGA-726f-cjw3-6c3q","CGA-73qq-2p2x-x784","CGA-75q8-q5hf-56x7","CGA-76x5-f86g-qxcx","CGA-7c63-47wj-mgg4","CGA-7g82-vfv8-h7xh","CGA-7g8c-qchp-5gp5","CGA-7hhh-3fr3-5fjq","CGA-7hrx-8rgm-47xm","CGA-7jcm-h3m5-fw37","CGA-7jm6-hwmw-vwwm","CGA-7jww-84m9-6326","CGA-7mp3-fw8m-fj56","CGA-7p8h-x538-8x98","CGA-7pf4-r5m7-5mx5","CGA-7rfh-x547-r82q","CGA-8226-gq6c-h5h6","CGA-82gr-6h3h-qv54","CGA-82wv-fpr5-w59f","CGA-83p4-j7xg-58pg","CGA-84xh-r6qp-rrr8","CGA-8543-22m5-68fm","CGA-85f5-rhw9-pcm9","CGA-86qh-q5wf-2p3h","CGA-86qx-gwp4-g57p","CGA-86xm-w6w7-2mr4","CGA-88j8-v3xc-rcjg","CGA-89h5-qq6w-3vcr","CGA-8c23-rf9p-x688","CGA-8g9j-qj6w-55m4","CGA-8gc6-vgv7-82wj","CGA-8h84-f783-h27h","CGA-8hj9-r2q6-g64v","CGA-8hrr-jxm5-vpwx","CGA-8m22-jxm3-585q","CGA-8m9m-3vhw-hjmj","CGA-8p29-6qmj-mfqw","CGA-8q78-gvrh-55p9","CGA-8w5v-qppj-3hv9","CGA-8wqj-7gp8-v3qg","CGA-8x4f-mrjw-3rrh","CGA-8x6g-x82v-gfpw","CGA-8xhw-pw8q-xw76","CGA-927x-f937-89jc","CGA-92jg-f62g-rx9g","CGA-94gf-9rf6-v4rw","CGA-95jw-v3pv-jvx4","CGA-95wm-p2qv-6jmm","CGA-96rp-r5mr-qqpc","CGA-97jf-22mh-596x","CGA-98mw-3pp9-hq84","CGA-996f-7v5h-5f38","CGA-9cq7-xg7w-mxr8","CGA-9f96-7jwr-p2f3","CGA-9fh3-v8v2-6rf9","CGA-9gm3-367f-hmmj","CGA-9jxv-f66p-gj3p","CGA-9m7w-9xq2-mrgg","CGA-9mx9-7g57-cxgr","CGA-9rxv-wxx9-v7rr","CGA-9x89-g9hh-h49j","CGA-c57q-f6c6-9jj7","CGA-c589-3fmv-mv98","CGA-c593-jq73-qjc8","CGA-c5fx-82mm-hv2v","CGA-c6rg-5vmq-cpcc","CGA-c85q-x79v-9j93","CGA-c99v-rjqm-wf2m","CGA-c9gg-r469-c9mm","CGA-cc5g-7vh9-fjhv","CGA-cf7j-p2gj-8r5x","CGA-cg38-mv4g-6pfx","CGA-cjmv-2gq7-cm5g","CGA-cmjx-98m5-92vv","CGA-cr49-jp4x-mm9v","CGA-crqg-m8c2-w7jj","CGA-crrg-rmjw-v7rc","CGA-cx9r-h47m-3rx2","CGA-f244-x97j-93mq","CGA-f24f-34q5-g6gf","CGA-f3ph-rgv3-8x94","CGA-f3pw-84ch-q3jh","CGA-f5r9-vhhm-6w7r","CGA-f8fq-37hf-mwm3","CGA-f8h2-cc76-pg5v","CGA-f9cj-8fqf-pm58","CGA-ffcq-fg4h-8pww","CGA-fff5-x3qv-qg2p","CGA-fh3g-gqgw-pqm6","CGA-fjg2-gm44-jqv2","CGA-fjmv-r6mp-rcp8","CGA-fm4m-mcf4-75ph","CGA-fvmx-f5wr-pwcf","CGA-fvxq-852h-cghq","CGA-fw89-7ghw-3cmg","CGA-fwhh-73gg-92qv","CGA-g2g9-rw35-jjjc","CGA-g2hr-67m8-863x","CGA-g2j4-frfj-6jjq","CGA-g3f8-vj92-fj7j","CGA-g3qj-w336-37j9","CGA-g3vw-vvp3-m48g","CGA-g4w9-f4gr-8jph","CGA-g5gw-3fr6-hqhj","CGA-g7jw-82cf-9hwj","CGA-g7rr-j37m-32vm","CGA-g7wj-64wc-p87r","CGA-g8fw-vfqv-fmjx","CGA-g8hh-p45f-8cp9","CGA-gc49-jmcx-3r34","CGA-gc4c-wjpx-7fpv","CGA-gcf7-mwgp-xv39","CGA-gcxq-pj9w-4h7j","CGA-gfgg-vw6c-v7f9","CGA-gm9r-mp76-4v56","CGA-gp82-34xg-j3hq","CGA-gpfg-9qjj-j45w","CGA-gqq6-jpg3-p5rx","CGA-gvfr-wwf9-32w9","CGA-gwgc-rfpp-f64c","CGA-gxgf-572r-m86g","CGA-h24c-x62v-p62h","CGA-h25p-pvrv-vqrf","CGA-h3g2-gcrj-r5jf","CGA-h46q-f568-mh9p","CGA-h4p2-gf67-r7gm","CGA-h5jr-8xcc-q6w2","CGA-h6gp-75m9-qp4g","CGA-h85h-45qc-v23p","CGA-h8vg-3m33-5gff","CGA-h98w-j7x9-g2p3","CGA-h9gh-4hfh-w6h8","CGA-hc5x-qvpv-9xp2","CGA-hcmf-c28m-5hj8","CGA-hg88-x5fp-q473","CGA-hggw-7f3j-mj95","CGA-hgh6-g93x-4m88","CGA-hgm8-x79f-ghvm","CGA-hh22-p4q4-696x","CGA-hjfv-h3rf-vr9p","CGA-hmjv-qv47-6jfq","CGA-hmxv-7hjp-cwpp","CGA-hpc9-3m9v-4chh","CGA-hpv4-7q3j-33gh","CGA-hq5j-q73m-qqc9","CGA-hqw4-h7qr-848p","CGA-hv8x-cwhf-9cx9","CGA-hx8x-vf82-j88r","CGA-hxcx-7xm8-jcr4","CGA-j276-fj8m-j66f","CGA-j276-q65g-gpc9","CGA-j27m-2488-v6gm","CGA-j2r3-xm6j-qjc5","CGA-j56h-f6mc-fcpm","CGA-j674-wrhf-8r6q","CGA-j6gc-4pgq-fwxg","CGA-j6rv-g4h9-x9fw","CGA-j7w4-wcvf-px8g","CGA-j9q4-288x-gpf5","CGA-jc2g-82h2-4x7r","CGA-jfpj-xwv7-v2cp","CGA-jg72-55h2-6r59","CGA-jhhw-w8gg-53px","CGA-jm4m-9wvm-c7pq","CGA-jxmf-hmx5-h9c8","CGA-m25p-vxc9-4g24","CGA-m27x-mcj6-vf59","CGA-m3fw-frq7-fq22","CGA-m3h4-4x5g-fh7j","CGA-m3vv-qxqq-v354","CGA-m68x-p339-v6jh","CGA-m8hr-4jrh-j292","CGA-m9rg-wpwq-v8q7","CGA-m9rp-87wr-xj88","CGA-mg3w-h4gh-wmvh","CGA-mpqp-fr27-g8q3","CGA-mr9v-m9xp-q2m5","CGA-mxwj-h8cg-vpxv","CGA-p35f-qv46-7jwr","CGA-p489-vmhm-7pq8","CGA-p49w-jmvf-8j87","CGA-p599-xf5w-c9r2","CGA-p5m5-c65j-m9gv","CGA-p62m-fwhf-gwc6","CGA-p6c3-h48r-gxpw","CGA-p6cp-g4vh-9345","CGA-p6wc-p263-fcgg","CGA-p9c4-rrvc-jm8g","CGA-p9w2-qpf7-f95m","CGA-pg24-67h9-vrmq","CGA-pg9v-2xr3-55x6","CGA-ph9j-8mh6-qhgr","CGA-phf7-g396-8869","CGA-phrr-4hg6-4phx","CGA-pjrh-66vw-v55f","CGA-pjwm-22pg-r975","CGA-pm5p-rjx9-74xw","CGA-pqvx-7q2v-qxx7","CGA-prhv-hgr8-865h","CGA-prm5-xj5j-vq7r","CGA-prpr-4mxq-w67p","CGA-pvv9-fx7w-49x4","CGA-pwwf-29cm-r8jq","CGA-q285-j6xx-3hgp","CGA-q324-7949-wc56","CGA-q3qg-5fvw-744j","CGA-q3x4-f9vf-32h4","CGA-q598-x4c2-qcg9","CGA-q69c-ggmp-5wrg","CGA-q82v-6gfq-87gp","CGA-q892-385q-9p8q","CGA-q8gg-x8pm-wvfg","CGA-qc23-8j6m-xxxc","CGA-qcw5-w98w-3prj","CGA-qg9x-whvc-99rm","CGA-qjw7-pv7h-82w6","CGA-qp7g-84hh-mw3r","CGA-qqg7-74mx-fcp9","CGA-qqvr-wq75-xrxq","CGA-qr7p-rgfg-r5mm","CGA-qwgr-cx5h-5r9f","CGA-qx9g-2jr3-8gjm","CGA-qxrc-957p-4mjc","CGA-r247-46rw-m7qr","CGA-r28p-8x4c-qcwh","CGA-r2p6-w3wp-xmm5","CGA-r36x-64c8-7qgf","CGA-r45m-9fpq-8xgf","CGA-r49f-8xpf-3gh9","CGA-r53h-8h6c-7rw7","CGA-r5gh-fgmr-qv59","CGA-r786-mcqw-6fmw","CGA-r868-wgr8-339v","CGA-rc9p-ww2x-9rgj","CGA-rhxq-3f3m-cqvq","CGA-rm5p-8wgw-x292","CGA-rq5g-94jh-v9jp","CGA-rrp7-934v-555r","CGA-rv7r-v22v-8rff","CGA-rw2h-cpf6-4593","CGA-rw55-mxmc-g8q4","CGA-rx4x-cvh9-8rmj","CGA-rxq7-37gv-5963","CGA-v2xh-wx8w-qc9x","CGA-v4p7-qg79-m8c2","CGA-v5gj-2v8h-5r69","CGA-v62c-555x-px98","CGA-v76x-cq2h-6hhp","CGA-v895-95j9-5q8g","CGA-vc23-fwpw-mmh2","CGA-vcf8-5chr-mm2w","CGA-vchj-hmpg-6jxr","CGA-vcw8-8rcc-3r7x","CGA-vg8m-2vfq-4jj3","CGA-vgcm-w7fr-ffh2","CGA-vgjg-grjj-x2jj","CGA-vjpm-5vg7-g4j3","CGA-vjpm-wc83-c8h5","CGA-vjr2-cm95-q645","CGA-vpvp-x383-xjmc","CGA-vqmj-97w8-99gr","CGA-vqw4-2rjp-547r","CGA-vvgr-wwx8-2f82","CGA-w2j3-9pgv-v97g","CGA-w3qx-p3xm-r2m9","CGA-w5qq-94m2-qmh9","CGA-w78m-575p-jq85","CGA-w7j5-fhmj-wxwg","CGA-w8mc-m4fr-c9w6","CGA-w95r-p5xp-fpmf","CGA-w9j3-mf28-5f6g","CGA-wc46-vmph-j9m8","CGA-wcrw-4592-hcjq","CGA-wg8m-qmp4-xv2j","CGA-whqm-9326-qf4h","CGA-wm6x-qxjv-98rv","CGA-wm9r-whv7-47c8","CGA-wpc6-j64x-j6cp","CGA-wqjh-jc5x-gxj2","CGA-wr4x-mgcg-prv5","CGA-wrg3-v3h8-537c","CGA-wvcw-8j3m-9v73","CGA-wxvp-3cmv-6vj2","CGA-x29g-9rpf-c3v8","CGA-x34q-5q5m-8q8v","CGA-x3jg-4hfr-m5xf","CGA-x444-gwfj-x9r7","CGA-x4c5-j935-r8pp","CGA-x4c9-8x9h-9882","CGA-x5f4-h23r-j9xf","CGA-x67h-f9x3-85jr","CGA-x77p-g2pv-fqqw","CGA-x88c-rxf4-5g6v","CGA-x8w9-87rm-gwfc","CGA-x97h-qx7x-2q4r","CGA-xc3h-99g2-95ph","CGA-xg27-jwq5-4wcm","CGA-xg63-rghc-rjx3","CGA-xhpf-3gjh-w494","CGA-xm22-gv2v-8724","CGA-xpg7-78v6-qgf2","CGA-xqv5-pch6-8ch6","CGA-xw88-p9wq-p9wp","CGA-xxrv-9627-w8wm"],"database_specific":{"github_reviewed_at":"2024-12-11T22:03:04Z","github_reviewed":true,"severity":"CRITICAL","cwe_ids":["CWE-285"],"nvd_published_at":"2024-12-12T02:02:07Z"},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-45337"},{"type":"WEB","url":"https://github.com/golang/crypto/commit/b4f1988a35dee11ec3e05d6bf3e90b695fbd8909"},{"type":"PACKAGE","url":"https://github.com/golang/crypto"},{"type":"WEB","url":"https://go.dev/cl/635315"},{"type":"WEB","url":"https://go.dev/issue/70779"},{"type":"WEB","url":"https://groups.google.com/g/golang-announce/c/-nPEi39gI4Q/m/cGVPJCqdAQAJ"},{"type":"WEB","url":"https://pkg.go.dev/vuln/GO-2024-3321"},{"type":"WEB","url":"http://www.openwall.com/lists/oss-security/2024/12/11/2"}],"affected":[{"package":{"name":"golang.org/x/crypto","ecosystem":"Go","purl":"pkg:golang/golang.org/x/crypto"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.31.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/12/GHSA-v778-237x-gjrc/GHSA-v778-237x-gjrc.json"}}],"schema_version":"1.6.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"}]}
22 changes: 19 additions & 3 deletions test/test_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,15 @@ def test_osv_pypi3_json():
return json.loads(fp.read())


@pytest.fixture
def test_osv_go2_json():
test_cve_data = os.path.join(
os.path.dirname(os.path.realpath(__file__)), "data", "osv-go.json"
)
with open(test_cve_data, "r") as fp:
return json.loads(fp.read())


@pytest.fixture
def test_osv_maven_cvss4_json():
test_cve_data = os.path.join(
Expand Down Expand Up @@ -397,6 +406,7 @@ def test_convert2(test_cve_wconfig_json):
assert detail.package_type
assert not detail.fixed_location


def test_nvd_api_convert(test_nvd_api_json1, test_nvd_api_json2, test_nvd_api_json3):
nvdlatest = NvdSource()
data = nvdlatest.convert(test_nvd_api_json1)
Expand Down Expand Up @@ -483,7 +493,7 @@ def test_osv_convert(
test_osv_go_json,
test_osv_pypi_json,
test_osv_pypi2_json,
test_osv_pypi3_json
test_osv_pypi3_json,
):
osvlatest = OSVSource()
cve_data = osvlatest.convert(test_osv_pypi3_json)
Expand All @@ -497,15 +507,21 @@ def test_osv_convert(
assert cve_data
assert len(cve_data) == 3
cve_data = osvlatest.convert(test_osv_go_json)
assert cve_data
assert len(cve_data) == 1
assert not cve_data
cve_data = osvlatest.convert(test_osv_pypi_json)
assert cve_data
assert len(cve_data) == 1
cve_data = osvlatest.convert(test_osv_pypi2_json)
assert not cve_data


def test_osv_go2_convert(test_osv_go2_json):
osvlatest = OSVSource()
cve_data = osvlatest.convert(test_osv_go2_json)
assert cve_data
assert len(cve_data) == 1


def test_osv_convert4(test_osv_maven_cvss4_json):
osvlatest = OSVSource()
# maven cvss4 version
Expand Down
11 changes: 10 additions & 1 deletion vdb/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ def build_args():
dest="only_aqua",
help="Use only Aqua vuln-list as the source. Use with --cache.",
)
parser.add_argument(
"--only-ghsa",
action="store_true",
default=False,
dest="only_ghsa",
help="Use only GHSA as the source. Use with --cache.",
)
parser.add_argument(
"--sync",
action="store_true",
Expand Down Expand Up @@ -172,12 +179,14 @@ def main():
sources = [OSVSource()]
elif args.only_aqua:
sources = [AquaSource()]
elif args.only_ghsa:
sources = [GitHubSource()]
else:
sources = [OSVSource(), GitHubSource()]
# AquaSource also includes NVD
if args.cache_os:
sources.insert(0, AquaSource())
elif not args.only_aqua and not args.only_osv:
elif not args.only_aqua and not args.only_osv and not args.only_ghsa:
sources.append(NvdSource())
for s in sources:
LOG.info("Refreshing %s", s.__class__.__name__)
Expand Down
6 changes: 3 additions & 3 deletions vdb/lib/osv.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ def to_vuln(self, cve_data):
# Offer an option to ignore malware data to keep the db size small
if os.getenv("OSV_EXCLUDE_MALWARE") and cve_id.startswith("MAL"):
return ret_data
# Quality of PYSEC data is quite low missing both severity and score
# Where a PYSEC feed also reference a github id, let's ignore it since G comes before P
# Quality of PYSEC and GO data is quite low missing both severity and score
# Where a PYSEC or GO feed also reference a github id, let's ignore it since G comes before P
# so it would have gotten processed
# Fixes #99
if cve_id.startswith("PYSEC"):
if cve_id.startswith("PYSEC") or cve_id.startswith("GO-"):
for i in aliases:
if i.startswith("GHSA"):
return ret_data
Expand Down

0 comments on commit 124fe27

Please sign in to comment.