Skip to content

Commit

Permalink
Merge pull request #22 from tecnobabble/dev
Browse files Browse the repository at this point in the history
Python 3.9 and #21
  • Loading branch information
tecnobabble authored Oct 29, 2020
2 parents 7cfea7d + 2920600 commit ab53360
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 32 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/anchore-analysis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8-slim-buster
FROM python:3.9-slim-buster

RUN /usr/local/bin/python -m pip install --upgrade pip
RUN pip3 install pytenable feedparser python-decouple requests BeautifulSoup4 phpserialize jinja2 lxml
Expand Down
10 changes: 9 additions & 1 deletion vulnfeed_2_tenb.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def tsc_login():
try:
sc = TenableSC(sc_address, port=sc_port)
sc.login(access_key=sc_access_key, secret_key=sc_secret_key)
except NameError:
except (NameError) as err:
print("Please verify connection details.")
exit()
except (ConnectionError) as err:
Expand Down Expand Up @@ -100,6 +100,8 @@ def query_populate():#input_url, feed_source, sc, email_list):
advisory_cve = ics_cert_search(entry)
elif feed == "ACSC":
advisory_cve = acsc_search(entry)
elif feed == "TENABLE":
advisory_cve = tenable_search(entry)
else:
advisory_cve = re.findall("(CVE-\d{4}-\d{1,5})", str(entry.summary_detail))
# de-dupe any CVEs that are listed multiple times
Expand Down Expand Up @@ -344,6 +346,12 @@ def ics_cert_search(entry):
r = requests.get(url.group(0))
return re.findall("(CVE-\d{4}-\d{1,5})", str(r.text))

# Tenable sometimes doesn't publish enough info in their feed, we need to grab and parse the actual articles.
def tenable_search(entry):
url = re.search("(https://www\.tenable\.com/blog/.+)", str(entry['link']))
r = requests.get(url.group(0))
return re.findall("(CVE-\d{4}-\d{1,5})", str(r.text))

# ACSC doesn't publish enough info in their feed, we need to grab and parse the actual articles.
# Commenting out; disabling the ACSC feed because they removed their RSS feed :( 7-8-20, v1.1.1
#def acsc_search(entry):
Expand Down

0 comments on commit ab53360

Please sign in to comment.