RedHatProductSecurity / cvelib

A Python library and command line interface for CVE Services.
MIT License
52 stars 24 forks source link

Question/Feature request: Python library interface #43

Closed MrSeccubus closed 1 year ago

MrSeccubus commented 1 year ago

I'm developing a GitHub action to check and subit CVE Records.

Right now I call cvelib via the cli interface:

def cve_exec(arguments):
    stream = os.popen("cve {} --raw".format(arguments))
    json_data = json.loads(stream.read())
    stream.close()
    return json_data

But I think it would be better if I called it programatically via an import. Is there any way to do this?

mprpic commented 1 year ago

I added an example into the readme file in #46. Please review it and let us know if anything else needs clarification.

MrSeccubus commented 1 year ago

That seems to be ok and a much better way then calling the cli. Thanks for the clarification.