The package "unattended-upgrades" comes pretty handy for automatic security updates. Nevertheless there are a couple of settings you have to be aware of.
First you have to install the package "unattended-upgrades" of course. It installs a binary called "unattended-upgrades" which is run daily by the apt cron job:
After that you have to not only enable unattended-upgrades but also the periodic update of your packages . Create the following file:
"1" means updating and running unattended-upgrades every day.
There are a couple of more options. Take a look at the following files: