-
Notifications
You must be signed in to change notification settings - Fork 19
Preserve ssh keys and resolv.conf #917
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -5,6 +5,8 @@ RUN mkdir -p /keylime-tests /etc/ima/ | |||||||||||||||||||
COPY 10-ima_kargs.toml /usr/lib/bootc/kargs.d/10-ima_kargs.toml | ||||||||||||||||||||
COPY ima-policy /etc/ima/ima-policy | ||||||||||||||||||||
COPY yum.repos.d/* /etc/yum.repos.d/ | ||||||||||||||||||||
COPY .ssh /var/roothome/.ssh | ||||||||||||||||||||
COPY resolv.conf /etc/resolv.conf | ||||||||||||||||||||
ARG KEYLIME_BOOTC_INSTALL_PACKAGES="rsync beakerlib selinux-policy-devel swtpm swtpm-tools nmap keylime expect" | ||||||||||||||||||||
Comment on lines
+8
to
10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚨 suggestion (security): Consider file permissions and ownership for copied SSH directory. Ensure that after copying the .ssh directory, you set appropriate permissions and ownership to protect private keys and restrict access to the intended user. Consider adding a RUN command for this purpose.
Suggested change
|
||||||||||||||||||||
RUN dnf -y install ${KEYLIME_BOOTC_INSTALL_PACKAGES} | ||||||||||||||||||||
RUN sed -i '/tss/ d' /usr/lib/group; ls -ld /etc/keylime /var/lib/keylime; ls -l /etc/keylime /var/lib/keylime; /bin/true | ||||||||||||||||||||
|
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.
question (bug_risk): Overwriting /etc/resolv.conf may interfere with container DNS resolution.
Copying resolv.conf may disrupt container DNS settings. Please confirm this is required, and if so, document the reason and provide a way to restore or update DNS configuration as needed.