Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

+ Docker image integrity verifier #4392

Merged
merged 8 commits into from
Jun 27, 2019
Merged

Conversation

shadeofblue
Copy link
Contributor

@shadeofblue shadeofblue commented Jun 27, 2019

@shadeofblue shadeofblue requested a review from maaktweluit June 27, 2019 09:02
@shadeofblue shadeofblue self-assigned this Jun 27, 2019
@shadeofblue shadeofblue requested a review from Krigpl June 27, 2019 09:13
Copy link
Contributor

@maaktweluit maaktweluit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Nice check :)

@shadeofblue shadeofblue force-pushed the docker-integrity-script branch from a08ce2e to 894fae5 Compare June 27, 2019 09:34
@codecov
Copy link

codecov bot commented Jun 27, 2019

Codecov Report

Merging #4392 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #4392   +/-   ##
========================================
  Coverage    88.49%   88.49%           
========================================
  Files          225      225           
  Lines        19845    19845           
========================================
  Hits         17561    17561           
  Misses        2284     2284

@@ -0,0 +1,27 @@
# repository tag hash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file may easily get desynchronized with the real state of the world (i.e. publishing a new image without adding a new tag to this file). Also these sections seem unnecessary and repetitive.

What I would suggest is to put the hashes into the already existing images.ini file.

  • that solves the desynchronization issue since you'll be forced to update the hash at the time you update the tag
  • no repetitive sections, since each branch will automatically have its own versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Krigpl images.ini defines only the images needed for the current branch, here we have a chance to verify several

I thought about it -> we could add a check later to verify that no references are present in images.ini that are not reflected in image_integrity.ini but that seems secondary to the most basic requirement

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Krigpl addressed ...

Copy link
Contributor

@Krigpl Krigpl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just nitpicking

if cnt_failures:
print(
f'{COLORS.RED}{cnt_failures} out of {cnt_images} images '
f'had modified hashes!{COLORS.RESET}'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/had/have/?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugh... it's more complicated than that ;p

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Krigpl anyway, updated

scripts/docker_integrity/verify.py Show resolved Hide resolved
scripts/docker_integrity/verify.py Show resolved Hide resolved
Copy link
Contributor

@Krigpl Krigpl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mckayla

@shadeofblue shadeofblue merged commit 7422b96 into develop Jun 27, 2019
@shadeofblue shadeofblue deleted the docker-integrity-script branch June 27, 2019 14:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pull Docker images by SHA digest
3 participants