# Generated by Django 6.0 on 2026-01-19 19:40 import django.core.validators import django.db.models.deletion from django.conf import settings from django.db import migrations, models import checklists.models class Migration(migrations.Migration): initial = True dependencies = [ ("releases", "0006_alter_release_date"), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name="SecurityIssue", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ( "cna", models.CharField( choices=[("DSF", "DSF"), ("MITRE", "MITRE")], default="DSF", max_length=128, verbose_name="CNA issuing the CVE ID for this issue.", ), ), ( "cve_year_number", models.CharField( default=checklists.models.get_cve_default, max_length=1024, unique=True, verbose_name="CVE ID", ), ), ( "severity", models.CharField( choices=[ ("low", "Low"), ("moderate", "Moderate"), ("high", "High"), ], default="moderate", max_length=128, ), ), ( "summary", models.CharField( help_text="Single backticks here.", max_length=1024 ), ), ( "description", models.TextField( help_text="Written in present tense.\n\nUse SINGLE `backticks` for code-like words.\n\n==> Do not include versions, these will be prepended automatically. <==\n\nCVE documented format suggestions:\n\n
\n •[VULNTYPE] in [COMPONENT] in [VENDOR] [PRODUCT] [VERSION] allows\n [ATTACKER] to [IMPACT] via [VECTOR].\n\n •[COMPONENT] in [VENDOR] [PRODUCT] [VERSION] [ROOT CAUSE], which allows\n [ATTACKER] to [IMPACT] via [VECTOR]\n\n\nExamples:\n
\n The password hasher in contrib/auth/hashers.py allows remote attackers to\n enumerate users via a timing attack involving login requests.\n\n The `intcomma` template filter is subject to a potential denial-of-service\n attack when used with very long strings.\n\n The `django.contrib.auth.forms.UsernameField` is subject to a potential\n denial-of-service attack via certain inputs with a very large number of\n Unicode characters (because the NFKC normalization is slow on Windows).\n\n" ), ), ( "blogdescription", models.TextField( blank=True, help_text="Double backticks here (general rst format).", verbose_name="Blog description", ), ), ("reporter", models.CharField(blank=True, max_length=1024)), ("remediator", models.CharField(blank=True, max_length=1024)), ("created_at", models.DateTimeField(auto_now_add=True)), ("updated_at", models.DateTimeField(auto_now=True)), ("reported_at", models.DateTimeField(null=True)), ("confirmed_at", models.DateTimeField(null=True)), ( "other_type", models.CharField( default="Other", help_text="Deprecated.", max_length=1024 ), ), ( "attack_type", models.CharField( default="Remote", help_text="Deprecated.", max_length=1024 ), ), ( "cve_type", models.TextField( help_text="Comma separated list of Common Weakness Enumeration (CWE) types.MUST CONTAIN COLON SEPARATOR!Browse available types at: https://cwe.mitre.org/Examples:
CWE-23: Relative Path TraversalCWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')CWE-352: Cross-Site Request Forgery (CSRF)CWE-117: Improper Output Neutralization for LogsCWE-770: Allocation of Resources Without Limits or Throttling",
verbose_name="CWE Problem Type",
),
),
(
"impact",
models.TextField(
help_text='Comma separated list of Common Attack Pattern Enumeration and Classification (CAPEC) types.MUST CONTAIN COLON SEPARATOR!Browse available types at: https://capec.mitre.org/Examples:CAPEC-54: Query System for InformationCAPEC-62: Cross Site Request ForgeryCAPEC-63: Cross-Site Scripting (XSS)CAPEC-66: SQL InjectionCAPEC-93: Log Injection-Tampering-ForgingCAPEC-491: Quadratic Data Expansion',
verbose_name="CAPEC Impact Type",
),
),
(
"attack_vector",
models.CharField(
choices=[
("N", "Network"),
("A", "Adjacent"),
("L", "Local"),
("P", "Physical"),
],
default="N",
help_text="The context by which vulnerability exploitation is possible (AV)",
max_length=16,
verbose_name="CVSS Attack Vector",
),
),
(
"attack_complexity",
models.CharField(
choices=[("L", "Low"), ("H", "High")],
default="L",
help_text="Conditions beyond attacker control required to exploit (AC)",
max_length=8,
verbose_name="CVSS Attack Complexity",
),
),
(
"attack_requirements",
models.CharField(
choices=[("N", "None"), ("P", "Present")],
default="N",
help_text="Preconditions for attack to be successful (AT)",
max_length=8,
verbose_name="CVSS Attack Requirements",
),
),
(
"privileges_required",
models.CharField(
choices=[("N", "None"), ("L", "Low"), ("H", "High")],
default="N",
help_text="Level of privileges needed to exploit (PR)",
max_length=8,
verbose_name="CVSS Privileges Required",
),
),
(
"user_interaction",
models.CharField(
choices=[("N", "None"), ("P", "Passive"), ("A", "Active")],
default="N",
help_text="Whether user interaction is required (UI)",
max_length=8,
verbose_name="CVSS User Interaction",
),
),
(
"vuln_confidentiality_impact",
models.CharField(
choices=[("N", "None"), ("L", "Low"), ("H", "High")],
default="N",
help_text="Impact on confidentiality of information (VC)",
max_length=8,
verbose_name="CVSS Confidentiality Impact",
),
),
(
"sub_confidentiality_impact",
models.CharField(
choices=[("N", "None"), ("L", "Low"), ("H", "High")],
default="N",
help_text="Subsequent impact on confidentiality (SC)",
max_length=8,
verbose_name="CVSS Subsequent Confidentiality Impact",
),
),
(
"vuln_integrity_impact",
models.CharField(
choices=[("N", "None"), ("L", "Low"), ("H", "High")],
default="N",
help_text="Impact on integrity of information (VI)",
max_length=8,
verbose_name="CVSS Integrity Impact",
),
),
(
"sub_integrity_impact",
models.CharField(
choices=[("N", "None"), ("L", "Low"), ("H", "High")],
default="N",
help_text="Subsequent impact on integrity of information (SI)",
max_length=8,
verbose_name="CVSS Subsequent Integrity Impact",
),
),
(
"vuln_availability_impact",
models.CharField(
choices=[("N", "None"), ("L", "Low"), ("H", "High")],
default="N",
help_text="Impact on availability of system (VA)",
max_length=8,
verbose_name="CVSS Availability Impact",
),
),
(
"sub_availability_impact",
models.CharField(
choices=[("N", "None"), ("L", "Low"), ("H", "High")],
default="N",
help_text="Subsequent impact on availability of system (SA)",
max_length=8,
verbose_name="CVSS Subsequent Availability Impact",
),
),
(
"safety",
models.CharField(
choices=[
("X", "Not Defined"),
("N", "Negligible"),
("P", "Present"),
],
default="X",
help_text="Potential impact on safety of humans or environment (S)",
max_length=16,
verbose_name="CVSS Safety",
),
),
(
"automatable",
models.CharField(
choices=[("X", "Not Defined"), ("N", "No"), ("Y", "Yes")],
default="X",
help_text="Ease of automation for exploit (AU)",
max_length=16,
verbose_name="CVSS Automatable",
),
),
(
"recovery",
models.CharField(
choices=[
("X", "Not Defined"),
("A", "Automatic"),
("U", "User"),
("I", "Irrecoverable"),
],
default="X",
help_text="Ease of recovery from the vulnerability (R)",
max_length=16,
verbose_name="CVSS Recovery",
),
),
(
"value_density",
models.CharField(
choices=[
("X", "Not Defined"),
("D", "Diffuse"),
("C", "Concentrated"),
],
default="X",
help_text="Control gained over resources with a single exploitation event (V)",
max_length=16,
verbose_name="CVSS Value Density",
),
),
(
"vulnerability_response_effort",
models.CharField(
choices=[
("X", "Not Defined"),
("L", "Low"),
("M", "Moderate"),
("H", "High"),
],
default="X",
help_text="Effort needed by provider to respond (RE)",
max_length=16,
verbose_name="CVSS Response Effort",
),
),
(
"provider_urgency",
models.CharField(
choices=[
("X", "Not Defined"),
("CLEAR", "Clear"),
("GREEN", "Green"),
("AMBER", "Amber"),
("RED", "Red"),
],
default="X",
help_text="Urgency perceived by provider to respond (U)",
max_length=16,
verbose_name="CVSS Urgency",
),
),
(
"cvss_base_score",
models.PositiveSmallIntegerField(
default=0,
help_text='Base score (0–10) calculated from the CVSS v4.0 metrics.This value should be computed from the CVSS selected metric fields using the official CVSS v4.0 formula.See https://www.first.org/cvss/calculator/4-0',
validators=[
django.core.validators.MinValueValidator(0),
django.core.validators.MaxValueValidator(10),
],
verbose_name="CVSS Base Score",
),
),
(
"commit_hash_main",
models.CharField(
blank=True, db_index=True, default="", max_length=128
),
),
],
),
migrations.CreateModel(
name="FeatureRelease",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("when", models.DateTimeField()),
("created_at", models.DateTimeField(auto_now_add=True)),
("updated_at", models.DateTimeField(auto_now=True)),
("forum_post", models.URLField(blank=True)),
(
"tagline",
models.CharField(
help_text="Filler to use in the sentence Django [version] [tagline] which you can read about in the release notes.For example: Django 5.1 brings a kaleidoscope of improvements.",
max_length=4096,
),
),
("highlights", models.TextField(blank=True)),
(
"eol_release",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="+",
to="releases.release",
),
),
(
"eom_release",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="+",
to="releases.release",
),
),
(
"release",
models.OneToOneField(
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="releases.release",
),
),
],
options={
"abstract": False,
},
),
migrations.CreateModel(
name="Releaser",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"key_id",
models.CharField(
help_text="gpg --list-keys --keyid-format LONG", max_length=100
),
),
("key_url", models.URLField()),
(
"user",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to=settings.AUTH_USER_MODEL,
),
),
],
),
migrations.CreateModel(
name="PreRelease",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("when", models.DateTimeField()),
("created_at", models.DateTimeField(auto_now_add=True)),
("updated_at", models.DateTimeField(auto_now=True)),
(
"feature_release",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="checklists.featurerelease",
),
),
(
"release",
models.OneToOneField(
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="releases.release",
),
),
(
"releaser",
models.ForeignKey(
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="checklists.releaser",
),
),
],
options={
"abstract": False,
},
),
migrations.AddField(
model_name="featurerelease",
name="releaser",
field=models.ForeignKey(
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="checklists.releaser",
),
),
migrations.CreateModel(
name="BugFixRelease",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("when", models.DateTimeField()),
("created_at", models.DateTimeField(auto_now_add=True)),
("updated_at", models.DateTimeField(auto_now=True)),
(
"release",
models.OneToOneField(
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="releases.release",
),
),
(
"releaser",
models.ForeignKey(
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="checklists.releaser",
),
),
],
options={
"abstract": False,
},
),
migrations.CreateModel(
name="SecurityIssueReleasesThrough",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"commit_hash",
models.CharField(
blank=True, db_index=True, default="", max_length=128
),
),
(
"release",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="releases.release",
),
),
(
"securityissue",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="checklists.securityissue",
verbose_name="Security Issue",
),
),
],
),
migrations.AddField(
model_name="securityissue",
name="releases",
field=models.ManyToManyField(
through="checklists.SecurityIssueReleasesThrough", to="releases.release"
),
),
migrations.CreateModel(
name="SecurityRelease",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("when", models.DateTimeField()),
("created_at", models.DateTimeField(auto_now_add=True)),
("updated_at", models.DateTimeField(auto_now=True)),
(
"releaser",
models.ForeignKey(
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="checklists.releaser",
),
),
],
options={
"abstract": False,
},
),
migrations.AddField(
model_name="securityissue",
name="release",
field=models.ForeignKey(
blank=True,
help_text="Security Release that will fix this issue.",
null=True,
on_delete=django.db.models.deletion.CASCADE,
to="checklists.securityrelease",
),
),
migrations.AddConstraint(
model_name="securityissuereleasesthrough",
constraint=models.UniqueConstraint(
fields=("securityissue", "release"), name="unique_securityissue_release"
),
),
migrations.AddConstraint(
model_name="securityissuereleasesthrough",
constraint=models.UniqueConstraint(
condition=models.Q(("commit_hash", ""), _negated=True),
fields=("commit_hash",),
name="unique_non_empty_commit_hash",
),
),
]