What are the steps are needed to generalize OpenBSD so that it could be used as a template or virtual appliance without disclosing any information of the environment that baked it, or put the user of the template at risk (for example what happened to GitHub Enterprise)?
Using Atlassian Bamboo, I use packer to create a OpenBSD 6.1 VMware vSphere virtual machine template. Another downstream process specializes the OpenBSD template for a specific use.
Currently I'm doing the following to truncate the logs
cp /dev/null /var/log/authlog
cp /dev/null /var/log/daemon
cp /dev/null /var/log/failedlogin
cp /dev/null /var/log/ftpd
cp /dev/null /var/log/lastlog
cp /dev/null /var/log/lpd-errs
cp /dev/null /var/log/maillog
cp /dev/null /var/log/messages
cp /dev/null /var/log/pflog
cp /dev/null /var/log/rdist
cp /dev/null /var/log/wtmp
cp /dev/null /var/log/secure
cp /dev/null /var/log/xferlog
And the following to remove SSH keys and any tmp files.
rm -rf /tmp/*
rm -f /etc/ssh/*key*
Reset the hostname
echo 'localhost.localdomain' > /etc/myname