Git Product home page Git Product logo

django-mantis's People

Contributors

bgro avatar ckoepp avatar ryanaiden avatar stbe avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-mantis's Issues

Several Installation issues

I am trying to install MANTIS using the recommended operating system version ubuntu desktop 12.04. When following the Installation Guide to install MANTIS, after having executed command pip install -r requirements/local.txt in step 5, it produces the following error.

Downloading/unpacking mock (from -r requirements/testing.txt (line 3))
Running setup.py egg_info for package mock
Traceback (most recent call last):
File "", line 14, in
File "/home/david/virtualpath/mantis/build/mock/setup.py", line 10, in
setuptools_installed = StrictVersion(setuptools.version.version)
AttributeError: 'module' object has no attribute 'version'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "", line 14, in

File "/home/david/virtualpath/mantis/build/mock/setup.py", line 10, in

setuptools_installed = StrictVersion(setuptools.version.__version__)

AttributeError: 'module' object has no attribute 'version'


Command python setup.py egg_info failed with error code 1 in /home/david/virtualpath/mantis/build/mock
Storing complete log in /home/david/.pip/pip.log

When checking the mentioned pip.log file it says the following:
Command python setup.py egg_info failed with error code 1 in /home/david/virtualpath/mantis/build/mock

Exception information:
Traceback (most recent call last):
File "/home/david/virtualpath/mantis/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py", line 104, in main
status = self.run(options, args)
File "/home/david/virtualpath/mantis/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/commands/install.py", line 245, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/home/david/virtualpath/mantis/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 1009, in prepare_files
req_to_install.run_egg_info()
File "/home/david/virtualpath/mantis/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 225, in run_egg_info
command_desc='python setup.py egg_info')
File "/home/david/virtualpath/mantis/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/init.py", line 256, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in /home/david/virtualpath/mantis/build/mock

I have googled that a possible solution for this is to run the following commands:
./virtualenv/mantis/bin/pip install --upgrade pip
./virtualenv/mantis/bin/pip install setuptools --no-use-wheel --upgrade

After running those commands I am able to complete all the commands in the installation guide. I have selected all the postgres related commands as well. But when running the command: bash quickstart_psql, it warns that "south" is not available in Django 1.8. It produces the following error:

-- error start --
.. _South: http://south.readthedocs.org/en/latest/
/home/david/virtualenv/mantis/local/lib/python2.7/site-packages/dingos/models.py:31: RemovedInDjango19Warning: django.contrib.contenttypes.generic is deprecated and will be removed in Django 1.9. Its contents have been moved to the fields, forms, and admin submodules of django.contrib.contenttypes.
from django.contrib.contenttypes import generic

/home/david/virtualenv/mantis/local/lib/python2.7/site-packages/south/db/postgresql_psycopg2.py:4: RemovedInDjango19Warning: The django.db.backends.util module has been renamed. Use django.db.backends.utils instead.
from django.db.backends.util import truncate_name

There is no South database module 'south.db.postgresql_psycopg2' for your database. Please either choose a supported database, check for SOUTH_DATABASE_ADAPTER[S] settings, or remove South from INSTALLED_APPS.
-- error end ---

Looking for any solutions for this problem on the internet, I found this:
Please note that South is now end of lifed in favour of the ​new migrations framework in Django 1.7, which is based on South but with significant design improvements.

South will not work with Django 1.7; It supports only versions 1.4, 1.5 and 1.6.

So it seems south end of life, however MANTIS depends on it. Is it possible that MANTIS developers use the new migrations framework instead of South?

I downgraded Django to 1.6 just to see if it works.
pip install 'Django<1.7'

With version 1.6 I was able run command bash quickstart_psql with no errors, the script asks for the administrative user as expected. After providing the information, the script asks if I want to overwrite the static files at /home/david/mantis/django-mantis/mantis/static and I choose "yes". After this the script outputs "Starting development server at http://127.0.0.1:8000/"

When logging into http://127.0.0.1:8000/admin/, the admin mantis web authentication window is shown, however if I try to use the user and password created I get the odd error "Please correct the error below", but no errors are shown.

I am sure that the credentials are correct because If wrong user name or password are provided a different error message is shown. When googling about this error message, it seems that it is a bug in Django 1.6, however if I upgrade to a more recent version, then it is not possible to install it because of the South requirement.

Can you please provide a solution for the problems described above? Thanks.

[Documentation] 7.1. apt-get misstake

In section 7.1 of the install guide, there is a wrong apt-get install command:

WRONG:
$ apt-get install postgresql
$ apt-get postgresql-server-dev-9.1

WRITE:
$ apt-get install postgresql
$ apt-get install postgresql-server-dev-9.1

South does not support Django

Hello,

How can i resolve this problem South does not support Django 1.7 or higher. Please use native Django migrations.

Thanl you

30_create_dev_env_ubuntu_14_04.sh script fails for mantis installation

The issue appears to be django-dingos version >0.3.0<0.4.0 requirement is failing. From /home/mantis/.pip/pip.log:

Ignoring link https://pypi.python.org/packages/38/4d/a408ef63eb7596b55a06470eaa6f431644b14ebcaeb3deaee27c14db22e4/django-dingos-0.2.0.tar.gz#md5=acb6e0e0f9467be8b859870ef034e54e (from https://pypi.python.org/simple/django-dingos/), version 0.2.0 doesn't match >=0.3.0,<0.4.0
Ignoring link https://pypi.python.org/packages/61/36/f97d7c6f7e83df917893b2d82749e50a3dd2cb39b50b0fd5dba5b5828e63/django-dingos-0.0.9.tar.gz#md5=e8539a634a46730384923df4c704e993 (from https://pypi.python.org/simple/django-dingos/), version 0.0.9 doesn't match >=0.3.0,<0.4.0
Ignoring link https://pypi.python.org/packages/77/ac/57d03a4fcf7219d81076067f9689bddf843f1026c67499d7f005ca8a5121/django-dingos-0.2.1.tar.gz#md5=04be54546bcbfcbacad26bac29dd49de (from https://pypi.python.org/simple/django-dingos/), version 0.2.1 doesn't match >=0.3.0,<0.4.0
Could not find a version that satisfies the requirement django-dingos>=0.3.0,<0.4.0 (from -r requirements/base.txt (line 19)) (from versions: 0.1.0, 0.2.0, 0.0.9, 0.2.1)
Cleaning up...
Removing temporary dir /home/mantis/.virtualenvs/mantis_dev/build...
No distributions matching the version for django-dingos>=0.3.0,<0.4.0 (from -r requirements/base.txt (line 19))
Exception information:
Traceback (most recent call last):
File "/home/mantis/.virtualenvs/mantis_dev/local/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/home/mantis/.virtualenvs/mantis_dev/local/lib/python2.7/site-packages/pip/commands/install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/home/mantis/.virtualenvs/mantis_dev/local/lib/python2.7/site-packages/pip/req.py", line 1177, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "/home/mantis/.virtualenvs/mantis_dev/local/lib/python2.7/site-packages/pip/index.py", line 322, in find_requirement
raise DistributionNotFound('No distributions matching the version for %s' % req)
DistributionNotFound: No distributions matching the version for django-dingos>=0.3.0,<0.4.0 (from -r requirements/base.txt (line 19))

When this package installation fails, the rest of the script fails. The postgres SQL database local configuration fails to install after this. Uploading pip.log and install.log as pip.txt and install.txt
pip.txt
install.txt

Error while installing libxml2-python

When I install libxml2-python on fresh Ubuntu 14.04 installation I get error after command:

pip install libxml2-2.9.1/python
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/libxml2-py.o build/temp.linux-x86_64-2.7/libxml.o build/temp.linux-x86_64-2.7/types.o -lxml2 -lm -lz -o build/lib.linux-x86_64-2.7/libxml2mod.so
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-3ahwNo-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-TQ49NL-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-3ahwNo-build
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in
load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg/pip/init.py", line 185, in main
return command.main(cmd_args)
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 26: ordinal not in range(128)

I fixed issue with:

apt-get install zlib1g-dev

Failure to Import - ID Missing (Optional Attribute)

Importer does not load files with missing optional attribute ID

For the stated use case of using MANTIS to visualize supported structured data packages, it should accept any legal forms of same and automatically deal with any modifications to source required to provide internal MANTIS structures. Devil is of course in the details ;-)

Suggest either auto-generating or tokenizing missing values required by Mantis if missing from source content.

Perhaps as a command line argument to:

  • Specify action on missing element/attribute
  • Specify a value or prefix

Log for loading MITRE CybOx Samples:

https://github.com/CybOXProject/schemas/tree/master/samples

vagrant@mantis:~/django-mantis$ python manage.py mantis_stix_import --settings=mantis.settings.local_psql --trace --marking_json=quickstart_examples/markings/minimal_marking.json --marking_pfill=source "CybOx Bulk Load" /vagrant/C_.xml
INFO import_handling Creating own.organization.com:e7acf4c0-722c-11e3-92a6-000c2915b14a with timestamp 31-12-2013:15:04:54.210
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_Artifact_Instance.xml
INFO import_handling Creating http://example.com/:Observable-6dde4f72-cca0-44f0-8206-f381accf6b87 with timestamp 31-12-2013:15:04:54.381
INFO import_handling Creating http://example.com/:Object-2a1f9a17-b799-4a17-b4ca-f3cb018ad89f with timestamp 31-12-2013:15:04:54.381
_INFO importer Object of type Observables without id information encountered, skipping*
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_Artifact_Pattern.xml
INFO import_handling Creating http://example.com/:Observable-cdcf44b5-317b-4ae5-99e0-b601fe90fe3d with timestamp 31-12-2013:15:04:54.432
INFO import_handling Creating http://example.com/:Object-2c7bef9b-9eb7-4d3b-833f-49b70b3c4956 with timestamp 31-12-2013:15:04:54.432
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_CreateFile_Action.xml
INFO import_handling Creating http://example.com:Observable-a727a717-1852-4c79-9a16-2f3a8b4632c2 with timestamp 31-12-2013:15:04:54.483
INFO import_handling Creating http://example.com:Event-44578866-b0c5-4551-84dd-0f1f02f8210f with timestamp 31-12-2013:15:04:54.483
INFO import_handling Creating http://example.com:Action-a18a058c-effa-4060-b8be-25e1b1ade75f with timestamp 31-12-2013:15:04:54.483
INFO import_handling Creating http://example.com:Object-5ec92e95-a31f-470b-97c4-aa9046189fbb with timestamp 31-12-2013:15:04:54.483
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_Domain_Instance.xml
INFO import_handling Creating http://example.com/:Observable-0b9af310-0d5a-4c44-bdd7-aea3d99f13b6 with timestamp 31-12-2013:15:04:54.577
INFO import_handling Creating http://example.com/:Object-15be6630-b2df-4bf9-8750-3f45ca9e19cf with timestamp 31-12-2013:15:04:54.577
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_Domain_Pattern.xml
INFO import_handling Creating http://example.com/:Observable-1c9af310-0d5a-4c44-bdd7-aea3d99f13b6 with timestamp 31-12-2013:15:04:54.623
INFO import_handling Creating http://example.com/:Object-26be6630-b2df-4bf9-8750-3f45ca9e19cf with timestamp 31-12-2013:15:04:54.623
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_IPv4Address_Instance.xml
INFO import_handling Creating http://example.com/:Observable-0b9af309-0d5a-4c44-bdd7-aea3d99f13b6 with timestamp 31-12-2013:15:04:54.676
INFO import_handling Creating http://example.com/:Object-15be6630-c2df-4bf9-8750-3f45ca9e19cf with timestamp 31-12-2013:15:04:54.676
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_IPv4Address_Pattern.xml
INFO import_handling Creating http://example.com/:Observable-0b9af309-0d5a-4c44-bdd7-aea3d99f13b6 with timestamp 31-12-2013:15:04:54.722
INFO import_handling Creating http://example.com/:Object-15be6630-c2df-4bf9-8750-3f45ca9e19cf with timestamp 31-12-2013:15:04:54.722
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_IPv6Address_Instance.xml
INFO import_handling Creating http://example.com/:Observable-0b9af309-0d5a-4c44-bdd7-aea3d99f13b6 with timestamp 31-12-2013:15:04:54.771
INFO import_handling Creating http://example.com/:Object-15be6630-c2df-4bf9-8750-3f45ca9e19cf with timestamp 31-12-2013:15:04:54.771
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_IPv6Address_Pattern.xml
INFO import_handling Creating http://example.com/:Observable-0b9af309-0d5a-4c44-bdd7-aea3d99f13b6 with timestamp 31-12-2013:15:04:54.818
INFO import_handling Creating http://example.com/:Object-15be6630-c2df-4bf9-8750-3f45ca9e19cf with timestamp 31-12-2013:15:04:54.818
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_Iran-Oil_Dynamic.xml
INFO import_handling Not adding element {'ts_inherited': True, 'timestamp': None, 'id': 'cybox:guid-49d31c13-8d7b-4528-b8d6-ce8ed0d43ad7'} with type info None to pending stack because element is empty.
INFO import_handling Creating http://example.com/:Observable-7d932074-fded-4056-870e-dd51980501d4 with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Observable-80594430-7567-4402-88a4-05d556b21884 with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Observable-47d6a950-884d-46b5-9938-ac5555065a81 with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Observable-c78c0a83-6d14-45f8-827f-f758f0cd11ea with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Object-5ceb9d54-24e2-4627-948d-6b92ac81962a with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Observable-f6c8ee75-ee7e-4490-bd5d-0661d0db7264 with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Object-af7cb3b6-d70b-4b3b-b24f-7cfad739710f with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Observable-1ea53b14-8fe9-467b-a298-62d9684e797d with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Object-80bea4d1-0e70-4a03-a54f-e40373bf94f1 with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Observable-75ce59ad-1f01-4eae-9ecc-0b22c4c24ce7 with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Object-568db11e-39ee-43d7-83d8-032bdec3801a with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Observable-4e05804c-f552-44e1-9793-ff4bb7f88f9c with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Object-61aa225b-90ef-415c-8bbd-a17282e457c9 with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Observable-066cef51-c886-432e-9a22-a17f57f3f3f2 with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Object-41b220d8-4c45-48de-9d08-30d661b2dc8e with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Observable-a24ff8bc-b534-4616-838b-8bbe260a8e8f with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Observable-dee72b3e-82fb-4319-bfcc-007e3cf930e8 with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Object-bed1ff22-08e8-4e04-b7ac-908b5271176f with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Observable-b650c988-aac7-45ff-967d-9f1e5fc66161 with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Observable-210f18f3-3874-4f9a-861d-71b328be90c6 with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Object-b7e0bc39-f519-4878-8fb0-5902554efe1c with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Observable-f005fbc6-7427-43ea-8e1e-9a341836f76b with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Object-61041b8b-0c15-48a0-ac5f-b49488788010 with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Object-8b463e0d-cc16-4036-950e-5eeb09bc51aa with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Obervable-35f04c28-5fd2-4d72-8aae-2ad04ee1811f with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Object-49d31c13-8d7b-4528-b8d6-ce8ed0d43ad7 with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Observable-1a937ec2-90ab-4e0e-a37c-db9b2e66a58e with timestamp 31-12-2013:15:04:54.866
INFO import_handling Creating http://example.com/:Object-51359587-f201-4383-b032-5a64522fcd7d with timestamp 31-12-2013:15:04:54.866
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_Network_Connection_HTTP_Instance.xml
INFO import_handling Creating http://example.com/:Observable-1b427720-98d7-4735-b125-754c7e08f285 with timestamp 31-12-2013:15:04:55.539
INFO import_handling Creating http://example.com/:Object-d1fdd983-530b-489f-9ab8-ed3cb5212c35 with timestamp 31-12-2013:15:04:55.539
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_Network_Connection_HTTP_Pattern.xml
INFO import_handling Creating http://example.com/:Observable-1b427720-98d7-4735-b125-754c7e08f285 with timestamp 31-12-2013:15:04:55.588
INFO import_handling Creating http://example.com/:Object-d1fdd983-530b-489f-9ab8-ed3cb5212c35 with timestamp 31-12-2013:15:04:55.588
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_Network_Connection_Instance.xml
INFO import_handling Creating http://example.com/:Observable-1aec7752-29e1-4018-806c-7a9a21ddb20e with timestamp 31-12-2013:15:04:55.644
INFO import_handling Creating http://example.com/:Object-54400c36-5038-478b-bffe-808c40b2f04e with timestamp 31-12-2013:15:04:55.644
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_Network_Connection_Pattern.xml
INFO import_handling Creating http://example.com/:Observable-1aec7752-29e1-4018-806c-7a9a21ddb20e with timestamp 31-12-2013:15:04:55.696
INFO import_handling Creating http://example.com/:Object-54400c36-5038-478b-bffe-808c40b2f04e with timestamp 31-12-2013:15:04:55.696
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_PDF_File_Instance.xml
INFO import_handling Creating http://example.com/:Observable-9c132c3c-fc65-41c9-a0f9-ea146dc61cd0 with timestamp 31-12-2013:15:04:55.745
INFO import_handling Creating http://example.com/:Object-3e6f7315-9591-4f84-ba51-7b8c44ce5d36 with timestamp 31-12-2013:15:04:55.745
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_PDF_File_Pattern.xml
INFO import_handling Creating http://example.com/:Observable-343961d3-8e62-4150-a701-4ade0afd1f69 with timestamp 31-12-2013:15:04:55.796
INFO import_handling Creating http://example.com/:Object-72d46b20-4048-427c-a077-d601c2874348 with timestamp 31-12-2013:15:04:55.796
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_Simple_Email_Instance.xml
INFO import_handling Creating http://example.com/:Object-8108c0dc-bded-4b0c-b423-8b92ef1d6503 with timestamp 31-12-2013:15:04:55.844
INFO import_handling Creating http://example.com/:Obervable-298376a2-cf65-4778-9894-ed9a9bb5441d with timestamp 31-12-2013:15:04:55.844
INFO import_handling Creating http://example.com/:Object-f9769431-db6b-448f-b34e-72eb3c3e07d9 with timestamp 31-12-2013:15:04:55.844
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_Simple_Email_Pattern.xml
INFO import_handling Creating http://example.com/:Obervable-298376a2-cf65-4778-9894-ed9a95b5441d with timestamp 31-12-2013:15:04:55.917
INFO import_handling Creating http://example.com/:Object-f9769431-db6b-448f-b34e-72eb3c3e07d1 with timestamp 31-12-2013:15:04:55.917
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_Simple_File_Instance.xml
INFO import_handling Creating http://example.com/:Observable-58115a77-e24a-42b5-bb29-7bd56fa9655f with timestamp 31-12-2013:15:04:55.966
INFO import_handling Creating http://example.com/:Object-17e97e7c-d3e6-4138-891b-291576dc5d41 with timestamp 31-12-2013:15:04:55.966
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_Simple_File_Pattern_Regex.xml
INFO import_handling Creating http://example.com/:Observable-9769042a-294d-4f2c-963b-579702df0472 with timestamp 31-12-2013:15:04:56.014
INFO import_handling Creating http://example.com/:Object-dae8802e-b0df-4989-9ac3-d816b153842b with timestamp 31-12-2013:15:04:56.014
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_Simple_File_Pattern.xml
INFO import_handling Creating http://example.com/:Observable-58115a77-e24a-42b5-bb29-7bd66fa9655f with timestamp 31-12-2013:15:04:56.065
INFO import_handling Creating http://example.com/:Object-17e97e7c-d3e6-4139-891b-291576dc5d41 with timestamp 31-12-2013:15:04:56.065
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_URL_Instance.xml
INFO import_handling Creating http://example.com/:Observable-2d9af310-0d5a-4c44-bdd7-aea3d99f13b6 with timestamp 31-12-2013:15:04:56.116
INFO import_handling Creating http://example.com/:Object-37be6630-b2df-4bf9-8750-3f45ca9e19cf with timestamp 31-12-2013:15:04:56.116
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_URL_Pattern.xml
INFO import_handling Creating http://example.com/:Observable-1c9af310-0d5a-4c44-bdd7-aea3d99f13b6 with timestamp 31-12-2013:15:04:56.165
INFO import_handling Creating http://example.com/:Object-26be6630-b2df-4bf9-8750-3f45ca9e19cf with timestamp 31-12-2013:15:04:56.165
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_X509_Certificate_Instance.xml
INFO import_handling Creating http://example.com/:Observable-342df9c7-b309-4297-b3ce-ab3954ccb9db with timestamp 31-12-2013:15:04:56.213
INFO import_handling Creating http://example.com/:Object-a677503f-b20b-44d0-a50f-fc055bb0e255 with timestamp 31-12-2013:15:04:56.213
INFO importer Object of type Observables without id information encountered, skipping
INFO importer Starting processing
INFO importer Starting import of /vagrant/CybOX_X509_Certificate_Pattern.xml
INFO import_handling Creating http://example.com/:Observable-72b7b0b3-a95f-4bb8-b42b-f5f86e1370b9 with timestamp 31-12-2013:15:04:56.262
INFO import_handling Creating http://example.com/:Object-551e35af-6f73-4182-ae42-8803b56781ed with timestamp 31-12-2013:15:04:56.262
INFO importer Object of type Observables without id information encountered, skipping`

Make json-export (or rather InfoObject.to_dict-function) generic.

The code that generates the JSON representation in DINGOS must be configurable by the importers: the STIX/OpenIOC etc. importer would have to provide hooking functions, which would be called by the JSON generator depending on InfoObject family (and maybe InfoObjectType).

django-mantis: Menu line does not work.

The menu system may (as yet, inexplicably) stop to work.
Before commit cb78d10, this leads to the following picture (not a pretty one):

image

Said commit improves the situation by forcing a one-line menu line, but the menu still does not work. Try to restart the server (if you are using the development server, do Ctrl+C in the shell or press the stop button in PyCharm) and start again. If that does not help, try removing and reinstalling django-simple-menu with pip.

Mantis Framework: Can't Log In in website

I have already finished the MANTIS installation and try to log in system via the link(http://127.0.0.1:8000/admin/) using the account created based on the instruction below, but it fails.
So does anyone know the reason for that? Or tell me anything missing during my installation or any default account and password? Thanks in advance.

1.Run the Django syncdb command, which
1.creates tables for the models of all applications that are not using the Django South application for database migrations.
2.asks you for user name, email address and password of an administrative Django user (you will need this username and password later to log on)

Aaron Qin

ValueError: Unable to configure handler 'null': Cannot resolve 'django.utils.log.NullHandler': No module named NullHandler

I ran all the installation steps as written and got this error:

Unhandled exception in thread started by <function wrapper at 0x7f7380bef320>
Traceback (most recent call last):
File "/home/sarthak/mantis/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 228, in wrapper
fn(args, **kwargs)
File "/home/sarthak/mantis/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 116, in inner_run
autoreload.raise_last_exception()
File "/home/sarthak/mantis/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 251, in raise_last_exception
six.reraise(
_exception)
File "/home/sarthak/mantis/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 228, in wrapper
fn(*args, **kwargs)
File "/home/sarthak/mantis/local/lib/python2.7/site-packages/django/init.py", line 22, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/home/sarthak/mantis/local/lib/python2.7/site-packages/django/utils/log.py", line 75, in configure_logging
logging_config_func(logging_settings)
File "/usr/lib/python2.7/logging/config.py", line 794, in dictConfig
dictConfigClass(config).configure()
File "/usr/lib/python2.7/logging/config.py", line 576, in configure
'%r: %s' % (name, e))
ValueError: Unable to configure handler 'null': Cannot resolve 'django.utils.log.NullHandler': No module named NullHandler

I found a fix on stackoverflow which says:

django.utils.log.NullHandler is actually alias to logging.NullHandler.

Looks like it was removed in 1.9.

Just check your settings (and any other code) and replace django.utils.log.NullHandler with logging.NullHandler

But I don't know where to do that.

[bug][development] STIX Output not Validateable

Dear @bgro,

when authoring a report with Mantis and exporting STIX one gets STIX that is not validateable by the stix-validator.

Here is an example.

Given this data the stix-validator has three open points:

  1. The ampersand from the description field is not escaped.
  2. http://data-marking.mitre.org/extensions/MarkingStructure#TLP-1}TLPColorEnum specifies uppercase labels. A lowercase white was inserted.
  3. Inside a campaign the referenced threat actor has to be wrapped in a campaign:Attributed_Threat_Actor element.

Best regards,
73

[Development] Missing entries in base.py INSTALLED_APPS

I just went through the install for the development version of MANTIS. I ran into two problems;

  • 30_create_dev_env_ubuntu_13_10.sh
    • Kept throwing: fields.E300: Field defines a relation with model Tag, which is either not installed, or is abstract
    • Resolved by adding 'taggit', to the INSTALLED_APPS_List section in django-mantis/mantis/settings/base.py
  • 90_start_services_ubuntu_13_10.sh
    • Gave an error of: tagautocompletedingos not registered (registry is empty)
    • Resolved by adding 'autocomplete_light', to the INSTALLED_APPS_List section in django-mantis/mantis/settings/base.py

Once I added those apps, the rest of the install went smooth and the web page came up without error.

Importer Crashes on Namespace prefix error

Importer Crashes on Namespace prefix error

Should gracefully deal with exception and continue processing remaining source files(?)

Test files

  1. Full Sample for Importer run: https://github.com/STIXProject/schemas/tree/version_1.1/samples
  2. Sample failing File: https://github.com/STIXProject/schemas/blob/version_1.1/samples/STIX_Snippet_Confidence.xml

Log File

vagrant@mantis:~/django-mantis$ python manage.py mantis_stix_import --settings=mantis.settings.local_psql --trace
--marking_json=quickstart_examples/markings/minimal_marking.json
--marking_pfill=source "STIX Sample Bulk Loads"
/vagrant/STIX_.xml

INFO importer Starting processing
INFO importer Starting import of /vagrant/STIX_Snippet_Confidence.xml
/vagrant/STIX_Snippet_Confidence.xml:18: namespace error : Namespace prefix indicator on Confidence is not defined
<indicator:Confidence timestamp="2012-12-01T09:30:47Z">
^
/vagrant/STIX_Snippet_Confidence.xml:19: namespace error : Namespace prefix stixCommon on Value is not defined
<stixCommon:Value vocab_reference="someURLtoConfidenceModelDescription.foo.com"
^
/vagrant/STIX_Snippet_Confidence.xml:20: namespace error : Namespace prefix stixCommon on Source is not defined
stixCommon:SourceMITRE/stixCommon:Source
^
/vagrant/STIX_Snippet_Confidence.xml:21: namespace error : Namespace prefix stixCommon on Confidence_Assertion_Chain is not defined
stixCommon:Confidence_Assertion_Chain
^
/vagrant/STIX_Snippet_Confidence.xml:22: namespace error : Namespace prefix stixCommon on Confidence_Assertion is not defined
<stixCommon:Confidence_Assertion timestamp="2012-11-25T00:30:00Z">
^
/vagrant/STIX_Snippet_Confidence.xml:23: namespace error : Namespace prefix stixCommon on Value is not defined
<stixCommon:Value vocab_reference="someURLtoConfidenceModelDescription.foo.com"
^
/vagrant/STIX_Snippet_Confidence.xml:24: namespace error : Namespace prefix stixCommon on Source is not defined
stixCommon:SourceAlpha/stixCommon:Source
^
/vagrant/STIX_Snippet_Confidence.xml:26: namespace error : Namespace prefix stixCommon on Confidence_Assertion is not defined
<stixCommon:Confidence_Assertion timestamp="2012-11-24T11:04:12Z">
^
/vagrant/STIX_Snippet_Confidence.xml:27: namespace error : Namespace prefix stixCommon on Value is not defined
<stixCommon:Value vocab_reference="someURLtoConfidenceModelDescription.bar.com"
^
/vagrant/STIX_Snippet_Confidence.xml:28: namespace error : Namespace prefix stixCommon on Source is not defined
stixCommon:SourceBeta/stixCommon:Source
^
/vagrant/STIX_Snippet_Confidence.xml:29: namespace error : Namespace prefix stixCommon on Confidence_Assertion_Chain is not defined
stixCommon:Confidence_Assertion_Chain
^
/vagrant/STIX_Snippet_Confidence.xml:30: namespace error : Namespace prefix stixCommon on Confidence_Assertion is not defined
<stixCommon:Confidence_Assertion timestamp="2012-11-22T10:45:00Z">
^
/vagrant/STIX_Snippet_Confidence.xml:31: namespace error : Namespace prefix stixCommon on Value is not defined
stixCommon:ValueMedium/stixCommon:Value
^
/vagrant/STIX_Snippet_Confidence.xml:32: namespace error : Namespace prefix stixCommon on Source is not defined
stixCommon:SourceOmega/stixCommon:Source
^
Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 399, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(_args, *_options.dict)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 285, in execute
output = self.handle(_args, *_options)
File "/usr/local/lib/python2.7/dist-packages/dingos/importer.py", line 377, in handle
*_options)
File "/usr/local/lib/python2.7/dist-packages/mantis_stix_importer/importer.py", line 300, in xml_import
markings=object_markings)
File "/usr/local/lib/python2.7/dist-packages/mantis_stix_importer/importer.py", line 1170, in iobject_import
type_info = self.derive_iobject_type(obj_dict['@@ns'], iobject_type_ns, elt_name)
KeyError: '@@ns'

quickstart_psql.sh freeze

Running Xubuntu 14.04 - 32bit on VirtualBox
When running the quickstart_psql.sh, the script freezes and ends up with the following.

unhandled exception in thread started by <function wrapper at 0xb615595c>
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 93, in wrapper
fn(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 101, in inner_run
self.validate(display_num_errors=True)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 310, in validate
num_errors = get_validation_errors(s, app)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/validation.py", line 34, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/usr/local/lib/python2.7/dist-packages/django/db/models/loading.py", line 196, in get_app_errors
self._populate()
File "/usr/local/lib/python2.7/dist-packages/django/db/models/loading.py", line 75, in _populate
self.load_app(app_name, True)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/loading.py", line 97, in load_app
app_module = import_module(app_name)
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 40, in import_module
import(name)
ImportError: No module named grappelli

django-dingos: Fix/Improve JSON representation of InfoObjects

The JSON representation of InfoObjects needs to be fixed and improved: it needs to be fixed, because currently, namespaces are not handled properly for non-standard idrefs such as STIX 'phase_id' and 'chain_id'. Also, maybe the JSON should be split into at least two components, one containing the namespace dictionary, the other containing the contents.

Probably, the code that generates the JSON representation in DINGOS must be configurable by the importers: the STIX/OpenIOC etc. importer would have to provide hooking functions, which would be called by the JSON generator depending on InfoObject family (and maybe InfoObjectType).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.