# Generated by Django 3.2.3 on 2021-05-27 20:08

from django.db import migrations, models
import tinymce.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='RiskQuestions',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position', models.IntegerField(help_text="<small><span class='text-muted'>The question position number (1, 2, 3, etc...)", unique=True)),
                ('question', models.CharField(help_text="<small><span class='text-muted'>The question itself.", max_length=256, unique=True)),
                ('question_shortname', models.CharField(help_text="<small><span class='text-muted'>A short name to identify this question when create the Risk Vector.", max_length=6, unique=True)),
                ('weight', models.FloatField(default=1, help_text="<small><span class='text-muted'>Add a float number if you need to ponderate this question value.")),
            ],
            options={
                'verbose_name_plural': 'risk questions',
                'ordering': ['position'],
            },
        ),
        migrations.CreateModel(
            name='Vulnerability',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('system', models.CharField(help_text='(Required) The system presenting the vulnerability.', max_length=256)),
                ('system_type', models.CharField(help_text='(Required) Ex: WEB application, Windows Server, Linux Server, Mobilie application, etc.', max_length=256)),
                ('technology', models.CharField(help_text='(Required) Ex: ASP.NET, Joomla, PHP, Java, Apache, etc.', max_length=256)),
                ('environment', models.CharField(help_text='(Required) Ex: Datacenter, Local server, Cloud, etc.', max_length=64)),
                ('perimeter', models.CharField(choices=[('Internal', 'Internal'), ('External', 'External')], default='Unspecified', help_text="(Required) The target system's most accessible surface.", max_length=8)),
                ('owner', models.CharField(help_text="(Required) The target system's owner/responsible.", max_length=256)),
                ('owner_email', models.EmailField(help_text="(Required) The owner's email address.", max_length=64)),
                ('vulnerability', models.CharField(help_text='(Required) The vulnerability name, as reported by the researchers.', max_length=512)),
                ('synopsis', tinymce.models.HTMLField(default='Not provided', help_text='(Required) A short description of the vulnerability. Hint: try to focus in the risks associated with the vulnerability.', max_length=10485760)),
                ('category', models.CharField(blank=True, default='Unknown', help_text="(Optional) For instance, refer to <a target='_blank' href='https://www.owasp.org/index.php/Category:Vulnerability'>OWASP</a> for examples of some categories. But, feel free to set your own.", max_length=512)),
                ('identification_date', models.DateField(help_text='(Required) When vulnerability was discovered/reported.')),
                ('remediation_deadline', models.DateField(help_text='(Required) A feasible deadline to fix the vulnerability.')),
                ('remediation', tinymce.models.HTMLField(blank=True, default='Not provided', help_text='(Optional) The remediation intented to fix the vulnerability.', max_length=10485760)),
                ('status', models.CharField(choices=[('Solved', 'Solved'), ('Notified', 'Notified'), ('Accepted', 'Accepted'), ('Mitigated', 'Mitigated'), ('Not identified', 'Not identified')], help_text='(Required)', max_length=16)),
                ('observation', tinymce.models.HTMLField(blank=True, default='Not provided', help_text='(Optional) Any observation pointed by the researcher when comment this vulnerability.', max_length=10485760)),
                ('risk', models.CharField(choices=[('Critical', 'Critical'), ('High', 'High'), ('Medium', 'Medium'), ('Low', 'Low'), ('Not evaluated', 'Not evaluated')], default='Not evaluated', help_text='(Required)', max_length=10485760)),
                ('risk_vector', models.CharField(blank=True, default='Not evaluated', help_text='(Optional) The risk vector as indicated by Risk calculator.', max_length=64)),
                ('risk_acceptance_reason', models.CharField(blank=True, default='Not provided', help_text='(Optional) Important if you decide to accept the associated risks.', max_length=4096)),
                ('cvss_value', models.FloatField(help_text='(Required)')),
                ('cvss_vector', models.CharField(blank=True, default='Not evaluated', help_text='(Optional) The CVSS 3.0 Vector string.', max_length=64)),
                ('reporter', models.CharField(blank=True, default='Not provided', help_text='(Optional) The company, research team or pentester which found the vulnerability.', max_length=64)),
                ('report_file', models.CharField(blank=True, default='Not provided', help_text='(Optional) The report file for further reference.', max_length=256)),
                ('report_page', models.IntegerField(blank=True, default=0, help_text='(Optional) The report page number which describes the vulnerabity.')),
            ],
            options={
                'verbose_name_plural': 'vulnerabilities',
                'permissions': (('read_vulnerability', 'Can read vulnerability'), ('detail_vulnerability', 'Can detail vulnerability'), ('delete_all_vulnerability', 'Can delete all vulnerabilities')),
            },
        ),
    ]
