Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Takes care of #64: #158

Merged
merged 4 commits into from
Nov 9, 2016
Merged

Takes care of #64: #158

merged 4 commits into from
Nov 9, 2016

Conversation

grendel513
Copy link
Contributor

Findings are now able to be marked for review. Users are able to select any
staff member to review the finding for accuracy. When a finding is marked
for review it is marked inactive and unverified. When reviewer clears
review, they have the option to set the findings status and must also leave
a new note to document verification.

This update requires the following commands:
./manage makemigrations dojo
./manage migrate
./manage collectstatic

screen shot 2016-11-06 at 2 42 29 pm

screen shot 2016-11-06 at 2 43 28 pm

screen shot 2016-11-06 at 2 43 40 pm

screen shot 2016-11-06 at 2 44 07 pm

screen shot 2016-11-06 at 2 44 18 pm

screen shot 2016-11-06 at 2 45 51 pm

screen shot 2016-11-06 at 2 49 35 pm

screen shot 2016-11-06 at 2 50 13 pm

Findings are now able to be marked for review.  Users are able to select any
staff member to review the finding for accuracy.  When a finding is marked
for review it is marked inactive and unverified.  When reviewer clears
review, they have the option to set the findings status and must also leave
a new note to document verification.

This update requires the following commands:
./manage makemigrations dojo
./manage migrate
./manage collectstatic
@devGregA
Copy link
Contributor

devGregA commented Nov 6, 2016

@grendel513 this is awesome! @aaronweaver looks like there is something wrong with the zap container?
https://travis-ci.org/OWASP/django-DefectDojo/builds/173742631

@aaronweaver
Copy link
Contributor

@grendel513 @devGregA I added a startup time for docker, it's dojo. Looks like the test data need to be re-exported and also an error when python starts up.

load fixture data snippet:

Problem installing fixture '/django-DefectDojo/docker/sample_data/initial_dojo_data.json': Could not load contenttypes.ContentType(pk=11): UNIQUE constraint failed: django_content_type.app_label, django_content_type.model

startup dojo snippet:

File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/kombu/transport/init.py", line 62, in resolve_transport
raise KeyError('No such transport: {0}'.format(transport))
KeyError: u'No such transport: sqla'

Detailed load fixture data error:

Traceback (most recent call last):
File "/django-DefectDojo/manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/django/core/management/init.py", line 354, in execute_from_command_line
utility.execute()
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/django/core/management/init.py", line 346, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 394, in run_from_argv
self.execute(_args, *_cmd_options)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute
output = self.handle(_args, *_options)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 60, in handle
self.loaddata(fixture_labels)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 100, in loaddata
self.load_label(fixture_label)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 157, in load_label
obj.save(using=self.using)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/django/core/serializers/base.py", line 173, in save
models.Model.save_base(self.object, using=using, raw=True)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/django/db/models/base.py", line 762, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/django/db/models/base.py", line 827, in _save_table
forced_update)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/django/db/models/base.py", line 877, in _do_update
return filtered._update(values) > 0
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 580, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 1062, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 840, in execute_sql
cursor.execute(sql, params)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/django/db/utils.py", line 98, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 318, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.IntegrityError: Problem installing fixture '/django-DefectDojo/docker/sample_data/initial_dojo_data.json': Could not load contenttypes.ContentType(pk=11): UNIQUE constraint failed: django_content_type.app_label, django_content_type.model

Manage.py startup:

Starting Python Server

Traceback (most recent call last):
File "/django-DefectDojo/venv/bin/celery", line 11, in
sys.exit(main())
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/celery/main.py", line 14, in main
_main()
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/celery/bin/celery.py", line 326, in main
cmd.execute_from_commandline(argv)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/celery/bin/celery.py", line 488, in execute_from_commandline
super(CeleryCommand, self).execute_from_commandline(argv)))
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/celery/bin/base.py", line 278, in execute_from_commandline
return self.handle_argv(self.prog_name, argv[1:])
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/celery/bin/celery.py", line 480, in handle_argv
return self.execute(command, argv)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/celery/bin/celery.py", line 412, in execute
).run_from_argv(self.prog_name, argv[1:], command=argv[0])
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/celery/bin/worker.py", line 221, in run_from_argv
return self(_args, *_options)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/celery/bin/base.py", line 241, in call
ret = self.run(_args, *_kwargs)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/celery/bin/worker.py", line 255, in run
**kwargs)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/celery/worker/worker.py", line 99, in init
self.setup_instance(**self.prepare_args(**kwargs))
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/celery/worker/worker.py", line 122, in setup_instance
self.should_use_eventloop() if use_eventloop is None
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/celery/worker/worker.py", line 241, in should_use_eventloop
self._conninfo.transport.implements.async and
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/kombu/connection.py", line 832, in transport
self._transport = self.create_transport()
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/kombu/connection.py", line 576, in create_transport
return self.get_transport_cls()(client=self)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/kombu/connection.py", line 582, in get_transport_cls
transport_cls = get_transport_cls(transport_cls)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/kombu/transport/init.py", line 81, in get_transport_cls
_transport_cache[transport] = resolve_transport(transport)
File "/django-DefectDojo/venv/local/lib/python2.7/site-packages/kombu/transport/init.py", line 62, in resolve_transport
raise KeyError('No such transport: {0}'.format(transport))
KeyError: u'No such transport: sqla'

@aaronweaver
Copy link
Contributor

@devGregA @grendel513 Found the issue:

Kombu, which is used by Celery upgraded to version 4.0. In the release notes I found this:

  • Removed transports that are no longer supported in this version:
    • Django ORM transport
    • SQLAlchemy ORM transport

I'm testing this version: pip install kombu==3.0.37

@devGregA devGregA merged commit cd18071 into DefectDojo:master Nov 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants