This repository has been archived by the owner on Sep 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #791 from GreatFruitOmsk/750-cve-kernel-meta-packages
CVE list: Show only the currently running kernel meta-package
- Loading branch information
Showing
8 changed files
with
100 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
backend/device_registry/migrations/0088_auto_20200306_1702.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Generated by Django 2.2.10 on 2020-03-06 17:02 | ||
|
||
from django.db import migrations, models | ||
|
||
from device_registry.models import UBUNTU_SUITES, UBUNTU_KERNEL_PACKAGES_RE_PATTERN | ||
|
||
|
||
def reset_kernel_packages_vulns(apps, schema_editor): | ||
# Delete vulns of kernel-related packages. | ||
DebPackageVulnerability = apps.get_model('device_registry', 'DebPackage').vulnerabilities.through | ||
# Ubuntu. | ||
DebPackageVulnerability.objects.filter( | ||
debpackage__os_release_codename__in=UBUNTU_SUITES, debpackage__name__regex=UBUNTU_KERNEL_PACKAGES_RE_PATTERN | ||
).delete() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('device_registry', '0087_auto_20200318_0652'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='device', | ||
name='reboot_required', | ||
field=models.BooleanField(blank=True, db_index=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name='vulnerability', | ||
name='name', | ||
field=models.CharField(db_index=True, max_length=64), | ||
), | ||
migrations.AlterField( | ||
model_name='vulnerability', | ||
name='fix_available', | ||
field=models.BooleanField(db_index=True), | ||
), | ||
migrations.RunPython(reset_kernel_packages_vulns) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters