mirror of
https://github.com/ossf/scorecard.git
synced 2024-09-19 13:07:17 +03:00
ignore scratch frm dockerfile imports
This commit is contained in:
parent
9453765aa0
commit
78933ac2f4
@ -90,6 +90,9 @@ func validateDockerfile(path string, content []byte,
|
||||
}
|
||||
|
||||
switch {
|
||||
// scratch is no-op.
|
||||
case len(valueList) > 0 && strings.EqualFold(valueList[0], "scratch"):
|
||||
continue
|
||||
// FROM name AS newname.
|
||||
case len(valueList) == 3 && strings.EqualFold(valueList[1], "as"):
|
||||
name := valueList[0]
|
||||
|
1
checks/testdata/Dockerfile-pinned
vendored
1
checks/testdata/Dockerfile-pinned
vendored
@ -24,4 +24,5 @@ RUN apt-get update;\
|
||||
apt-get install -y vim;\
|
||||
true
|
||||
|
||||
FROM scratch
|
||||
FROM python@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2
|
2
checks/testdata/Dockerfile-pinned-as
vendored
2
checks/testdata/Dockerfile-pinned-as
vendored
@ -23,4 +23,6 @@ RUN CGO_ENABLED=0 make build-scorecard
|
||||
from build as build2
|
||||
RUN /hello-world
|
||||
|
||||
FROM scratch as build3
|
||||
|
||||
FROM python@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2 as build3
|
||||
|
Loading…
Reference in New Issue
Block a user