Skip to content

Create custom CTI News Briefings using OpenAI and LangChain

License

Notifications You must be signed in to change notification settings

her0marodeur/AI-CTI-Briefing

Repository files navigation

AI-CTI-Briefing

Create custom CTI News Briefings using OpenAI and LangChain.

This is all work in progress and at a very early stage but it is working and I hope for some community input.

Quick Start

Clone the repo and do:

pip install -r requirements.txt

Create a .env file by copying and adding keys into the .env.example file.

Set up a CRON job that runs the script daily.

You now get AI powered news. YEAH!

NOTES:

  • The script was build using an API key from a free OpenAI trial and therefore limits the context size a lot. If you are using better models you can achieve better results, by editing the prompts and this in the main.py:
llm = OpenAI(max_tokens=2048)

How to make it better?

How does it work?

The tool currently scrapes the following feeds:

And the CVE trends from:

The tool then selects the most relevant headlines according to the following prompt:

Given the headlines: 
{headlines}

From various news sources.

Please select the 3 most interesting headlines for a daily news briefing intended for a Pentester/Red Teamer. 
Please ensure that the headlines are not covering the same topic.
List each headline you select on a new line, preceded by a hyphen and a space. For example:
- Headline 1
- Headline 2
- Headline 3

Note: If you adjust the number of headlines, append a or delete a '- Headline n' to or from the prompt.

And summarizes them using the following prompt:

Please summarize the following article:

{full_article}

in 80 words.

Focus on the key messages and actionable takeaways for somebody working as a Pentester/Red Teamer.

Include the title in the summary.

Output format should be:

Title

Summary

It bundles all the stuff together and ships the final product:

Given the full text articles:

{full_articles}

And these CVEs with descriptions

{cve_report}

Please write a news briefing for someone working in Red Teaming and Pentesting. 
From the CVEs and their summaries mention the top 3 with the most critical impact by CVE ID and say which product is affected and how.
Also provide 2 ideas for an interesting tweet for a cybersecurity Twitter account. 
The tweets should not just cite news, but provide some comment or analysis based on the overall context of todays news.

About

Create custom CTI News Briefings using OpenAI and LangChain

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages