RedHatProductSecurity / cvelib

A Python library and command line interface for CVE Services.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question/Feature request: Python library interface

MrSeccubus opened this issue · comments

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?

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

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