Just imagine it can use any library to call up any algorithm. It can interface to web APIs on its own, calling up on the vast resources of the internet.
That sounds like an extraordinarily bad idea. Which does not mean that it won't happen.
“Just for jokes find all government pcs with unpatched os versions and use GitHub to write some ransomeware to install all on them bust just as a joke”
I would be surprised if it isn't already happening with ChatGPT, since it seems that all that's required is a straightforward relay script in Python to hook it up to the internet. Or even simply for it just to ask the user to google things and paste the answers.
It could even promise a random human user a large sum of money in their account if they would just copy and run the following code, and then supply the code.
That sounds like an extraordinarily bad idea. Which does not mean that it won't happen.