Some quick possible-caveats about /dev/urandom:
1. It may have less entropy than /dev/random. The lack of entropy might
make it more vulnerable to attack, although "none have been published
yet" (sigh: Wikipedia:
https://en.m.wikipedia.org/wiki//dev/urandom).
2. In some cases, access to /dev may be denied by a call to chroot(2).
In this case, neither /dev/random or /dev/urandom is reachable via
Lua's io.open().
3. I believe that relevant POSIX standards are a better source than
"quacks like Unix", if available/applicable. I know of some projects
that demand POSIX references over (e.g.) Wikipedia references.
----
Linux's getrandom is designed to give read access to the kernel's
[u]random infrastructure, even where the /dev/ equivalents are
unavailable.
--------
In any case, the potential traps and pitfalls regarding security,
including random number generators, scares me greatly... where possible,
I try to defer to known-good code from highly-reputable sources
(including defending against supply-chain attacks).
Hope this helps. s-b