|
1 |
| -# Generated by Django 4.2.20 on 2025-05-27 10:43 |
| 1 | +# Generated by Django 4.2.20 on 2025-05-28 13:31 |
2 | 2 |
|
3 | 3 | from django.db import migrations, models
|
| 4 | +import django.db.models.deletion |
4 | 5 |
|
5 | 6 |
|
6 | 7 | class Migration(migrations.Migration):
|
7 | 8 |
|
8 | 9 | dependencies = [
|
9 |
| - ("vulnerabilities", "0091_alter_advisory_unique_together_and_more"), |
| 10 | + ("vulnerabilities", "0092_pipelineschedule_pipelinerun"), |
10 | 11 | ]
|
11 | 12 |
|
12 | 13 | operations = [
|
@@ -249,6 +250,16 @@ class Migration(migrations.Migration):
|
249 | 250 | "abstract": False,
|
250 | 251 | },
|
251 | 252 | ),
|
| 253 | + migrations.AlterField( |
| 254 | + model_name="pipelineschedule", |
| 255 | + name="is_active", |
| 256 | + field=models.BooleanField( |
| 257 | + db_index=True, |
| 258 | + default=True, |
| 259 | + help_text="When set to True, this Pipeline is active. When set to False, this Pipeline is inactive and not run.", |
| 260 | + null=True, |
| 261 | + ), |
| 262 | + ), |
252 | 263 | migrations.CreateModel(
|
253 | 264 | name="AdvisoryV2",
|
254 | 265 | fields=[
|
@@ -295,7 +306,7 @@ class Migration(migrations.Migration):
|
295 | 306 | (
|
296 | 307 | "datasource_ID",
|
297 | 308 | models.CharField(
|
298 |
| - help_text="Fully qualified name of the importer prefixed with themodule name importing the advisory. Eg:vulnerabilities.pipeline.nginx_importer.NginxImporterPipeline", |
| 309 | + help_text="Fully qualified name of the importer prefixed with themodule name importing the advisory. Eg:nginx_importer_v2", |
299 | 310 | max_length=100,
|
300 | 311 | ),
|
301 | 312 | ),
|
@@ -346,7 +357,7 @@ class Migration(migrations.Migration):
|
346 | 357 | "fixed_by_packages",
|
347 | 358 | models.ManyToManyField(
|
348 | 359 | help_text="A list of packages that are reported by this advisory.",
|
349 |
| - related_name="fixing_advisorues", |
| 360 | + related_name="fixing_advisories", |
350 | 361 | to="vulnerabilities.packagev2",
|
351 | 362 | ),
|
352 | 363 | ),
|
@@ -379,4 +390,118 @@ class Migration(migrations.Migration):
|
379 | 390 | "ordering": ["date_published", "unique_content_id"],
|
380 | 391 | },
|
381 | 392 | ),
|
| 393 | + migrations.CreateModel( |
| 394 | + name="AdvisoryExploit", |
| 395 | + fields=[ |
| 396 | + ( |
| 397 | + "id", |
| 398 | + models.AutoField( |
| 399 | + auto_created=True, primary_key=True, serialize=False, verbose_name="ID" |
| 400 | + ), |
| 401 | + ), |
| 402 | + ( |
| 403 | + "date_added", |
| 404 | + models.DateField( |
| 405 | + blank=True, |
| 406 | + help_text="The date the vulnerability was added to an exploit catalog.", |
| 407 | + null=True, |
| 408 | + ), |
| 409 | + ), |
| 410 | + ( |
| 411 | + "description", |
| 412 | + models.TextField( |
| 413 | + blank=True, |
| 414 | + help_text="Description of the vulnerability in an exploit catalog, often a refinement of the original CVE description", |
| 415 | + null=True, |
| 416 | + ), |
| 417 | + ), |
| 418 | + ( |
| 419 | + "required_action", |
| 420 | + models.TextField( |
| 421 | + blank=True, |
| 422 | + help_text="The required action to address the vulnerability, typically to apply vendor updates or apply vendor mitigations or to discontinue use.", |
| 423 | + null=True, |
| 424 | + ), |
| 425 | + ), |
| 426 | + ( |
| 427 | + "due_date", |
| 428 | + models.DateField( |
| 429 | + blank=True, |
| 430 | + help_text="The date the required action is due, which applies to all USA federal civilian executive branch (FCEB) agencies, but all organizations are strongly encouraged to execute the required action", |
| 431 | + null=True, |
| 432 | + ), |
| 433 | + ), |
| 434 | + ( |
| 435 | + "notes", |
| 436 | + models.TextField( |
| 437 | + blank=True, |
| 438 | + help_text="Additional notes and resources about the vulnerability, often a URL to vendor instructions.", |
| 439 | + null=True, |
| 440 | + ), |
| 441 | + ), |
| 442 | + ( |
| 443 | + "known_ransomware_campaign_use", |
| 444 | + models.BooleanField( |
| 445 | + default=False, |
| 446 | + help_text="Known' if this vulnerability is known to have been leveraged as part of a ransomware campaign; \n or 'Unknown' if there is no confirmation that the vulnerability has been utilized for ransomware.", |
| 447 | + ), |
| 448 | + ), |
| 449 | + ( |
| 450 | + "source_date_published", |
| 451 | + models.DateField( |
| 452 | + blank=True, |
| 453 | + help_text="The date that the exploit was published or disclosed.", |
| 454 | + null=True, |
| 455 | + ), |
| 456 | + ), |
| 457 | + ( |
| 458 | + "exploit_type", |
| 459 | + models.TextField( |
| 460 | + blank=True, |
| 461 | + help_text="The type of the exploit as provided by the original upstream data source.", |
| 462 | + null=True, |
| 463 | + ), |
| 464 | + ), |
| 465 | + ( |
| 466 | + "platform", |
| 467 | + models.TextField( |
| 468 | + blank=True, |
| 469 | + help_text="The platform associated with the exploit as provided by the original upstream data source.", |
| 470 | + null=True, |
| 471 | + ), |
| 472 | + ), |
| 473 | + ( |
| 474 | + "source_date_updated", |
| 475 | + models.DateField( |
| 476 | + blank=True, |
| 477 | + help_text="The date the exploit was updated in the original upstream data source.", |
| 478 | + null=True, |
| 479 | + ), |
| 480 | + ), |
| 481 | + ( |
| 482 | + "data_source", |
| 483 | + models.TextField( |
| 484 | + blank=True, |
| 485 | + help_text="The source of the exploit information, such as CISA KEV, exploitdb, metaspoit, or others.", |
| 486 | + null=True, |
| 487 | + ), |
| 488 | + ), |
| 489 | + ( |
| 490 | + "source_url", |
| 491 | + models.URLField( |
| 492 | + blank=True, |
| 493 | + help_text="The URL to the exploit as provided in the original upstream data source.", |
| 494 | + null=True, |
| 495 | + ), |
| 496 | + ), |
| 497 | + ( |
| 498 | + "advisory", |
| 499 | + models.ForeignKey( |
| 500 | + on_delete=django.db.models.deletion.CASCADE, |
| 501 | + related_name="exploits", |
| 502 | + to="vulnerabilities.advisoryv2", |
| 503 | + ), |
| 504 | + ), |
| 505 | + ], |
| 506 | + ), |
382 | 507 | ]
|
0 commit comments