You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use centralized function/objects for all network access #591
I skimmed the code and found a fetch_response utility function in vulnerabilities/utils.py, more fetch_* functions/methods purpose-built for their respective importers, and fetch methods various VersionAPI subclasses.
Before I try to fix this issue, I would like to know if this is what you're talking about as well? Perhaps, you know of some more?
My plan to fix this:
Understand how each importer/VersionAPI fetches data.
Separate what's general to every importer/VersionAPI from what's special to each.
Design a base Fetcher class (analogous to the Importer class).
Specialize (through inheritance) the Fetcher class for an importer/VersionAPI as necessary.
I'm contributing for the first time and will appreciate all the advice and constructive criticism I get get. :)
Hi @pombredanne, I’m a student new to VulnerableCode and I’d like to help with this issue. I see #2113 was closed and #2234 is open and partially addresses this. Is a centralized network helper (a shared fetch function with error handling, retries, and one place for headers/proxy) still wanted? If so, I could start small: build the shared helper on top of #2234’s approach and migrate one importer, then open a PR for feedback. Does that fit what you have in mind, and is anyone currently working on it? If it’s free, I’d appreciate being assigned.
Activity
abhi-kr-2100 commentedon Nov 21, 2022
I skimmed the code and found a
fetch_responseutility function invulnerabilities/utils.py, morefetch_*functions/methods purpose-built for their respective importers, andfetchmethods variousVersionAPIsubclasses.Before I try to fix this issue, I would like to know if this is what you're talking about as well? Perhaps, you know of some more?
My plan to fix this:
Fetcherclass (analogous to theImporterclass).Fetcherclass for an importer/VersionAPI as necessary.I'm contributing for the first time and will appreciate all the advice and constructive criticism I get get. :)
Implement centralized network access (Issue aboutcode-org#591) - Phase 1
sharwaripalve33-sketch commentedon Oct 17, 2026
Hi @pombredanne, I’m a student new to VulnerableCode and I’d like to help with this issue. I see #2113 was closed and #2234 is open and partially addresses this. Is a centralized network helper (a shared fetch function with error handling, retries, and one place for headers/proxy) still wanted? If so, I could start small: build the shared helper on top of #2234’s approach and migrate one importer, then open a PR for feedback. Does that fit what you have in mind, and is anyone currently working on it? If it’s free, I’d appreciate being assigned.