Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLicenceCheck ¶
func NewNpmChecksManager ¶
func NewNpmChecksManager(trustedScopes []string, allowedPackages []*config.PackagesAllowList, httpClient *http.Client, projectMirror types.ProjectMirror) types.ChecksManager
NewNpmChecksManager returns an instance of NpmChecksManager.
func NewPublishAgeCheck ¶
Types ¶
type LegacyNpmLicense ¶
type LicenseCheck ¶
type LicenseCheck struct { }
LicenseCheck implements the types.Checks interface.
func (*LicenseCheck) Name ¶
func (lc *LicenseCheck) Name() string
Name implements the types.Checks interface.
func (*LicenseCheck) PerformCheck ¶
func (lc *LicenseCheck) PerformCheck(packageName, packageVersion string, npmPackage *types.NpmPackage) (bool, string, error)
PerformCheck implements the types.Checks interface. This check looks for 'restricted' licenses. In general we attempt to not be overly defensive here. If there is something we do not recognize then we error log it and move on. NPM license specs are here: https://docs.npmjs.com/cli/v8/configuring-npm/package-json#license
type NpmChecksManager ¶
type NpmChecksManager struct {
// contains filtered or unexported fields
}
NpmChecksManager implements types.ChecksManager.
func (*NpmChecksManager) PerformChecks ¶
func (ncm *NpmChecksManager) PerformChecks(packageRequestURL string) (bool, string, error)
PerformChecks implements the types.ChecksManager interface.
type PublishAgeCheck ¶
type PublishAgeCheck struct{}
PublishAgeCheck implements the types.Checks interface.
func (*PublishAgeCheck) Name ¶
func (lc *PublishAgeCheck) Name() string
Name implements the types.Checks interface.
func (*PublishAgeCheck) PerformCheck ¶
func (lc *PublishAgeCheck) PerformCheck(packageName, packageVersion string, npmPackage *types.NpmPackage) (bool, string, error)
PerformCheck implements the types.Checks interface.