Repository: Netflix/security_monkey

Issue #1038: GCP firewall errors
Created: 2018-04-14T02:04:47Z
Please make sure that you have checked the boxes:

 Review the Quickstart guide
 Search for both open and closed issues regarding the problem you are experiencing
[X ] For permissions issues (Access Denied and credential related errors), please refer to the requisite docs before submitting an issue:
AWS, GCP, OpenStack, GitHub

Description of issue:
Hello security monkey team, first we love this tool, thank you for putting it all together.
We have been using on AWS and recently we started to use it on GCP and we noticed that we didn't get any firewall logs or information so we went an look at the logs and we found out:
    retval = job.func(*job.args, **job.kwargs)
  File "/usr/local/src/security_monkey/security_monkey/scheduler.py", line 135, in _audit_changes
    au.audit_objects()
  File "/usr/local/src/security_monkey/security_monkey/auditor.py", line 154, in audit_objects
    method(item)
  File "/usr/local/src/security_monkey/security_monkey/auditors/gcp/gce/firewall.py", line 135, in check_allowed
    (ok, errors) = self.inspect_allowed(item)
  File "/usr/local/src/security_monkey/security_monkey/auditors/gcp/gce/firewall.py", line 127, in inspect_allowed
    err = self._port_range_exists(item.config.get('Allowed'))
  File "/usr/local/src/security_monkey/security_monkey/auditors/gcp/gce/firewall.py", line 50, in _port_range_exists
    for allowed in allowed_list:
TypeError: 'NoneType' object is not iterable```

Duplicate issue #1073: Worker not working: AttributeError: async
Created: 2018-05-24T21:43:20Z
Please make sure that you have checked the boxes:

[X ] Pease review the Troubleshooting doc for additional details regarding your issue.
[X ] Review the Quickstart guide
[X ] Search for both open and closed issues regarding the problem you are experiencing
 For permissions issues (Access Denied and credential related errors), please refer to the requisite docs before submitting an issue:
AWS, GCP, OpenStack, GitHub

Description of issue:
Hey guys!
I followed everything in the QuickStart and Autostarting documentation, but my Worker process on Supervisor always gets a FATAL Exited too quickly message.
Here is the log section on securitymonkeyworkers-stderr:
/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask_SQLAlchemy-1.0-py2.7.egg/flask_sqlalchemy/__init__.py:30: ExtDeprecationWarning: Importing flask.ext.sqlalchemy is deprecated, use flask_sqlalchemy instead. from flask.ext.sqlalchemy._compat import iteritems, itervalues, xrange, \ /usr/local/src/security_monkey/venv/lib/python2.7/site-packages/Flask_SQLAlchemy-1.0-py2.7.egg/flask_sqlalchemy/__init__.py:30: ExtDeprecationWarning: Importing flask.ext.sqlalchemy._compat is deprecated, use flask_sqlalchemy._compat instead. from flask.ext.sqlalchemy._compat import iteritems, itervalues, xrange, \ /usr/local/src/security_monkey/venv/lib/python2.7/site-packages/psycopg2-2.7.4-py2.7-linux-x86_64.egg/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>. """) Traceback (most recent call last): File "/usr/local/src/security_monkey/venv/bin/celery", line 11, in <module> load_entry_point('celery', 'console_scripts', 'celery')() File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/celery-4.2.0rc2-py2.7.egg/celery/__main__.py", line 16, in main _main() File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/celery-4.2.0rc2-py2.7.egg/celery/bin/celery.py", line 322, in main cmd.execute_from_commandline(argv) File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/celery-4.2.0rc2-py2.7.egg/celery/bin/celery.py", line 484, in execute_from_commandline super(CeleryCommand, self).execute_from_commandline(argv))) File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/celery-4.2.0rc2-py2.7.egg/celery/bin/base.py", line 275, in execute_from_commandline return self.handle_argv(self.prog_name, argv[1:]) File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/celery-4.2.0rc2-py2.7.egg/celery/bin/celery.py", line 476, in handle_argv return self.execute(command, argv) File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/celery-4.2.0rc2-py2.7.egg/celery/bin/celery.py", line 408, in execute ).run_from_argv(self.prog_name, argv[1:], command=argv[0]) File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/celery-4.2.0rc2-py2.7.egg/celery/bin/worker.py", line 223, in run_from_argv return self(*args, **options) File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/celery-4.2.0rc2-py2.7.egg/celery/bin/base.py", line 238, in __call__ ret = self.run(*args, **kwargs) File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/celery-4.2.0rc2-py2.7.egg/celery/bin/worker.py", line 257, in run **kwargs) File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/celery-4.2.0rc2-py2.7.egg/celery/worker/worker.py", line 101, in __init__ self.setup_instance(**self.prepare_args(**kwargs)) File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/celery-4.2.0rc2-py2.7.egg/celery/worker/worker.py", line 124, in setup_instance self.should_use_eventloop() if use_eventloop is None File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/celery-4.2.0rc2-py2.7.egg/celery/worker/worker.py", line 243, in should_use_eventloop self._conninfo.transport.implements.async and File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/kombu-4.2.0-py2.7.egg/kombu/transport/base.py", line 125, in __getattr__ raise AttributeError(key) AttributeError: async
I have two test accounts (AWS and GCP), and running monkey find -a gets everything done.
Weird, right?
Please let me known if you have any thoughts on this...

Closing comment (2018-05-25T00:19:11Z): Yep, worked with the latest develop branch.
Getting another error, related to #1038. I'll follow-up there.
Thank you once again, @mikegrima