mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-27 00:07:16 +00:00
Fixed bug in CVE (always sending to browse_warning even if there was no match)
This commit is contained in:
parent
084737dd26
commit
aedb3198cd
1 changed files with 5 additions and 5 deletions
10
bin/Cve.py
10
bin/Cve.py
|
@ -25,6 +25,11 @@ def search_cve(message):
|
||||||
print('{} contains CVEs'.format(paste.p_name))
|
print('{} contains CVEs'.format(paste.p_name))
|
||||||
publisher.warning('{} contains CVEs'.format(paste.p_name))
|
publisher.warning('{} contains CVEs'.format(paste.p_name))
|
||||||
|
|
||||||
|
#send to Browse_warning_paste
|
||||||
|
p.populate_set_out('cve;{}'.format(filepath), 'BrowseWarningPaste')
|
||||||
|
#Send to duplicate
|
||||||
|
p.populate_set_out(filepath, 'Duplicate')
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# If you wish to use an other port of channel, do not forget to run a subscriber accordingly (see launch_logs.sh)
|
# If you wish to use an other port of channel, do not forget to run a subscriber accordingly (see launch_logs.sh)
|
||||||
# Port of the redis instance used by pubsublogger
|
# Port of the redis instance used by pubsublogger
|
||||||
|
@ -53,8 +58,3 @@ if __name__ == '__main__':
|
||||||
# Do something with the message from the queue
|
# Do something with the message from the queue
|
||||||
search_cve(message)
|
search_cve(message)
|
||||||
|
|
||||||
#send to Browse_warning_paste
|
|
||||||
filepath, count = message.split()
|
|
||||||
p.populate_set_out('cve;{}'.format(filepath), 'BrowseWarningPaste')
|
|
||||||
#Send to duplicate
|
|
||||||
p.populate_set_out(filepath, 'Duplicate')
|
|
||||||
|
|
Loading…
Reference in a new issue