I am writing a script that is supposed to run every day to check if there are any new security updates for Ubuntu.
If there are, it will make a list of those updates, it will download them, and then run some tests.
The purpose of this script is to make sure that no security updates break our code running on the Ubuntu.
I am not an experienced user with Ubuntu, so forgive me if this question seems trivial. I have researched quite a bit, and found information like this Which is useful I presume to those who are home-users or such. But I can not install extra packages, nor does this provide any solutions for doing it without installing packages, (I tried every answer that did not include downloading new packages)
So to refine my question, I would like a command that will fetch all the security updates (so I can see them as a list, and include it in the daily report of which security packages have updates) and then also download and install them. The testing and such I do myself (obviously) I just need help understanding which commands to run.
Since scripts will be running these commands, they do not need to be human-readable in any specific way, so they can be long and extraneous, or such, and preferably 1-liners that do not require pre-configuration.