Skip to content

Commit

Permalink
testing modification of CPE
Browse files Browse the repository at this point in the history
  • Loading branch information
sudesh0sudesh authored and sudesh0sudesh committed Apr 10, 2024
1 parent 009bf6f commit f96d92b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion opencve/commands/imports/cve.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def run():
total_results = 0
openai_api_key=os.environ.get("OPEN_AI_KEY",None)
client = OpenAI(api_key=openai_api_key)
instruction="Your sole purpose is to extract only a single cpe information in the format 'cpe:2.3:a:vendor:product' from the provided CVE summary without any heading and other information."
instruction="Your sole purpose is to extract only a single cpe information in the format 'cpe:2.3:a:vendor:product' from the provided CVE summary; Replace a with h for hardware or o for Operating system based on type of vulnerbility. If there is no match please return 'cpe:2.3:a:::' Answer without any heading and other information."

while start_index <= total_results:
url = url_template.format(idx=start_index)
Expand Down
2 changes: 1 addition & 1 deletion opencve/commands/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def create_change(cls, cve_obj, cve_json, task, events):
def create_cve(cls, cve_json):
openai_api_key=os.environ.get("OPEN_AI_KEY",None)
client = OpenAI(api_key=openai_api_key)
instruction="Your sole purpose is to extract only a single cpe information in the format 'cpe:2.3:a:vendor:product' from the provided CVE summary without any heading and other information."
instruction="Your sole purpose is to extract only a single cpe information in the format 'cpe:2.3:a:vendor:product' from the provided CVE summary; Replace a with h for hardware or o for Operating system based on type of vulnerbility. If there is no match please return 'cpe:2.3:a:::' Answer without any heading and other information."

# Takes the CVSS scores
if "cvssMetricV31" in cve_json["metrics"]:
Expand Down

0 comments on commit f96d92b

Please sign in to comment.