Skip to content

Commit

Permalink
Merge pull request #2144 from greenbone/GEA-472_TippingPoint_No_alert…
Browse files Browse the repository at this point in the history
…_triggered

Fix: Fixed two problems concerning the TippingPoint alert
  • Loading branch information
a-h-abdelsalam authored Mar 5, 2024
2 parents 75016ed + c1ce8f9 commit 3bf940f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/alert_methods/TippingPoint/alert
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ CONVERT_SCRIPT=$4
AUTH_PATH=$5
REPORT_PATH=$6

# Function to encode for URL
urlencode () {
RET=$(python -c "import urllib, sys; print urllib.quote(sys.argv[1])" "$1")
echo "$RET"
}

# Create temp file for converted report
REPORT_DATE=$(xmlstarlet sel -t -v "report/timestamp" < $REPORT_PATH)
EXIT_CODE=$?
Expand Down Expand Up @@ -76,9 +70,9 @@ END_TIME=$(TZ=UTC date -d "$END_TIME" +%Y-%m-%dT%H:%M:%S.000Z)
RUNTIME="$START_TIME/$END_TIME"

# Upload the report
VENDOR=$(urlencode "Greenbone")
PRODUCT=$(urlencode "Greenbone Vulnerability Manager")
FORMAT_VERSION=$(urlencode "1.0.0")
VENDOR="Greenbone"
PRODUCT="Greenbone%20Vulnerability%20Manager"
FORMAT_VERSION="1.0.0"
CN_REPLACEMENT="Tippingpoint"

if [ "1" = $CERT_WORKAROUND ]
Expand Down
4 changes: 4 additions & 0 deletions src/alert_methods/TippingPoint/report-convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ def convert (xml_tree, out_file):
nvt_cve = '';
nvt_elem = result_elem.find ('nvt')
nvt_refs = nvt_elem.find ('refs');

if (nvt_refs is None):
continue

for ref in nvt_refs.findall('ref'):
if (ref.attrib['type'] == 'cve'):
if (nvt_cve == ''):
Expand Down

0 comments on commit 3bf940f

Please sign in to comment.