mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
* feat: python requirements.txt parsing inclusive Signed-off-by: manifestori <ori@manifestcyber.com> * refactor: parseVersion Signed-off-by: manifestori <ori@manifestcyber.com> * add python config for optional requirements version constraint resolution Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * fix tests Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * allow for python requirements metadata to be optional Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * restore cyclonedx dependency Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: manifestori <ori@manifestcyber.com> Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> Signed-off-by: Alex Goodman <alex.goodman@anchore.com> Co-authored-by: manifestori <ori@manifestcyber.com>
14 lines
340 B
Go
14 lines
340 B
Go
package config
|
|
|
|
import (
|
|
"github.com/spf13/viper"
|
|
)
|
|
|
|
type python struct {
|
|
GuessUnpinnedRequirements bool `json:"guess-unpinned-requirements" yaml:"guess-unpinned-requirements" mapstructure:"guess-unpinned-requirements"`
|
|
}
|
|
|
|
func (cfg python) loadDefaultValues(v *viper.Viper) {
|
|
v.SetDefault("python.guess-unpinned-requirements", false)
|
|
}
|