  Quantum random number generator (QRNG) is one of the most widely applied
branches in quantum cryptography. Among all QRNG schemes,
semi-device-independent (semi-DI) QRNG is quite promising, achieving high
randomness generation rate with few assumptions on the devices. For the central
task of a QRNG study -- security analysis, numerical approaches become popular
for its generality to various semi-DI QRNG schemes. Here we formulate a
numerical framework for the finite-size security of general semi-DI QRNGs,
which gives a secure lower bound of the finite-size randomness generation rate
against general attacks. We consider a simple example of an optical semi-DI
QRNG as an application of our framework.
