Skip to content

Commit a0047a7

Browse files
authored
feat(alpine): warn mixing versions (#2000)
1 parent d786655 commit a0047a7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/detector/ospkg/alpine/alpine.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ func (s *Scanner) Detect(osVer string, repo *ftypes.Repository, pkgs []ftypes.Pa
9595
if repoRelease != "" && osVer != repoRelease {
9696
// Prefer the repository release. Use OS version only when the repository is not detected.
9797
stream = repoRelease
98-
log.Logger.Infof("Use the repository release '%s' for vulnerability detection, instead of OS version '%s'", repoRelease, osVer)
98+
if repoRelease != "edge" { // TODO: we should detect the current edge version.
99+
log.Logger.Warnf("Mixing Alpine versions is unsupported, OS: '%s', repository: '%s'", osVer, repoRelease)
100+
}
99101
}
100102

101103
var vulns []types.DetectedVulnerability
@@ -171,7 +173,7 @@ func (s *Scanner) IsSupportedVersion(osFamily, osVer string) bool {
171173

172174
eol, ok := eolDates[osVer]
173175
if !ok {
174-
log.Logger.Warnf("This OS version is not on the EOL list: %s %s", osFamily, osVer)
176+
log.Logger.Infof("This OS version is not on the EOL list: %s %s", osFamily, osVer)
175177
return true // may be the latest version
176178
}
177179

0 commit comments

Comments
 (0)