From: Thomas Perale via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: Thomas Perale <thomas.perale@mind.be>,
Ricardo Martincoski <ricardo.martincoski@datacom.com.br>
Subject: [Buildroot] [RFC PATCH 03/14] package/pkg-utils: show-info expose vuln details
Date: Wed, 24 Jun 2026 16:06:34 +0200 [thread overview]
Message-ID: <20260624140645.185318-4-thomas.perale@mind.be> (raw)
In-Reply-To: <20260624140645.185318-1-thomas.perale@mind.be>
For each `_IGNORE_CVES` entries the status and details are exported if
present.
- `<pkg>_<vuln-id>_STATUS`
- `<pkg>_<vuln-id>_DETAIL`
For a hypotetical 'CVE-2025-1234' that affects the package 'foo' with
the following declaration:
```
FOO_CVE-2025-1234_STATUS = fixed
FOO_CVE-2025-1234_DETAIL = some details
```
Will result in the following show info output.
```json
{
"foo": {
...
"cves_status": {
"CVE-2025-1234": {
"status": "fixed",
"detail": "some details"
}
}
}
}
```
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
---
package/pkg-utils.mk | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index 17b0aa1760..c6e509e9d1 100644
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -154,6 +154,25 @@ define _json-info-pkg
) \
)
]
+ $(comma) "cves_status": {
+ $(foreach cve,$(sort $($(1)_IGNORE_CVES)), \
+ $(call _json-info-pkg-cve,$(1),$(cve)) \
+ ) \
+ }
+ )
+endef
+
+# json-info-pkg-cve -- Create a JSON Object entry of a vulnerability id if the
+# STATUS & DETAIL variable for that given package name & vulnerability
+# id combination exists.
+# $(1): upper-case package name
+# $(2): vulnerability id
+define _json-info-pkg-cve
+ $(if $($(1)_$(2)_STATUS),
+ $(call mk-json-str,$(2)): {
+ "status": $(call mk-json-str,$($(1)_$(2)_STATUS))$(comma)
+ "detail": $(call mk-json-str,$($(1)_$(2)_DETAIL))
+ }$(comma)
)
endef
--
2.54.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2026-06-24 14:07 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-24 14:06 [Buildroot] [RFC PATCH 00/14] Add exportable vulnerability informations Thomas Perale via buildroot
2026-06-24 14:06 ` [Buildroot] [RFC PATCH 01/14] docs/manual: add vulnerability status and justification Thomas Perale via buildroot
2026-06-24 14:06 ` [Buildroot] [RFC PATCH 02/14] utils/checkpackagelib/lib_mk.py: check _STATUS value is supported Thomas Perale via buildroot
2026-06-24 14:06 ` Thomas Perale via buildroot [this message]
2026-06-24 14:06 ` [Buildroot] [RFC PATCH 04/14] utils/generate-cyclonedx: support vulnerability details Thomas Perale via buildroot
2026-06-25 18:01 ` Fiona Klute via buildroot
2026-06-24 14:06 ` [Buildroot] [RFC PATCH 05/14] package/sox: add vulnerabilities details Thomas Perale via buildroot
2026-06-24 14:06 ` [Buildroot] [RFC PATCH 06/14] package/php: add vulnerability details Thomas Perale via buildroot
2026-06-24 14:06 ` [Buildroot] [RFC PATCH 07/14] package/mupdf: add vulnerabilities details Thomas Perale via buildroot
2026-06-24 14:06 ` [Buildroot] [RFC PATCH 08/14] package/python-pip: add detail to vulnerability Thomas Perale via buildroot
2026-06-25 17:57 ` Fiona Klute via buildroot
2026-06-26 7:25 ` Thomas Perale via buildroot
2026-06-24 14:06 ` [Buildroot] [RFC PATCH 09/14] package/luajit: add details to vulnerabilities Thomas Perale via buildroot
2026-06-24 14:06 ` [Buildroot] [RFC PATCH 10/14] package/libuci: add vulnerability details Thomas Perale via buildroot
2026-06-24 14:06 ` [Buildroot] [RFC PATCH 11/14] package/glibc: " Thomas Perale via buildroot
2026-06-24 14:45 ` Romain Naour via buildroot
2026-06-24 15:06 ` Thomas Perale via buildroot
2026-06-24 14:06 ` [Buildroot] [RFC PATCH 12/14] package/freeradius-server: add vulnerabilities details Thomas Perale via buildroot
2026-06-24 14:06 ` [Buildroot] [RFC PATCH 13/14] package/flex: add vulnerability details Thomas Perale via buildroot
2026-06-24 14:06 ` [Buildroot] [RFC PATCH 14/14] package/clamav: " Thomas Perale via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260624140645.185318-4-thomas.perale@mind.be \
--to=buildroot@buildroot.org \
--cc=ricardo.martincoski@datacom.com.br \
--cc=thomas.perale@mind.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox