-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci(GitHub): RHINENG-15637 fix checksum for installed packages #2366
base: master
Are you sure you want to change the base?
ci(GitHub): RHINENG-15637 fix checksum for installed packages #2366
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2366 +/- ##
=======================================
Coverage 98.25% 98.25%
=======================================
Files 200 200
Lines 4461 4461
=======================================
Hits 4383 4383
Misses 78 78 ☔ View full report in Codecov by Sentry. |
a5c6ad8
to
4cd559d
Compare
797f2ed
to
99c95e5
Compare
.github/workflows/checkimage.yaml
Outdated
@@ -17,7 +17,7 @@ jobs: | |||
base=$(grep -Po '(?<=FROM )([^\s]*)(?= AS build)' Dockerfile) | |||
skopeo inspect "docker://$base" | jq .Digest --raw-output > .baseimagedigest | |||
docker run --rm -u 0 quay.io/cloudservices/compliance-backend:latest sh -c \ | |||
'microdnf update -y $(cat /opt/installedpackages) > /dev/null; rpm -q $(cat /opt/installedpackages) | sort | sha256sum | cut -d " " -f 1' \ | |||
'microdnf update -y $(rpm -qa | grep -v 'gpg-pubkey') > /dev/null; rpm -q $(rpm -qa | grep -v 'gpg-pubkey') | sort | sha256sum | cut -d " " -f 1' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better to update the /opt/installedpackages
file or use a parameter that would hold list of packages that are being installed outside of the base for this automation to track only those specific ones, not all?
99c95e5
to
ce81cae
Compare
e58b5bc
to
62f2d93
Compare
@@ -17,7 +17,7 @@ jobs: | |||
base=$(grep -Po '(?<=FROM )([^\s]*)(?= AS build)' Dockerfile) | |||
skopeo inspect "docker://$base" | jq .Digest --raw-output > .baseimagedigest | |||
docker run --rm -u 0 quay.io/cloudservices/compliance-backend:latest sh -c \ | |||
'microdnf update -y $(cat /opt/installedpackages) > /dev/null; rpm -q $(cat /opt/installedpackages) | sort | sha256sum | cut -d " " -f 1' \ | |||
'rpm -qa | grep -v "gpg-pubkey" > /opt/installedpackages; microdnf update -y $(cat /opt/installedpackages) > /dev/null; rpm -q $(cat /opt/installedpackages) | sort | sha256sum | cut -d " " -f 1' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please review these container build arguments that include packages that are being installed, that also might be used for tracking changes:
Lines 1 to 2 in e90e917
ARG deps="findutils hostname jq libpq openssl procps-ng ruby shared-mime-info tzdata" | |
ARG devDeps="gcc gcc-c++ gzip libffi-devel libyaml-devel make openssl-devel patch postgresql postgresql-devel redhat-rpm-config ruby-devel tar which util-linux xz" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @romanblanco
c565137
to
4ea00eb
Compare
Currently fails with: cat: /opt/installedpackages: No such file or directory
4ea00eb
to
ed93a7b
Compare
Secure Coding Practices Checklist GitHub Link
Secure Coding Checklist