patchman 4.0.18__tar.gz → 4.0.20__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {patchman-4.0.18 → patchman-4.0.20}/PKG-INFO +4 -4
- patchman-4.0.20/VERSION.txt +1 -0
- patchman-4.0.20/errata/migrations/0010_synopsis_textfield.py +18 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/models.py +55 -53
- {patchman-4.0.18 → patchman-4.0.20}/errata/sources/distros/alma.py +21 -22
- {patchman-4.0.18 → patchman-4.0.20}/errata/sources/distros/arch.py +16 -11
- {patchman-4.0.18 → patchman-4.0.20}/errata/sources/distros/debian.py +52 -34
- {patchman-4.0.18 → patchman-4.0.20}/errata/sources/distros/rocky.py +31 -23
- {patchman-4.0.18 → patchman-4.0.20}/errata/sources/distros/ubuntu.py +17 -19
- {patchman-4.0.18 → patchman-4.0.20}/errata/sources/repos/yum.py +14 -14
- {patchman-4.0.18 → patchman-4.0.20}/errata/tasks.py +14 -4
- {patchman-4.0.18 → patchman-4.0.20}/errata/utils.py +44 -21
- {patchman-4.0.18 → patchman-4.0.20}/etc/patchman/local_settings.py +1 -1
- {patchman-4.0.18 → patchman-4.0.20}/etc/systemd/system/patchman-celery-beat.service +2 -0
- {patchman-4.0.18 → patchman-4.0.20}/etc/systemd/system/patchman-celery-worker@.service +3 -0
- patchman-4.0.20/hosts/migrations/0013_alter_hostrepo_unique_together_and_more.py +21 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/models.py +62 -69
- {patchman-4.0.18 → patchman-4.0.20}/hosts/tables.py +4 -2
- {patchman-4.0.18 → patchman-4.0.20}/hosts/tests/test_models.py +106 -18
- {patchman-4.0.18 → patchman-4.0.20}/hosts/views.py +3 -0
- patchman-4.0.20/modules/migrations/0007_alter_module_unique_together_module_unique_module.py +21 -0
- {patchman-4.0.18 → patchman-4.0.20}/modules/models.py +6 -1
- patchman-4.0.20/operatingsystems/migrations/0012_alter_osrelease_unique_together_and_more.py +21 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/models.py +6 -1
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/views.py +2 -2
- patchman-4.0.20/packages/migrations/0008_alter_package_unique_together_and_more.py +29 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/models.py +12 -2
- {patchman-4.0.18 → patchman-4.0.20}/packages/tables.py +95 -12
- patchman-4.0.20/packages/templates/packages/package_name_detail.html +20 -0
- patchman-4.0.20/packages/templates/packages/package_update_list.html +7 -0
- patchman-4.0.20/packages/tests/test_views.py +72 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/urls.py +1 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/utils.py +16 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/views.py +64 -4
- {patchman-4.0.18 → patchman-4.0.20}/patchman/celery.py +14 -0
- {patchman-4.0.18 → patchman-4.0.20}/patchman/receivers.py +4 -3
- {patchman-4.0.18 → patchman-4.0.20}/patchman/settings.py +0 -1
- {patchman-4.0.18 → patchman-4.0.20}/patchman/sqlite3/base.py +5 -0
- {patchman-4.0.18 → patchman-4.0.20}/patchman/urls.py +1 -2
- {patchman-4.0.18 → patchman-4.0.20}/patchman.egg-info/PKG-INFO +4 -4
- {patchman-4.0.18 → patchman-4.0.20}/patchman.egg-info/SOURCES.txt +8 -0
- {patchman-4.0.18 → patchman-4.0.20}/patchman.egg-info/requires.txt +3 -3
- {patchman-4.0.18 → patchman-4.0.20}/reports/models.py +1 -1
- {patchman-4.0.18 → patchman-4.0.20}/reports/tests/test_parsing.py +31 -31
- {patchman-4.0.18 → patchman-4.0.20}/reports/tests/test_utils.py +29 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/utils.py +13 -10
- {patchman-4.0.18 → patchman-4.0.20}/reports/views.py +4 -4
- {patchman-4.0.18 → patchman-4.0.20}/repos/repo_types/yum.py +1 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/utils.py +3 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/views.py +2 -2
- {patchman-4.0.18 → patchman-4.0.20}/requirements.txt +3 -3
- {patchman-4.0.18 → patchman-4.0.20}/sbin/patchman +13 -2
- patchman-4.0.20/security/migrations/0011_alter_cvss_unique_together_and_more.py +29 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/models.py +15 -3
- {patchman-4.0.18 → patchman-4.0.20}/security/tests/test_models.py +2 -4
- {patchman-4.0.18 → patchman-4.0.20}/security/utils.py +8 -4
- {patchman-4.0.18 → patchman-4.0.20}/util/__init__.py +65 -11
- {patchman-4.0.18 → patchman-4.0.20}/util/context_processors.py +4 -4
- {patchman-4.0.18 → patchman-4.0.20}/util/filterspecs.py +2 -1
- {patchman-4.0.18 → patchman-4.0.20}/util/logging.py +15 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/templates/navbar.html +7 -1
- patchman-4.0.18/VERSION.txt +0 -1
- patchman-4.0.18/packages/templates/packages/package_name_detail.html +0 -43
- {patchman-4.0.18 → patchman-4.0.20}/AUTHORS +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/COPYING +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/INSTALL.md +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/MANIFEST.in +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/README.md +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/arch/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/arch/admin.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/arch/apps.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/arch/migrations/0001_initial.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/arch/migrations/0002_alter_machinearchitecture_options_and_more.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/arch/migrations/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/arch/models.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/arch/serializers.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/arch/tests/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/arch/tests/test_api.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/arch/tests/test_models.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/arch/utils.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/arch/views.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/domains/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/domains/admin.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/domains/apps.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/domains/migrations/0001_initial.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/domains/migrations/0002_alter_domain_options.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/domains/migrations/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/domains/models.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/domains/serializers.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/domains/tests/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/domains/tests/test_api.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/domains/tests/test_models.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/domains/views.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/admin.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/apps.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/managers.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/migrations/0001_initial.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/migrations/0002_alter_erratumreference_unique_together.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/migrations/0003_delete_erratumreference_alter_erratum_references.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/migrations/0004_rename_packages_erratum_fixed_packages.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/migrations/0005_erratum_affected_packages_and_more.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/migrations/0006_alter_erratum_options.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/migrations/0007_alter_erratum_fixed_packages.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/migrations/0008_add_cached_count_fields.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/migrations/0009_backfill_cached_counts.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/migrations/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/serializers.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/signals.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/sources/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/sources/distros/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/sources/distros/centos.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/sources/repos/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/tables.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/templates/errata/erratum_detail.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/templates/errata/erratum_list.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/tests/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/tests/test_api.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/tests/test_integration.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/tests/test_models.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/urls.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/errata/views.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/etc/patchman/apache.conf.example +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/etc/patchman/celery.conf +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/admin.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/apps.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/forms.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/managers.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/migrations/0001_initial.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/migrations/0002_initial.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/migrations/0003_host_modules.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/migrations/0004_remove_host_tags_host_tags.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/migrations/0005_rename_os_host_osvariant.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/migrations/0006_migrate_to_tz_aware.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/migrations/0007_alter_host_tags.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/migrations/0008_alter_host_options.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/migrations/0009_host_errata.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/migrations/0010_alter_hostrepo_options.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/migrations/0011_host_bug_updates_count_host_errata_count_and_more.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/migrations/0012_backfill_cached_counts.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/migrations/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/serializers.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/signals.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/tasks.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/templates/hosts/host_delete.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/templates/hosts/host_detail.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/templates/hosts/host_edit.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/templates/hosts/host_list.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/templatetags/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/templatetags/report_alert.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/tests/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/tests/test_api.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/tests/test_find_updates.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/tests/test_managers.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/urls.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/hosts/utils.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/modules/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/modules/admin.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/modules/apps.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/modules/managers.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/modules/migrations/0001_initial.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/modules/migrations/0002_auto_20240204_2214.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/modules/migrations/0003_alter_module_options.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/modules/migrations/0004_alter_module_options.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/modules/migrations/0005_alter_module_unique_together.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/modules/migrations/0006_alter_module_context_alter_module_name_and_more.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/modules/migrations/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/modules/serializers.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/modules/tables.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/modules/templates/modules/module_detail.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/modules/templates/modules/module_list.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/modules/urls.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/modules/utils.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/modules/views.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/admin.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/apps.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/fixtures/os.json +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/fixtures/osgroup.json +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/forms.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/managers.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/migrations/0001_initial.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/migrations/0002_initial.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/migrations/0003_os_arch.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/migrations/0003_osgroup_codename.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/migrations/0004_alter_osgroup_unique_together.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/migrations/0005_rename_osgroup_osrelease_rename_os_osvariant_and_more.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/migrations/0006_osrelease_cpe_name_osvariant_codename.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/migrations/0007_alter_osrelease_unique_together.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/migrations/0008_alter_osrelease_options_alter_osvariant_options.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/migrations/0009_osvariant_hosts_count.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/migrations/0010_backfill_osvariant_counts.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/migrations/0011_alter_osrelease_codename_alter_osrelease_cpe_name_and_more.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/migrations/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/serializers.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/signals.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/tables.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/templates/operatingsystems/os_landing.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/templates/operatingsystems/osrelease_delete.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/templates/operatingsystems/osrelease_detail.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/templates/operatingsystems/osrelease_list.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/templates/operatingsystems/osvariant_delete.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/templates/operatingsystems/osvariant_delete_multiple.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/templates/operatingsystems/osvariant_detail.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/templates/operatingsystems/osvariant_list.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/tests/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/tests/test_api.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/tests/test_models.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/urls.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/operatingsystems/utils.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/admin.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/apps.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/managers.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/migrations/0001_initial.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/migrations/0002_auto_20250207_1319.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/migrations/0002_delete_erratum_delete_erratumreference.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/migrations/0003_auto_20250207_1746.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/migrations/0004_alter_package_options_alter_packagecategory_options_and_more.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/migrations/0005_alter_package_packagetype.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/migrations/0006_alter_packageupdate_options.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/migrations/0007_alter_package_epoch_alter_package_release_and_more.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/migrations/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/serializers.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/templates/packages/package_detail.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/templates/packages/package_list.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/templates/packages/package_name_list.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/tests/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/tests/test_api.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/tests/test_models.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/packages/tests/test_version_compare.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/patchman/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/patchman/signals.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/patchman/static/css/base.css +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/patchman/static/js/expandable-text.js +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/patchman/static/js/sidebar.js +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/patchman/wsgi.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/patchman.egg-info/dependency_links.txt +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/patchman.egg-info/top_level.txt +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/admin.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/apps.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/migrations/0001_initial.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/migrations/0002_report_modules.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/migrations/0003_remove_report_accessed.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/migrations/0004_migrate_to_tz_aware.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/migrations/0005_alter_report_options.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/migrations/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/serializers.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/tables.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/tasks.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/templates/reports/report.txt +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/templates/reports/report_delete.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/templates/reports/report_detail.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/templates/reports/report_list.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/tests/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/tests/test_api.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/tests/test_edge_cases.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/tests/test_integration.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/tests/test_models.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/tests/test_serializers.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/tests/test_tasks.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/reports/urls.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/admin.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/apps.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/forms.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/managers.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/migrations/0001_initial.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/migrations/0002_alter_repository_repotype.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/migrations/0003_migrate_to_tz_aware.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/migrations/0004_rename_file_checksum_mirror_package_checksum.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/migrations/0005_rename_package_checksum_mirror_packages_checksum.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/migrations/0006_mirror_errata_checksum_mirror_modules_checksum.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/migrations/0007_alter_mirror_options_alter_mirrorpackage_options_and_more.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/migrations/0008_mirror_packages_count.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/migrations/0009_backfill_mirror_counts.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/migrations/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/models.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/repo_types/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/repo_types/arch.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/repo_types/deb.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/repo_types/gentoo.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/repo_types/rpm.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/repo_types/yast.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/serializers.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/signals.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/tables.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/tasks.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/templates/repos/mirror_delete.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/templates/repos/mirror_detail.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/templates/repos/mirror_edit.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/templates/repos/mirror_list.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/templates/repos/mirror_with_repo_list.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/templates/repos/repo_delete.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/templates/repos/repo_detail.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/templates/repos/repo_edit.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/templates/repos/repo_list.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/templatetags/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/tests/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/tests/test_api.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/tests/test_managers.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/tests/test_mirror_sync.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/tests/test_models.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/tests/test_views.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/repos/urls.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/sbin/patchman-manage +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/sbin/patchman-set-secret-key +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/scripts/clear-django-logs.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/scripts/create_graph.sh +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/scripts/rpm-install.sh +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/scripts/rpm-post-install.sh +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/admin.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/apps.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/managers.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/migrations/0001_initial.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/migrations/0002_alter_cve_options.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/migrations/0003_alter_cve_description_alter_cwe_description.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/migrations/0004_alter_cve_options.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/migrations/0005_reference_cve_references.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/migrations/0006_alter_cve_options_alter_cvss_unique_together.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/migrations/0007_remove_cve_title.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/migrations/0008_alter_cwe_options_alter_reference_options.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/migrations/0009_alter_cvss_severity_alter_cvss_vector_string_and_more.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/migrations/0010_fix_cvss_vector_string_length.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/migrations/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/serializers.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/tables.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/tasks.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/templates/security/cve_detail.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/templates/security/cve_list.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/templates/security/cwe_detail.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/templates/security/cwe_list.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/templates/security/reference_list.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/templates/security/security_landing.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/tests/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/tests/test_api.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/urls.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/security/views.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/setup.cfg +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/setup.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/apps.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/management/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/management/commands/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/management/commands/create_api_key.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/management/commands/list_api_keys.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/management/commands/revoke_api_key.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/tables.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/tasks.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/templates/404.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/templates/500.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/templates/base.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/templates/bulk_actions.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/templates/dashboard.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/templates/objectlist.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/templates/registration/login.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/templates/searchbar.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/templates/table.html +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/templatetags/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/templatetags/common.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/tests/__init__.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/tests/test_commands.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/tests/test_utils.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/urls.py +0 -0
- {patchman-4.0.18 → patchman-4.0.20}/util/views.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: patchman
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.20
|
|
4
4
|
Summary: Django based patch status monitoring tool for linux systems
|
|
5
5
|
Home-page: http://patchman.openbytes.ie/
|
|
6
6
|
Author: Marcus Furlong
|
|
@@ -15,14 +15,14 @@ Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: COPYING
|
|
17
17
|
License-File: AUTHORS
|
|
18
|
-
Requires-Dist: Django==4.2.
|
|
18
|
+
Requires-Dist: Django==4.2.30
|
|
19
19
|
Requires-Dist: django-taggit==4.0.0
|
|
20
20
|
Requires-Dist: django-extensions==3.2.3
|
|
21
21
|
Requires-Dist: django-bootstrap3==23.1
|
|
22
22
|
Requires-Dist: python-debian==1.0.1
|
|
23
23
|
Requires-Dist: defusedxml==0.7.1
|
|
24
24
|
Requires-Dist: PyYAML==6.0.2
|
|
25
|
-
Requires-Dist: requests==2.
|
|
25
|
+
Requires-Dist: requests==2.33.0
|
|
26
26
|
Requires-Dist: colorama==0.4.6
|
|
27
27
|
Requires-Dist: djangorestframework==3.15.2
|
|
28
28
|
Requires-Dist: djangorestframework-api-key==3.0.0
|
|
@@ -30,7 +30,7 @@ Requires-Dist: django-filter==25.1
|
|
|
30
30
|
Requires-Dist: humanize==4.12.1
|
|
31
31
|
Requires-Dist: version-utils==0.3.2
|
|
32
32
|
Requires-Dist: python-magic==0.4.27
|
|
33
|
-
Requires-Dist: gitpython==3.1.
|
|
33
|
+
Requires-Dist: gitpython==3.1.47
|
|
34
34
|
Requires-Dist: tenacity==8.2.3
|
|
35
35
|
Requires-Dist: celery==5.4.0
|
|
36
36
|
Requires-Dist: redis==6.4.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4.0.20
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Generated by Django 4.2.28 on 2026-05-02 03:49
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
|
|
8
|
+
dependencies = [
|
|
9
|
+
('errata', '0009_backfill_cached_counts'),
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
operations = [
|
|
13
|
+
migrations.AlterField(
|
|
14
|
+
model_name='erratum',
|
|
15
|
+
name='synopsis',
|
|
16
|
+
field=models.TextField(),
|
|
17
|
+
),
|
|
18
|
+
]
|
|
@@ -21,7 +21,7 @@ from django.urls import reverse
|
|
|
21
21
|
|
|
22
22
|
from errata.managers import ErratumManager
|
|
23
23
|
from packages.models import Package, PackageUpdate
|
|
24
|
-
from packages.utils import find_evr,
|
|
24
|
+
from packages.utils import find_evr, get_matching_packages_q
|
|
25
25
|
from security.models import CVE, Reference
|
|
26
26
|
from security.utils import get_or_create_cve, get_or_create_reference
|
|
27
27
|
from util import get_url
|
|
@@ -33,7 +33,7 @@ class Erratum(models.Model):
|
|
|
33
33
|
name = models.CharField(max_length=255, unique=True)
|
|
34
34
|
e_type = models.CharField(max_length=255)
|
|
35
35
|
issue_date = models.DateTimeField()
|
|
36
|
-
synopsis = models.
|
|
36
|
+
synopsis = models.TextField()
|
|
37
37
|
affected_packages = models.ManyToManyField(Package, blank=True, related_name='affected_by_erratum')
|
|
38
38
|
fixed_packages = models.ManyToManyField(Package, blank=True, related_name='provides_fix_in_erratum')
|
|
39
39
|
from operatingsystems.models import OSRelease
|
|
@@ -64,55 +64,58 @@ class Erratum(models.Model):
|
|
|
64
64
|
|
|
65
65
|
def scan_for_security_updates(self):
|
|
66
66
|
if self.e_type == 'security':
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
security=False
|
|
67
|
+
fixed_pks = list(self.fixed_packages.values_list('pk', flat=True))
|
|
68
|
+
if fixed_pks:
|
|
69
|
+
self._mark_updates_security(
|
|
70
|
+
PackageUpdate.objects.filter(newpackage__in=fixed_pks, security=False)
|
|
71
71
|
)
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
except IntegrityError as e:
|
|
77
|
-
error_message(text=e)
|
|
78
|
-
# a version of this update already exists that is
|
|
79
|
-
# marked as a security update, so delete this one
|
|
80
|
-
affected_update.delete()
|
|
81
|
-
for package in self.affected_packages.all():
|
|
82
|
-
affected_updates = PackageUpdate.objects.filter(
|
|
83
|
-
oldpackage=package,
|
|
84
|
-
security=False,
|
|
72
|
+
affected_pks = list(self.affected_packages.values_list('pk', flat=True))
|
|
73
|
+
if affected_pks:
|
|
74
|
+
self._mark_updates_security(
|
|
75
|
+
PackageUpdate.objects.filter(oldpackage__in=affected_pks, security=False)
|
|
85
76
|
)
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
77
|
+
|
|
78
|
+
def _mark_updates_security(self, updates):
|
|
79
|
+
""" Mark a queryset of PackageUpdates as security updates.
|
|
80
|
+
Handles IntegrityError by deleting duplicates.
|
|
81
|
+
"""
|
|
82
|
+
try:
|
|
83
|
+
updates.update(security=True)
|
|
84
|
+
except IntegrityError:
|
|
85
|
+
# fall back to individual saves to handle duplicates
|
|
86
|
+
for update in updates:
|
|
87
|
+
update.security = True
|
|
88
|
+
try:
|
|
89
|
+
update.save()
|
|
90
|
+
except IntegrityError as e:
|
|
91
|
+
error_message(text=e)
|
|
92
|
+
update.delete()
|
|
93
|
+
|
|
94
|
+
def fetch_osv_dev_data(self, session=None):
|
|
95
|
+
""" Fetch osv.dev JSON for this erratum. Returns parsed JSON or None.
|
|
96
|
+
"""
|
|
97
97
|
osv_dev_url = f'https://api.osv.dev/v1/vulns/{self.name}'
|
|
98
|
-
res = get_url(osv_dev_url)
|
|
98
|
+
res = get_url(osv_dev_url, session=session)
|
|
99
|
+
if res is None:
|
|
100
|
+
return None
|
|
99
101
|
if res.status_code == 404:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
data = res.content
|
|
103
|
-
osv_dev_json = json.loads(data)
|
|
104
|
-
self.parse_osv_dev_data(osv_dev_json)
|
|
102
|
+
return None
|
|
103
|
+
return json.loads(res.content)
|
|
105
104
|
|
|
106
105
|
def parse_osv_dev_data(self, osv_dev_json):
|
|
106
|
+
from django.db.models import Q
|
|
107
107
|
name = osv_dev_json.get('id')
|
|
108
108
|
if name != self.name:
|
|
109
109
|
error_message(text=f'Erratum name mismatch - {self.name} != {name}')
|
|
110
110
|
return
|
|
111
111
|
related = osv_dev_json.get('related')
|
|
112
112
|
if related:
|
|
113
|
+
cves = []
|
|
113
114
|
for vuln in related:
|
|
114
115
|
if vuln.startswith('CVE'):
|
|
115
|
-
|
|
116
|
+
cves.append(vuln)
|
|
117
|
+
for cve_id in cves:
|
|
118
|
+
self.add_cve(cve_id)
|
|
116
119
|
affected = osv_dev_json.get('affected')
|
|
117
120
|
if not affected:
|
|
118
121
|
return
|
|
@@ -129,30 +132,29 @@ class Erratum(models.Model):
|
|
|
129
132
|
for match in matching_packages:
|
|
130
133
|
fixed_packages.add(match)
|
|
131
134
|
affected_versions = package.get('versions')
|
|
132
|
-
if not affected_versions:
|
|
135
|
+
if not affected_versions or not fixed_packages:
|
|
133
136
|
continue
|
|
134
|
-
for
|
|
137
|
+
for fp in fixed_packages:
|
|
138
|
+
q = Q()
|
|
135
139
|
for version in affected_versions:
|
|
136
140
|
epoch, ver, rel = find_evr(version)
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
for match in matching_packages:
|
|
146
|
-
affected_packages.add(match)
|
|
141
|
+
q |= Q(epoch=epoch, version=ver, release=rel)
|
|
142
|
+
matching_packages = get_matching_packages_q(
|
|
143
|
+
name=fp.name,
|
|
144
|
+
q=q,
|
|
145
|
+
arch=fp.arch,
|
|
146
|
+
p_type=fp.packagetype,
|
|
147
|
+
)
|
|
148
|
+
affected_packages.update(matching_packages)
|
|
147
149
|
self.add_affected_packages(affected_packages)
|
|
148
150
|
|
|
149
151
|
def add_fixed_packages(self, packages):
|
|
150
|
-
|
|
151
|
-
self.fixed_packages.add(
|
|
152
|
+
if packages:
|
|
153
|
+
self.fixed_packages.add(*packages)
|
|
152
154
|
|
|
153
155
|
def add_affected_packages(self, packages):
|
|
154
|
-
|
|
155
|
-
self.affected_packages.add(
|
|
156
|
+
if packages:
|
|
157
|
+
self.affected_packages.add(*packages)
|
|
156
158
|
|
|
157
159
|
def add_cve(self, cve_id):
|
|
158
160
|
""" Add a CVE to an Erratum object
|
|
@@ -14,19 +14,21 @@
|
|
|
14
14
|
# You should have received a copy of the GNU General Public License
|
|
15
15
|
# along with Patchman. If not, see <http://www.gnu.org/licenses/>
|
|
16
16
|
|
|
17
|
-
import concurrent.futures
|
|
18
17
|
import json
|
|
19
18
|
|
|
20
|
-
from
|
|
21
|
-
|
|
22
|
-
from operatingsystems.utils import
|
|
19
|
+
from errata.utils import get_or_create_erratum
|
|
20
|
+
from modules.utils import get_matching_modules
|
|
21
|
+
from operatingsystems.utils import (
|
|
22
|
+
get_or_create_osrelease, normalize_el_osrelease,
|
|
23
|
+
)
|
|
23
24
|
from packages.models import Package
|
|
24
25
|
from packages.utils import get_or_create_package, parse_package_string
|
|
25
26
|
from patchman.signals import pbar_start, pbar_update
|
|
26
|
-
from util import fetch_content, get_setting_of_type, get_url
|
|
27
|
+
from util import fetch_content, get_setting_of_type, get_url, run_concurrently
|
|
28
|
+
from util.logging import clear_forked_pbar
|
|
27
29
|
|
|
28
30
|
|
|
29
|
-
def update_alma_errata(concurrent_processing=True):
|
|
31
|
+
def update_alma_errata(concurrent_processing=True, max_workers=25):
|
|
30
32
|
""" Update Alma Linux advisories from errata.almalinux.org:
|
|
31
33
|
https://errata.almalinux.org/8/errata.full.json
|
|
32
34
|
https://errata.almalinux.org/9/errata.full.json
|
|
@@ -40,7 +42,7 @@ def update_alma_errata(concurrent_processing=True):
|
|
|
40
42
|
)
|
|
41
43
|
for release in alma_releases:
|
|
42
44
|
advisories = fetch_alma_advisories(release)
|
|
43
|
-
process_alma_errata(release, advisories, concurrent_processing)
|
|
45
|
+
process_alma_errata(release, advisories, concurrent_processing, max_workers)
|
|
44
46
|
|
|
45
47
|
|
|
46
48
|
def fetch_alma_advisories(release):
|
|
@@ -54,11 +56,11 @@ def fetch_alma_advisories(release):
|
|
|
54
56
|
return advisories
|
|
55
57
|
|
|
56
58
|
|
|
57
|
-
def process_alma_errata(release, advisories, concurrent_processing):
|
|
59
|
+
def process_alma_errata(release, advisories, concurrent_processing, max_workers=25):
|
|
58
60
|
""" Process Alma Linux Errata
|
|
59
61
|
"""
|
|
60
62
|
if concurrent_processing:
|
|
61
|
-
process_alma_errata_concurrently(release, advisories)
|
|
63
|
+
process_alma_errata_concurrently(release, advisories, max_workers)
|
|
62
64
|
else:
|
|
63
65
|
process_alma_errata_serially(release, advisories)
|
|
64
66
|
|
|
@@ -73,24 +75,24 @@ def process_alma_errata_serially(release, advisories):
|
|
|
73
75
|
pbar_update.send(sender=None, index=i + 1)
|
|
74
76
|
|
|
75
77
|
|
|
76
|
-
def process_alma_errata_concurrently(release, advisories):
|
|
78
|
+
def process_alma_errata_concurrently(release, advisories, max_workers=25):
|
|
77
79
|
""" Process Alma Linux Errata concurrently
|
|
78
80
|
"""
|
|
79
|
-
connections.close_all()
|
|
80
81
|
elen = len(advisories)
|
|
81
82
|
pbar_start.send(sender=None, ptext=f'Processing {elen} Alma {release} Errata', plen=elen)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
args = [(release, advisory) for advisory in advisories]
|
|
84
|
+
for i, _ in enumerate(run_concurrently(process_alma_erratum_wrapper, args, max_workers)):
|
|
85
|
+
pbar_update.send(sender=None, index=i + 1)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def process_alma_erratum_wrapper(args):
|
|
89
|
+
clear_forked_pbar()
|
|
90
|
+
return process_alma_erratum(*args)
|
|
88
91
|
|
|
89
92
|
|
|
90
93
|
def process_alma_erratum(release, advisory):
|
|
91
94
|
""" Process a single Alma Linux Erratum
|
|
92
95
|
"""
|
|
93
|
-
from errata.utils import get_or_create_erratum
|
|
94
96
|
erratum_name = advisory.get('id')
|
|
95
97
|
issue_date = advisory.get('issued_date')
|
|
96
98
|
synopsis = advisory.get('title')
|
|
@@ -110,7 +112,6 @@ def process_alma_erratum(release, advisory):
|
|
|
110
112
|
def add_alma_erratum_osreleases(e, release):
|
|
111
113
|
""" Update OS Release for Alma Linux errata
|
|
112
114
|
"""
|
|
113
|
-
from operatingsystems.utils import normalize_el_osrelease
|
|
114
115
|
osrelease_name = normalize_el_osrelease(f'Alma Linux {release}')
|
|
115
116
|
osrelease = get_or_create_osrelease(name=osrelease_name)
|
|
116
117
|
e.osreleases.add(osrelease)
|
|
@@ -150,7 +151,6 @@ def add_alma_erratum_packages(e, advisory):
|
|
|
150
151
|
def add_alma_erratum_modules(e, advisory):
|
|
151
152
|
""" Parse and add modules for Alma Linux errata
|
|
152
153
|
"""
|
|
153
|
-
from modules.utils import get_matching_modules
|
|
154
154
|
fixed_packages = set()
|
|
155
155
|
modules = advisory.get('modules')
|
|
156
156
|
for module in modules:
|
|
@@ -160,8 +160,7 @@ def add_alma_erratum_modules(e, advisory):
|
|
|
160
160
|
stream = module.get('stream')
|
|
161
161
|
version = module.get('version')
|
|
162
162
|
matching_modules = get_matching_modules(name, stream, version, context, arch)
|
|
163
|
-
for match in matching_modules:
|
|
163
|
+
for match in matching_modules.prefetch_related('packages'):
|
|
164
164
|
for fixed_package in match.packages.all():
|
|
165
|
-
match.packages.add(fixed_package)
|
|
166
165
|
fixed_packages.add(fixed_package)
|
|
167
166
|
e.add_fixed_packages(fixed_packages)
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
import concurrent.futures
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from
|
|
21
|
-
|
|
20
|
+
from errata.utils import get_or_create_erratum
|
|
22
21
|
from operatingsystems.utils import get_or_create_osrelease
|
|
23
22
|
from packages.models import Package
|
|
24
23
|
from packages.utils import (
|
|
@@ -26,16 +25,17 @@ from packages.utils import (
|
|
|
26
25
|
)
|
|
27
26
|
from patchman.signals import pbar_start, pbar_update
|
|
28
27
|
from util import fetch_content, get_url
|
|
29
|
-
from util.logging import error_message
|
|
28
|
+
from util.logging import clear_forked_pbar, error_message
|
|
30
29
|
|
|
31
30
|
|
|
32
|
-
def update_arch_errata(concurrent_processing=False):
|
|
31
|
+
def update_arch_errata(concurrent_processing=False, max_workers=25):
|
|
33
32
|
""" Update Arch Linux Errata from the following sources:
|
|
34
33
|
https://security.archlinux.org/advisories.json
|
|
35
34
|
"""
|
|
36
35
|
add_arch_linux_osrelease()
|
|
37
36
|
advisories = fetch_arch_errata()
|
|
38
|
-
|
|
37
|
+
if advisories:
|
|
38
|
+
parse_arch_errata(advisories, concurrent_processing, max_workers)
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
def fetch_arch_errata():
|
|
@@ -44,14 +44,16 @@ def fetch_arch_errata():
|
|
|
44
44
|
"""
|
|
45
45
|
res = get_url('https://security.archlinux.org/advisories.json')
|
|
46
46
|
advisories = fetch_content(res, 'Fetching Arch Advisories')
|
|
47
|
+
if advisories is None:
|
|
48
|
+
return None
|
|
47
49
|
return json.loads(advisories)
|
|
48
50
|
|
|
49
51
|
|
|
50
|
-
def parse_arch_errata(advisories, concurrent_processing):
|
|
52
|
+
def parse_arch_errata(advisories, concurrent_processing, max_workers=25):
|
|
51
53
|
""" Parse Arch Linux Errata Advisories
|
|
52
54
|
"""
|
|
53
55
|
if concurrent_processing:
|
|
54
|
-
parse_arch_errata_concurrently(advisories)
|
|
56
|
+
parse_arch_errata_concurrently(advisories, max_workers)
|
|
55
57
|
else:
|
|
56
58
|
parse_arch_errata_serially(advisories)
|
|
57
59
|
|
|
@@ -67,15 +69,14 @@ def parse_arch_errata_serially(advisories):
|
|
|
67
69
|
pbar_update.send(sender=None, index=i + 1)
|
|
68
70
|
|
|
69
71
|
|
|
70
|
-
def parse_arch_errata_concurrently(advisories):
|
|
72
|
+
def parse_arch_errata_concurrently(advisories, max_workers=25):
|
|
71
73
|
""" Parse Arch Linux Errata Advisories concurrently
|
|
72
74
|
"""
|
|
73
75
|
osrelease = get_or_create_osrelease(name='Arch Linux')
|
|
74
|
-
connections.close_all()
|
|
75
76
|
elen = len(advisories)
|
|
76
77
|
pbar_start.send(sender=None, ptext=f'Processing {elen} Arch Advisories', plen=elen)
|
|
77
78
|
i = 0
|
|
78
|
-
with concurrent.futures.
|
|
79
|
+
with concurrent.futures.ThreadPoolExecutor(max_workers=max_workers) as executor:
|
|
79
80
|
futures = [executor.submit(process_arch_erratum, advisory, osrelease) for advisory in advisories]
|
|
80
81
|
for future in concurrent.futures.as_completed(futures):
|
|
81
82
|
i += 1
|
|
@@ -85,7 +86,7 @@ def parse_arch_errata_concurrently(advisories):
|
|
|
85
86
|
def process_arch_erratum(advisory, osrelease):
|
|
86
87
|
""" Process a single Arch Linux Erratum
|
|
87
88
|
"""
|
|
88
|
-
|
|
89
|
+
clear_forked_pbar()
|
|
89
90
|
try:
|
|
90
91
|
name = advisory.get('name')
|
|
91
92
|
issue_date = advisory.get('date')
|
|
@@ -121,6 +122,8 @@ def add_arch_erratum_references(e, advisory):
|
|
|
121
122
|
e.add_reference('ASA', url)
|
|
122
123
|
raw_url = f'{url}/raw'
|
|
123
124
|
res = get_url(raw_url)
|
|
125
|
+
if res is None:
|
|
126
|
+
return
|
|
124
127
|
data = res.content
|
|
125
128
|
parse_arch_erratum_raw(e, data.decode())
|
|
126
129
|
|
|
@@ -152,6 +155,8 @@ def add_arch_erratum_packages(e, advisory):
|
|
|
152
155
|
group_id = advisory.get('group')
|
|
153
156
|
group_url = f'https://security.archlinux.org/group/{group_id}.json'
|
|
154
157
|
res = get_url(group_url)
|
|
158
|
+
if res is None:
|
|
159
|
+
return
|
|
155
160
|
data = res.content
|
|
156
161
|
group = json.loads(data)
|
|
157
162
|
packages = group.get('packages')
|
|
@@ -14,27 +14,29 @@
|
|
|
14
14
|
# You should have received a copy of the GNU General Public License
|
|
15
15
|
# along with Patchman. If not, see <http://www.gnu.org/licenses/>
|
|
16
16
|
|
|
17
|
-
import concurrent.futures
|
|
18
17
|
import csv
|
|
19
18
|
import re
|
|
20
19
|
from datetime import datetime
|
|
21
20
|
from io import StringIO
|
|
22
21
|
|
|
23
22
|
from debian.deb822 import Dsc
|
|
24
|
-
from django.db import connections
|
|
25
23
|
|
|
24
|
+
from errata.utils import get_or_create_erratum
|
|
26
25
|
from operatingsystems.models import OSRelease
|
|
27
26
|
from operatingsystems.utils import get_or_create_osrelease
|
|
28
27
|
from packages.models import Package
|
|
29
28
|
from packages.utils import find_evr, get_or_create_package
|
|
30
29
|
from patchman.signals import pbar_start, pbar_update
|
|
31
|
-
from util import
|
|
32
|
-
|
|
30
|
+
from util import (
|
|
31
|
+
extract, fetch_concurrently, fetch_content, get_setting_of_type, get_url,
|
|
32
|
+
run_concurrently,
|
|
33
|
+
)
|
|
34
|
+
from util.logging import clear_forked_pbar, error_message, warning_message
|
|
33
35
|
|
|
34
36
|
DSCs = {}
|
|
35
37
|
|
|
36
38
|
|
|
37
|
-
def update_debian_errata(concurrent_processing=True):
|
|
39
|
+
def update_debian_errata(concurrent_processing=True, max_workers=25):
|
|
38
40
|
""" Update Debian errata using:
|
|
39
41
|
https://salsa.debian.org/security-tracker-team/security-tracker/raw/master/data/DSA/list
|
|
40
42
|
https://salsa.debian.org/security-tracker-team/security-tracker/raw/master/data/DSA/list
|
|
@@ -46,8 +48,8 @@ def update_debian_errata(concurrent_processing=True):
|
|
|
46
48
|
advisories = dsas + dlas
|
|
47
49
|
fetch_dscs_from_debian_package_file_maps()
|
|
48
50
|
accepted_codenames = get_accepted_debian_codenames()
|
|
49
|
-
errata = parse_debian_errata(advisories, accepted_codenames)
|
|
50
|
-
create_debian_errata(errata, accepted_codenames, concurrent_processing)
|
|
51
|
+
errata = parse_debian_errata(advisories, accepted_codenames, concurrent_processing, max_workers)
|
|
52
|
+
create_debian_errata(errata, accepted_codenames, concurrent_processing, max_workers)
|
|
51
53
|
|
|
52
54
|
|
|
53
55
|
def fetch_debian_dsa_advisories():
|
|
@@ -108,12 +110,14 @@ def parse_debian_package_file_map(data, repo):
|
|
|
108
110
|
parsing_dsc = False
|
|
109
111
|
|
|
110
112
|
|
|
111
|
-
def parse_debian_errata(advisories, accepted_codenames):
|
|
113
|
+
def parse_debian_errata(advisories, accepted_codenames, concurrent_processing=True, max_workers=25):
|
|
112
114
|
""" Parse Debian DSA/DLA files for security advisories
|
|
113
115
|
"""
|
|
114
116
|
distro_pattern = re.compile(r'^\t\[(.+?)\] - .*')
|
|
115
117
|
title_pattern = re.compile(r'^\[(.+?)\] (.+?) (.+?)[ ]+[-]+ (.*)')
|
|
118
|
+
distro_package_pattern = re.compile(r'^\t\[(.+?)\] - (.+?) (.*)')
|
|
116
119
|
errata = []
|
|
120
|
+
dsc_fetches = []
|
|
117
121
|
e = {'packages': {}, 'cve_ids': [], 'releases': []}
|
|
118
122
|
for line in advisories.splitlines():
|
|
119
123
|
if line.startswith('['):
|
|
@@ -132,9 +136,17 @@ def parse_debian_errata(advisories, accepted_codenames):
|
|
|
132
136
|
e['releases'].append(release)
|
|
133
137
|
if not e.get('packages').get(release):
|
|
134
138
|
e['packages'][release] = []
|
|
135
|
-
|
|
139
|
+
pkg_match = re.match(distro_package_pattern, line)
|
|
140
|
+
if pkg_match and pkg_match.group(1) in accepted_codenames:
|
|
141
|
+
source_package = pkg_match.group(2)
|
|
142
|
+
source_version = pkg_match.group(3)
|
|
143
|
+
dsc_fetches.append((source_package, source_version))
|
|
144
|
+
e['packages'][release].append((source_package, source_version))
|
|
145
|
+
else:
|
|
146
|
+
e['packages'][release].append(None)
|
|
136
147
|
# add the last one
|
|
137
148
|
errata = add_errata_by_codename(errata, e, accepted_codenames)
|
|
149
|
+
fetch_debian_dsc_package_lists(dsc_fetches, concurrent_processing, max_workers)
|
|
138
150
|
return errata
|
|
139
151
|
|
|
140
152
|
|
|
@@ -162,11 +174,11 @@ def parse_debian_erratum_advisory(e, match):
|
|
|
162
174
|
return e
|
|
163
175
|
|
|
164
176
|
|
|
165
|
-
def create_debian_errata(errata, accepted_codenames, concurrent_processing):
|
|
177
|
+
def create_debian_errata(errata, accepted_codenames, concurrent_processing, max_workers=25):
|
|
166
178
|
""" Create Debian Errata
|
|
167
179
|
"""
|
|
168
180
|
if concurrent_processing:
|
|
169
|
-
create_debian_errata_concurrently(errata, accepted_codenames)
|
|
181
|
+
create_debian_errata_concurrently(errata, accepted_codenames, max_workers)
|
|
170
182
|
else:
|
|
171
183
|
create_debian_errata_serially(errata, accepted_codenames)
|
|
172
184
|
|
|
@@ -181,25 +193,25 @@ def create_debian_errata_serially(errata, accepted_codenames):
|
|
|
181
193
|
pbar_update.send(sender=None, index=i + 1)
|
|
182
194
|
|
|
183
195
|
|
|
184
|
-
def create_debian_errata_concurrently(errata, accepted_codenames):
|
|
196
|
+
def create_debian_errata_concurrently(errata, accepted_codenames, max_workers=25):
|
|
185
197
|
""" Create Debian Errata concurrently
|
|
186
198
|
"""
|
|
187
|
-
connections.close_all()
|
|
188
199
|
elen = len(errata)
|
|
189
200
|
pbar_start.send(sender=None, ptext=f'Processing {elen} Debian Errata', plen=elen)
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
201
|
+
args = [(erratum, accepted_codenames) for erratum in errata]
|
|
202
|
+
for i, _ in enumerate(run_concurrently(process_debian_erratum_wrapper, args, max_workers)):
|
|
203
|
+
pbar_update.send(sender=None, index=i + 1)
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
def process_debian_erratum_wrapper(args):
|
|
207
|
+
clear_forked_pbar()
|
|
208
|
+
return process_debian_erratum(*args)
|
|
196
209
|
|
|
197
210
|
|
|
198
211
|
def process_debian_erratum(erratum, accepted_codenames):
|
|
199
212
|
""" Process a single Debian Erratum
|
|
200
213
|
"""
|
|
201
214
|
try:
|
|
202
|
-
from errata.utils import get_or_create_erratum
|
|
203
215
|
erratum_name = erratum.get('name')
|
|
204
216
|
e, created = get_or_create_erratum(
|
|
205
217
|
name=erratum_name,
|
|
@@ -221,19 +233,23 @@ def process_debian_erratum(erratum, accepted_codenames):
|
|
|
221
233
|
error_message(text=exc)
|
|
222
234
|
|
|
223
235
|
|
|
224
|
-
def
|
|
225
|
-
"""
|
|
226
|
-
Returns the source package and source version
|
|
236
|
+
def fetch_debian_dsc_package_lists(dsc_fetches, concurrent_processing=True, max_workers=25):
|
|
237
|
+
""" Fetch DSC package lists with a progress bar
|
|
227
238
|
"""
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
if
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
fetch_debian_dsc_package_list(
|
|
236
|
-
|
|
239
|
+
flen = len(dsc_fetches)
|
|
240
|
+
pbar_start.send(sender=None, ptext=f'Fetching {flen} Debian DSC files', plen=flen)
|
|
241
|
+
if concurrent_processing:
|
|
242
|
+
for i, _ in enumerate(fetch_concurrently(fetch_dsc_worker, dsc_fetches, max_workers)):
|
|
243
|
+
pbar_update.send(sender=None, index=i + 1)
|
|
244
|
+
else:
|
|
245
|
+
for i, (package, version) in enumerate(dsc_fetches):
|
|
246
|
+
fetch_debian_dsc_package_list(package, version)
|
|
247
|
+
pbar_update.send(sender=None, index=i + 1)
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
def fetch_dsc_worker(item, session):
|
|
251
|
+
package, version = item
|
|
252
|
+
fetch_debian_dsc_package_list(package, version, session=session)
|
|
237
253
|
|
|
238
254
|
|
|
239
255
|
def get_debian_dsc_package_list(package, version):
|
|
@@ -246,14 +262,14 @@ def get_debian_dsc_package_list(package, version):
|
|
|
246
262
|
return package_list
|
|
247
263
|
|
|
248
264
|
|
|
249
|
-
def fetch_debian_dsc_package_list(package, version):
|
|
265
|
+
def fetch_debian_dsc_package_list(package, version, session=None):
|
|
250
266
|
""" Fetch the package list from a DSC file for a given source package/version
|
|
251
267
|
"""
|
|
252
268
|
if not DSCs.get(package) or not DSCs[package].get(version):
|
|
253
269
|
warning_message(text=f'No DSC found for {package} {version}')
|
|
254
270
|
return
|
|
255
271
|
source_url = DSCs[package][version]['url']
|
|
256
|
-
res = get_url(source_url)
|
|
272
|
+
res = get_url(source_url, session=session)
|
|
257
273
|
data = res.content
|
|
258
274
|
dsc = Dsc(data.decode())
|
|
259
275
|
package_list = dsc.get('package-list')
|
|
@@ -301,6 +317,8 @@ def create_debian_os_releases(codename_to_version):
|
|
|
301
317
|
def process_debian_erratum_fixed_packages(e, package_data):
|
|
302
318
|
""" Process packages fixed in a Debian errata
|
|
303
319
|
"""
|
|
320
|
+
if not package_data:
|
|
321
|
+
return
|
|
304
322
|
source_package, source_version = package_data
|
|
305
323
|
epoch, ver, rel = find_evr(source_version)
|
|
306
324
|
package_list = get_debian_dsc_package_list(source_package, source_version)
|