[WCNCR00166862] security: Refactor security detection code.

[Description]
Refactor security detection code for redundant code and naming rule.

Change-Id: Ib4db3472a9e7c9d184148676f103a1f3f6ef5b92
Signed-off-by: wayne.guo <wayne.guo@mediatek.com>
CR-Id: WCNCR00166862
Feature: security
6 files changed