mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
packages: Add 'package-patched-vulnerabilities'.
* guix/packages.scm (patch-file-name): New procedure.
(%vulnerability-regexp): New variable.
(package-patched-vulnerabilities): New procedure.
* guix/scripts/lint.scm (patch-file-name): Remove.
(check-vulnerabilities): Adjust to use
'package-patched-vulnerabilities'.
* tests/packages.scm ("package-patched-vulnerabilities"): New test.
This commit is contained in:
@@ -959,6 +959,21 @@
|
||||
((("x" dep))
|
||||
(eq? dep findutils)))))))))
|
||||
|
||||
(test-equal "package-patched-vulnerabilities"
|
||||
'(("CVE-2015-1234")
|
||||
("CVE-2016-1234" "CVE-2018-4567")
|
||||
())
|
||||
(let ((p1 (dummy-package "pi"
|
||||
(source (dummy-origin
|
||||
(patches (list "/a/b/pi-CVE-2015-1234.patch"))))))
|
||||
(p2 (dummy-package "pi"
|
||||
(source (dummy-origin
|
||||
(patches (list
|
||||
"/a/b/pi-CVE-2016-1234-CVE-2018-4567.patch"))))))
|
||||
(p3 (dummy-package "pi" (source (dummy-origin)))))
|
||||
(map package-patched-vulnerabilities
|
||||
(list p1 p2 p3))))
|
||||
|
||||
(test-eq "fold-packages" hello
|
||||
(fold-packages (lambda (p r)
|
||||
(if (string=? (package-name p) "hello")
|
||||
|
||||
Reference in New Issue
Block a user