I’m happy to announce that opam-audit has been released to opam in its initial version. It is an opam plugin (so you install it in one switch and have it available in all switches as opam audit).
So, opam-audit keeps a local copy of the security-advisory database from the OCaml Security Team. When you run opam audit, it will inspect all installed packages in your switch against the known advisories and report which installed packages have a known security vulnerability.
It either returns 0 if no known vulnerable packages were found, or non-zero and a list of installed vulnerable packages. This way, your CI systems can before publishing your application call opam audit and ensure that no vulnerable package sneaked into your binary.
So I think the way forward for you is to look if you can remove mirage-crypto-rng-lwt and if not see if you can update the dependents to not depend on mirage-crypto-rng-lwt.
And, did it work? Or did you have any packages that are still depending on mirage-crypto-rng-lwt? (if so, let me know, I can spend time to get rid of this dependency.)