Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scanpipe/pipes/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,13 @@ def scan_image_for_system_packages(project, image):

def flag_whiteout_codebase_resources(project):
"""
Tag overlayfs/AUFS whiteout special files CodebaseResource as "ignored-whiteout".
Tag overlayfs/AUFS whiteout special files CodebaseResource as "white-out".
See https://github.com/opencontainers/image-spec/blob/master/layer.md#whiteouts
for details.
"""
whiteout_prefix = ".wh."
qs = project.codebaseresources.no_status()
qs.filter(name__startswith=whiteout_prefix).update(status=flag.IGNORED_WHITEOUT)
qs.filter(name__startswith=whiteout_prefix).update(status=flag.WHITE_OUT)


layer_fields = [
Expand Down
2 changes: 2 additions & 0 deletions scanpipe/pipes/flag.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@

RESOURCE_READ_ERROR = "resource-read-error"

WHITE_OUT = "white-out"

IGNORED_WHITEOUT = "ignored-whiteout"
IGNORED_EMPTY_FILE = "ignored-empty-file"
IGNORED_WHITESPACE_FILE = "ignored-whitespace-file"
Expand Down
2 changes: 1 addition & 1 deletion scanpipe/tests/pipes/test_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def test_pipes_docker_flag_whiteout_codebase_resources(self):
resource1.refresh_from_db()
resource2.refresh_from_db()
self.assertEqual("", resource1.status)
self.assertEqual("ignored-whiteout", resource2.status)
self.assertEqual("white-out", resource2.status)

def test_pipes_docker_extract_image_from_tarball_with_broken_symlinks(
self,
Expand Down