Generic security analysis framework for quantum secure direct communication