<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Splunk Add-on for Nessus: No nessus_scan input with &amp;quot;TypeError: 'NoneType' object is not iterable&amp;quot; in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Nessus-No-nessus-scan-input-with-quot/m-p/280735#M33201</link>
    <description>&lt;P&gt;Glad I could help!  Thanks for marking the answer.  Look forward to seeing you around!&lt;/P&gt;</description>
    <pubDate>Wed, 16 Dec 2015 14:17:18 GMT</pubDate>
    <dc:creator>jkat54</dc:creator>
    <dc:date>2015-12-16T14:17:18Z</dc:date>
    <item>
      <title>Splunk Add-on for Nessus: No nessus_scan input with "TypeError: 'NoneType' object is not iterable"</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Nessus-No-nessus-scan-input-with-quot/m-p/280730#M33196</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;We're having trouble getting the nessus_scan input working, while nessus_plugin does work.&lt;/P&gt;

&lt;P&gt;Splunkd.log contains the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;12-14-2015 15:48:30.673 +0000 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/Splunk_TA_nessus/bin/nessus.py" Traceback (most recent call last):
12-14-2015 15:48:30.673 +0000 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/Splunk_TA_nessus/bin/nessus.py"   File "/opt/splunk/etc/apps/Splunk_TA_nessus/bin/nessus.py", line 266, in &amp;lt;module&amp;gt;
12-14-2015 15:48:30.673 +0000 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/Splunk_TA_nessus/bin/nessus.py"     main()
12-14-2015 15:48:30.673 +0000 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/Splunk_TA_nessus/bin/nessus.py"   File "/opt/splunk/etc/apps/Splunk_TA_nessus/bin/nessus.py", line 261, in main
12-14-2015 15:48:30.673 +0000 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/Splunk_TA_nessus/bin/nessus.py"     run()
12-14-2015 15:48:30.673 +0000 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/Splunk_TA_nessus/bin/nessus.py"   File "/opt/splunk/etc/apps/Splunk_TA_nessus/bin/nessus.py", line 173, in run
12-14-2015 15:48:30.673 +0000 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/Splunk_TA_nessus/bin/nessus.py"     collector.collect_scan_data()
12-14-2015 15:48:30.673 +0000 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/Splunk_TA_nessus/bin/nessus.py"   File "/opt/splunk/etc/apps/Splunk_TA_nessus/bin/nessus_data_collector.py", line 266, in collect_scan_data
12-14-2015 15:48:30.673 +0000 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/Splunk_TA_nessus/bin/nessus.py"     sid_set = list(set([str(scan.get("id")) for scan in scans]))
12-14-2015 15:48:30.673 +0000 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/Splunk_TA_nessus/bin/nessus.py" TypeError: 'NoneType' object is not iterable
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Has anyone else seen this before, and know how to fix or further debug?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:10:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Nessus-No-nessus-scan-input-with-quot/m-p/280730#M33196</guid>
      <dc:creator>katherine_garro</dc:creator>
      <dc:date>2020-09-29T08:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Add-on for Nessus: No nessus_scan input with "TypeError: 'NoneType' object is not iterable"</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Nessus-No-nessus-scan-input-with-quot/m-p/280731#M33197</link>
      <description>&lt;P&gt;The error suggests that this code snippet is failing:&lt;/P&gt;

&lt;P&gt;in nessus.py:&lt;BR /&gt;
sid_set = list(set([str(scan.get("id")) for scan in scans]))&lt;/P&gt;

&lt;P&gt;with error of "TypeError: 'NoneType' object is not iterable.&lt;/P&gt;

&lt;P&gt;Which means "scans" is not an array... but instead its null / empty.&lt;/P&gt;

&lt;P&gt;So i'm guess scans is populated by something else in the code, and it's blank because it's not able to populate itself.  &lt;STRONG&gt;So i'd bet something is wrong with your configuration.  Either a bad nessus host/server ip/name OR bad user/pass.&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;After reviewing the code, it appears the app is pulling any data from nessus.  Can you please post your nessus.conf with sensitive changed to protect the innocent?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2015 13:46:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Nessus-No-nessus-scan-input-with-quot/m-p/280731#M33197</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2015-12-16T13:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Add-on for Nessus: No nessus_scan input with "TypeError: 'NoneType' object is not iterable"</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Nessus-No-nessus-scan-input-with-quot/m-p/280732#M33198</link>
      <description>&lt;P&gt;im reviewing nessus.py now to see how the array named scans is populated&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2015 13:47:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Nessus-No-nessus-scan-input-with-quot/m-p/280732#M33198</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2015-12-16T13:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Add-on for Nessus: No nessus_scan input with "TypeError: 'NoneType' object is not iterable"</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Nessus-No-nessus-scan-input-with-quot/m-p/280733#M33199</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Thanks for the quick response. I got to the same result as you, the account we were logging in with had no scan results. I would consider this a bug (the script should handle no results without throwing an exception and filling the error log), but glad it now works.&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2015 13:57:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Nessus-No-nessus-scan-input-with-quot/m-p/280733#M33199</guid>
      <dc:creator>katherine_garro</dc:creator>
      <dc:date>2015-12-16T13:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Add-on for Nessus: No nessus_scan input with "TypeError: 'NoneType' object is not iterable"</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Nessus-No-nessus-scan-input-with-quot/m-p/280734#M33200</link>
      <description>&lt;P&gt;nessus.py calls collector.collect_scan_data() in your NessusScanCollector specified in your nessus.conf.   By default NessusScanCollector is nessus_data_collector.py.   nessus_data_collector.py contains the following code that is throwing your error:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;        is_hosts_empty = True
        for (sid, ascan) in ckpt_scans.items():
            if len(ascan.get("hosts", {})) &amp;gt; 0:
                is_hosts_empty = False
                break

        if is_hosts_empty:
            scans = self._collect_scans()
            sid_set = list(set([str(scan.get("id")) for scan in scans]))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Last line is where the error occurs.  scans is empty , but it shouldnt even try this bit of code unless is_hosts_empty = True...   So why is is_hosts_empty = True?  Looks like the length of ascan.get("hosts",{})) is not greater than 0.  So still looking into what ascan.get does...  almost there.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:07:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Nessus-No-nessus-scan-input-with-quot/m-p/280734#M33200</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-09-29T08:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Add-on for Nessus: No nessus_scan input with "TypeError: 'NoneType' object is not iterable"</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Nessus-No-nessus-scan-input-with-quot/m-p/280735#M33201</link>
      <description>&lt;P&gt;Glad I could help!  Thanks for marking the answer.  Look forward to seeing you around!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2015 14:17:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Nessus-No-nessus-scan-input-with-quot/m-p/280735#M33201</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2015-12-16T14:17:18Z</dc:date>
    </item>
  </channel>
</rss>

