If you want to use git for version control of dependencies, for the love of god use git submodules. It's what they were designed for. If you want to check-in single file stb_lib fine but checking in MESA into your source tree is just plain stupid.
For CVEs, if you use docker images you need to rebuild and redeploy all images which isn’t particularly different from updating committed code.
If you’ve modified a library you have to merge changes any which way. So not sure what difference it makes.
Checking in GPU drivers probably doesn’t make sense. That’s closer to Docker territory at least. Haven’t run into a case where I’ve wanted/needed to do that so no strong opinion.
Never edit the code in the submodules, edit them in the parent repos where they properly live. Your repo is for your code only. Don’t go wandering:editing in those submodules.
Every other existing VCS btw to my knowledge has the same limits