mirror of
https://github.com/anchore/syft.git
synced 2026-02-12 18:46:41 +01:00
* add nix DB cataloger Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * add derivation path to nix store pkg metadata Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * go mod tidy Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * allow for derivation path to be optional Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * repin build image and disable syscall filtering Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * bump storage capacity Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * track nix derivation details on packages Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * image fixture should have derivation examples Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * address comments Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
26 lines
612 B
Go
26 lines
612 B
Go
package options
|
|
|
|
import (
|
|
"github.com/anchore/clio"
|
|
"github.com/anchore/syft/syft/pkg/cataloger/nix"
|
|
)
|
|
|
|
type nixConfig struct {
|
|
CaptureOwnedFiles bool `json:"capture-owned-files" yaml:"capture-owned-files" mapstructure:"capture-owned-files"`
|
|
}
|
|
|
|
func defaultNixConfig() nixConfig {
|
|
def := nix.DefaultConfig()
|
|
return nixConfig{
|
|
def.CaptureOwnedFiles,
|
|
}
|
|
}
|
|
|
|
var _ interface {
|
|
clio.FieldDescriber
|
|
} = (*nixConfig)(nil)
|
|
|
|
func (o *nixConfig) DescribeFields(descriptions clio.FieldDescriptionSet) {
|
|
descriptions.Add(&o.CaptureOwnedFiles, `enumerate all files owned by packages found within Nix store paths`)
|
|
}
|