Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/algapster/RSS-Syphon
Browse files Browse the repository at this point in the history
…into development
  • Loading branch information
algapster committed Jun 18, 2024
2 parents 4a30ca3 + 161feff commit b77e3d2
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/azure-functions-app-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ name: Deploy Python project to Azure Function App

on:
push:
branches: ["main", "development"]
branches: ["main", "development", "syphon_pharma_prod"]

env:
AZURE_FUNCTIONAPP_NAME: 'RSS-syphon' # set this to your function app name on Azure
Expand Down
2 changes: 1 addition & 1 deletion rss_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"cve": os.getenv("SLACK_CHANNEL_CVE"),
"news": os.getenv("SLACK_CHANNEL_NEWS"),
"pages_to_read": os.getenv("SLACK_PAGES_TO_READ"),
"error": os.getenv("SLACK_CHANNEL_ERRORS")
"error": os.getenv("SLACK_CHANNEL_ERRORS")
}
}

Expand Down
3 changes: 2 additions & 1 deletion rss_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
{"name": "Corelan Team", "url": "https://www.corelan.be/index.php/feed/"},
{"name": "NCC Group Research", "url": "https://research.nccgroup.com/feed/"},
{"name": "Alexander Popov", "url": "https://a13xp0p0v.github.io/feed.xml"},
{"name": "Windows Internals Blog", "url": "https://windows-internals.com/feed/"}
{"name": "Windows Internals Blog", "url": "https://windows-internals.com/feed/"},
{"name": "nist-analyzed", "url": "https://nvd.nist.gov/feeds/xml/cve/misc/nvd-rss-analyzed.xml"},
{"name": "nist-upcoming", "url": "https://nvd.nist.gov/feeds/xml/cve/misc/nvd-rss.xml"},
Expand All @@ -75,13 +76,13 @@
{"name": "seclists-full", "url": "https://seclists.org/rss/fulldisclosure.rss"},
{"name": "seclists-oss", "url": "https://seclists.org/rss/oss-sec.rss"},
{"name": "inthewild", "url": "https://raw.githubusercontent.com/gmatuz/inthewilddb/master/rss.xml"},
{"name": "tenable", "url": "https://www.tenable.com/cve/feeds?sort=newest"},
{"name": "center-for-internet-security", "url": "https://www.cisecurity.org/feed/advisories"}
]
}

keywords = {
"last_modified": "2024-06-13",

"ignored": [
"hiring"
],
Expand Down
31 changes: 31 additions & 0 deletions slacker/slacker.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,40 @@
def init_slack_client(slack_token):
return WebClient(token=slack_token)


def read_channel(client, channel_id, rss_type, pages_to_read):
re_dict = {"links": [], "md5s": [], "fixed_cves": [], "seen_cves": []}

try:

"""
Reads channel conversations and returns matching content
This requires the following scopes:
channels:history
View messages and other content in public channels that syphon has been added to
groups:history
View messages and other content in private channels that syphon has been added to
im:history
View messages and other content in direct messages that syphon has been added to
incoming-webhook
Post messages to specific channels in Slack
mpim:history
View messages and other content in group direct messages that syphon has been added to
:param client: Slack Client Object
:param channel_id: Slack Channel ID
:param rss_type: CVE or NEWs job type
:return: Dictionary of content
"""
# Set default return dict
re_dict = {
"links": [],
"md5s": [],
"fixed_cves": [],
"seen_cves": []
}

try:
conversation_history = []
pages_to_read = int(pages_to_read) # Ensure pages_to_read is an integer
Expand Down

0 comments on commit b77e3d2

Please sign in to comment.