-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add check for needrestart CVEs (#993)
Verifies if needrestart and libmodule-scandeps-perl packages are affected by multiple CVEs. The Focal and older release fixes are available for ESM customers.
- Loading branch information
1 parent
d03eeb0
commit c6ebd96
Showing
6 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
hotsos/defs/scenarios/system/cve-libmodule-scandeps-perl.yaml
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,35 @@ | ||
checks: | ||
has_scandeps_cve: | ||
apt: | ||
libmodule-scandeps-perl: | ||
# Oracular | ||
- min: '1.35-1' | ||
- max: '1.35-1' | ||
# Noble | ||
- min: '1.35-1' | ||
- max: '1.35-1' | ||
# Jammy | ||
- min: '1.31-1' | ||
- max: '1.31-1' | ||
# Focal | ||
- min: '1.27-1' | ||
- max: '1.27-1' | ||
# Bionic | ||
- min: '1.24-1' | ||
- max: '1.24-1' | ||
# Xenial | ||
- min: '1.20-1' | ||
- max: '1.20-1' | ||
conclusions: | ||
scandeps_cve: | ||
decision: has_scandeps_cve | ||
raises: | ||
type: MitreCVE | ||
cve-id: CVE-2024-10224 | ||
message: >- | ||
Installed package '{package}' with version {version} has a known | ||
security vulnerability (CVE-2024-10224). Please upgrade to the | ||
latest version to get the fix. | ||
format-dict: | ||
package: '@checks.has_scandeps_cve.requires.package' | ||
version: '@checks.has_scandeps_cve.requires.version' |
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,35 @@ | ||
checks: | ||
has_needrestart_cve: | ||
apt: | ||
needrestart: | ||
# Oracular | ||
- min: '3.6-8' | ||
- max: '3.6-8ubuntu4' | ||
# Noble | ||
- min: '3.6-7' | ||
- max: '3.6-7ubuntu4.1' | ||
# Jammy | ||
- min: '3.5-5' | ||
- max: '3.5-5ubuntu2.1' | ||
# Focal | ||
- min: '3.4-6' | ||
- max: '3.4-6ubuntu0.1' | ||
# Bionic | ||
- min: '3.1-1' | ||
- max: '3.1-1ubuntu0.1' | ||
# Xenial | ||
- min: '2.6-1' | ||
- max: '2.6-1' | ||
conclusions: | ||
needrestart_cve: | ||
decision: has_needrestart_cve | ||
raises: | ||
type: MitreCVE | ||
cve-id: CVE-2024-48990 | ||
message: >- | ||
Installed package '{package}' with version {version} has a known | ||
security vulnerability (CVE-2024-48990). Please upgrade to the | ||
latest version to get the fix. | ||
format-dict: | ||
package: '@checks.has_needrestart_cve.requires.package' | ||
version: '@checks.has_needrestart_cve.requires.version' |
9 changes: 9 additions & 0 deletions
9
hotsos/defs/tests/scenarios/system/cve-libmodule-scandeps-perl-false.yaml
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,9 @@ | ||
target-name: cve-libmodule-scandeps-perl.yaml | ||
data-root: | ||
files: | ||
sos_commands/dpkg/dpkg_-l: | | ||
ii libmodule-scandeps-perl 1.31-1ubuntu0.1 all | ||
copy-from-original: | ||
- sos_commands/date/date | ||
- uptime | ||
raised-bugs: # none expected |
12 changes: 12 additions & 0 deletions
12
hotsos/defs/tests/scenarios/system/cve-libmodule-scandeps-perl.yaml
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,12 @@ | ||
data-root: | ||
files: | ||
sos_commands/dpkg/dpkg_-l: | | ||
ii libmodule-scandeps-perl 1.31-1 all | ||
copy-from-original: | ||
- sos_commands/date/date | ||
- uptime | ||
raised-bugs: | ||
https://www.cve.org/CVERecord?id=CVE-2024-10224: >- | ||
Installed package 'libmodule-scandeps-perl' with version 1.31-1 has a known | ||
security vulnerability (CVE-2024-10224). Please upgrade to the | ||
latest version to get the fix. |
9 changes: 9 additions & 0 deletions
9
hotsos/defs/tests/scenarios/system/cve-needrestart-false.yaml
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,9 @@ | ||
target-name: cve-needrestart.yaml | ||
data-root: | ||
files: | ||
sos_commands/dpkg/dpkg_-l: | | ||
ii needrestart 3.5-5ubuntu2.2 all | ||
copy-from-original: | ||
- sos_commands/date/date | ||
- uptime | ||
raised-bugs: # none expected |
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,12 @@ | ||
data-root: | ||
files: | ||
sos_commands/dpkg/dpkg_-l: | | ||
ii needrestart 3.5-5ubuntu2.1 all | ||
copy-from-original: | ||
- sos_commands/date/date | ||
- uptime | ||
raised-bugs: | ||
https://www.cve.org/CVERecord?id=CVE-2024-48990: >- | ||
Installed package 'needrestart' with version 3.5-5ubuntu2.1 has a known | ||
security vulnerability (CVE-2024-48990). Please upgrade to the | ||
latest version to get the fix. |