mirror of
https://github.com/safedep/vet.git
synced 2025-12-11 01:01:10 -06:00
fix: LFP npm handle missing package
This commit is contained in:
parent
ffd73b1e7d
commit
79377e36fc
@ -96,10 +96,12 @@ func (npm *npmLockfilePoisoningAnalyzer) Analyze(manifest *models.PackageManifes
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We don't strictly need this because the package name is extracted from `package-lock.json`
|
||||||
|
// The impact here is, pkg can be nil in the event and may cause a bug for reporters if they
|
||||||
|
// don't handle nil package
|
||||||
pkg, ok := pkgMap[packageName]
|
pkg, ok := pkgMap[packageName]
|
||||||
if !ok {
|
if !ok {
|
||||||
logger.Warnf("npmLockfilePoisoningAnalyzer: Package [%s] not found in manifest", packageName)
|
logger.Debugf("npmLockfilePoisoningAnalyzer: Package [%s] not found in manifest", packageName)
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
|
|
||||||
trustedRegistryUrls := []string{npmRegistryTrustedUrlBase}
|
trustedRegistryUrls := []string{npmRegistryTrustedUrlBase}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user