mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
Read Description from dpkg status files (#996)
This commit is contained in:
parent
fb699496a8
commit
5e2ab0874d
@ -43,6 +43,10 @@ func TestDpkgCataloger(t *testing.T) {
|
|||||||
Architecture: "all",
|
Architecture: "all",
|
||||||
Maintainer: "Steve Langasek <vorlon@debian.org>",
|
Maintainer: "Steve Langasek <vorlon@debian.org>",
|
||||||
InstalledSize: 1016,
|
InstalledSize: 1016,
|
||||||
|
Description: `Runtime support for the PAM library
|
||||||
|
Contains configuration files and directories required for
|
||||||
|
authentication to work on Debian systems. This package is required
|
||||||
|
on almost all installations.`,
|
||||||
Files: []pkg.DpkgFileRecord{
|
Files: []pkg.DpkgFileRecord{
|
||||||
{
|
{
|
||||||
Path: "/etc/pam.conf",
|
Path: "/etc/pam.conf",
|
||||||
|
|||||||
@ -39,6 +39,20 @@ func TestSinglePackage(t *testing.T) {
|
|||||||
Architecture: "amd64",
|
Architecture: "amd64",
|
||||||
InstalledSize: 4064,
|
InstalledSize: 4064,
|
||||||
Maintainer: "APT Development Team <deity@lists.debian.org>",
|
Maintainer: "APT Development Team <deity@lists.debian.org>",
|
||||||
|
Description: `commandline package manager
|
||||||
|
This package provides commandline tools for searching and
|
||||||
|
managing as well as querying information about packages
|
||||||
|
as a low-level access to all features of the libapt-pkg library.
|
||||||
|
.
|
||||||
|
These include:
|
||||||
|
* apt-get for retrieval of packages and information about them
|
||||||
|
from authenticated sources and for installation, upgrade and
|
||||||
|
removal of packages together with their dependencies
|
||||||
|
* apt-cache for querying available information about installed
|
||||||
|
as well as installable packages
|
||||||
|
* apt-cdrom to use removable media as a source for packages
|
||||||
|
* apt-config as an interface to the configuration settings
|
||||||
|
* apt-key as an interface to manage authentication keys`,
|
||||||
Files: []pkg.DpkgFileRecord{
|
Files: []pkg.DpkgFileRecord{
|
||||||
{
|
{
|
||||||
Path: "/etc/apt/apt.conf.d/01autoremove",
|
Path: "/etc/apt/apt.conf.d/01autoremove",
|
||||||
@ -85,6 +99,20 @@ func TestSinglePackage(t *testing.T) {
|
|||||||
Architecture: "amd64",
|
Architecture: "amd64",
|
||||||
InstalledSize: 4000,
|
InstalledSize: 4000,
|
||||||
Maintainer: "APT Development Team <deity@lists.debian.org>",
|
Maintainer: "APT Development Team <deity@lists.debian.org>",
|
||||||
|
Description: `commandline package manager
|
||||||
|
This package provides commandline tools for searching and
|
||||||
|
managing as well as querying information about packages
|
||||||
|
as a low-level access to all features of the libapt-pkg library.
|
||||||
|
.
|
||||||
|
These include:
|
||||||
|
* apt-get for retrieval of packages and information about them
|
||||||
|
from authenticated sources and for installation, upgrade and
|
||||||
|
removal of packages together with their dependencies
|
||||||
|
* apt-cache for querying available information about installed
|
||||||
|
as well as installable packages
|
||||||
|
* apt-cdrom to use removable media as a source for packages
|
||||||
|
* apt-config as an interface to the configuration settings
|
||||||
|
* apt-key as an interface to manage authentication keys`,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
|
|
||||||
@ -132,6 +160,12 @@ func TestMultiplePackages(t *testing.T) {
|
|||||||
Architecture: "all",
|
Architecture: "all",
|
||||||
InstalledSize: 3036,
|
InstalledSize: 3036,
|
||||||
Maintainer: "GNU Libc Maintainers <debian-glibc@lists.debian.org>",
|
Maintainer: "GNU Libc Maintainers <debian-glibc@lists.debian.org>",
|
||||||
|
Description: `time zone and daylight-saving time data
|
||||||
|
This package contains data required for the implementation of
|
||||||
|
standard local time for many representative locations around the
|
||||||
|
globe. It is updated periodically to reflect changes made by
|
||||||
|
political bodies to time zone boundaries, UTC offsets, and
|
||||||
|
daylight-saving rules.`,
|
||||||
Files: []pkg.DpkgFileRecord{},
|
Files: []pkg.DpkgFileRecord{},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -140,6 +174,12 @@ func TestMultiplePackages(t *testing.T) {
|
|||||||
Architecture: "amd64",
|
Architecture: "amd64",
|
||||||
InstalledSize: 4327,
|
InstalledSize: 4327,
|
||||||
Maintainer: "LaMont Jones <lamont@debian.org>",
|
Maintainer: "LaMont Jones <lamont@debian.org>",
|
||||||
|
Description: `miscellaneous system utilities
|
||||||
|
This package contains a number of important utilities, most of which
|
||||||
|
are oriented towards maintenance of your system. Some of the more
|
||||||
|
important utilities included in this package allow you to view kernel
|
||||||
|
messages, create new filesystems, view block device information,
|
||||||
|
interface with real time clock, etc.`,
|
||||||
Files: []pkg.DpkgFileRecord{
|
Files: []pkg.DpkgFileRecord{
|
||||||
{
|
{
|
||||||
Path: "/etc/default/hwclock",
|
Path: "/etc/default/hwclock",
|
||||||
|
|||||||
@ -28,6 +28,7 @@ type DpkgMetadata struct {
|
|||||||
Architecture string `mapstructure:"Architecture" json:"architecture"`
|
Architecture string `mapstructure:"Architecture" json:"architecture"`
|
||||||
Maintainer string `mapstructure:"Maintainer" json:"maintainer"`
|
Maintainer string `mapstructure:"Maintainer" json:"maintainer"`
|
||||||
InstalledSize int `mapstructure:"InstalledSize" json:"installedSize" cyclonedx:"installedSize"`
|
InstalledSize int `mapstructure:"InstalledSize" json:"installedSize" cyclonedx:"installedSize"`
|
||||||
|
Description string `mapstructure:"Description" hash:"ignore" json:"-"`
|
||||||
Files []DpkgFileRecord `json:"files"`
|
Files []DpkgFileRecord `json:"files"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user