File size: 1,298 Bytes
85c3f44 18c6f92 85c3f44 18c6f92 85c3f44 18c6f92 85c3f44 2568dca 18c6f92 85c3f44 2568dca 18c6f92 85c3f44 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | from openai import OpenAI
from dotenv import load_dotenv
from pathlib import Path
import json
readPath = Path(__file__).parent / "toolsDescriptions/tool_docs.json"
load_dotenv()
def main():
client = OpenAI()
with open(readPath, "r") as f:
tool_description = json.load(f)
instructions = "Tool usage guidance:\n" + json.dumps(tool_description, indent=2)
response = client.responses.create(
model= "gpt-4o",
tools= [{
"type": "mcp",
"server_label": "ScriScribeMCPHuggingFacebeMCP",
"server_url": "https://eporath-scribe-mcp.hf.space/mcp",
"require_approval": "never",
}],
input = "Query the vulnerabilities table for the top 5 risky CVEs - KEV vulnerabilities and vulnerabilities with highest EPSS scores."
#+ "Take each risky CVES from the first query and then Query the vulnerabilities table of each of them to get a list of affected products."
#+ "Create a report summarizing the findings."
#+ "Query the lineage check if these products have assets of type pod; in that case these products are in production and are more risky."
#instructions = instructions
)
print(response.output_text)
if __name__ == "__main__":
main() |