[CAPI changed] Remove threattype field in detected 05/68405/1
authorKyungwook Tak <k.tak@samsung.com>
Wed, 4 May 2016 04:55:45 +0000 (13:55 +0900)
committerKyungwook Tak <k.tak@samsung.com>
Wed, 4 May 2016 04:55:45 +0000 (13:55 +0900)
Change-Id: I10ce04d2bf3130823ab77b184acc150d5d2b01a9
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
17 files changed:
data/scripts/create_schema.sql
src/framework/client/content-screening.cpp
src/framework/common/cs-detected.cpp
src/framework/common/cs-detected.h
src/framework/db/manager.cpp
src/framework/db/query.h
src/framework/service/cs-loader.cpp
src/framework/service/cs-loader.h
src/framework/service/logic.cpp
src/framework/service/type-converter.cpp
src/framework/service/type-converter.h
src/include/csr/content-screening-types.h
src/include/csr/content-screening.h
test/internals/test-cs-loader.cpp
test/internals/test-db.cpp
test/popup/test-popup.cpp
test/test-api-engine-content-screening.cpp

index 1a5b70c..7b69e4c 100644 (file)
@@ -11,7 +11,6 @@ CREATE TABLE IF NOT EXISTS SCAN_REQUEST(dir          TEXT PRIMARY KEY,
 CREATE TABLE IF NOT EXISTS DETECTED_MALWARE_FILE(path          TEXT PRIMARY KEY NOT NULL,
                                                  data_version  TEXT NOT NULL,
                                                  severity      INTEGER NOT NULL,
-                                                 threat        INTEGER NOT NULL,
                                                  malware_name  TEXT NOT NULL,
                                                  detailed_url  TEXT NOT NULL,
                                                  detected_time INTEGER NOT NULL,
index d887ff7..156f804 100644 (file)
@@ -484,22 +484,6 @@ int csr_cs_detected_get_severity(csr_cs_detected_h detected,
 }
 
 API
-int csr_cs_detected_get_threat_type(csr_cs_detected_h detected,
-                                                                       csr_cs_threat_type_e *pthreat_type)
-{
-       EXCEPTION_SAFE_START
-
-       if (detected == nullptr || pthreat_type == nullptr)
-               return CSR_ERROR_INVALID_PARAMETER;
-
-       *pthreat_type = reinterpret_cast<CsDetected *>(detected)->threat;
-
-       return CSR_ERROR_NONE;
-
-       EXCEPTION_SAFE_END
-}
-
-API
 int csr_cs_detected_get_malware_name(csr_cs_detected_h detected,
                                                                         const char **pmalware_name)
 {
index 5c11108..e786f66 100644 (file)
@@ -32,7 +32,6 @@ CsDetected::CsDetected() :
        malwareName(),
        detailedUrl(),
        severity(CSR_CS_SEVERITY_LOW),
-       threat(CSR_CS_THREAT_GENERIC),
        response(CSR_CS_NO_ASK_USER),
        isApp(false),
        ts(0)
@@ -46,22 +45,18 @@ CsDetected::~CsDetected()
 CsDetected::CsDetected(IStream &stream)
 {
        int intSeverity;
-       int intThreat;
        int intResponse;
-       Deserializer<std::string, std::string, std::string, int, int, int, time_t>::Deserialize(
-               stream, targetName, malwareName, detailedUrl, intSeverity, intThreat,
-               intResponse, ts);
+       Deserializer<std::string, std::string, std::string, int, int, time_t>::Deserialize(
+               stream, targetName, malwareName, detailedUrl, intSeverity, intResponse, ts);
 
        severity = static_cast<csr_cs_severity_level_e>(intSeverity);
-       threat = static_cast<csr_cs_threat_type_e>(intThreat);
        response = static_cast<csr_cs_user_response_e>(intResponse);
 }
 
 void CsDetected::Serialize(IStream &stream) const
 {
-       Serializer<std::string, std::string, std::string, int, int, int, time_t>::Serialize(
-               stream, targetName, malwareName, detailedUrl,
-               static_cast<int>(severity), static_cast<int>(threat),
+       Serializer<std::string, std::string, std::string, int, int, time_t>::Serialize(
+               stream, targetName, malwareName, detailedUrl, static_cast<int>(severity),
                static_cast<int>(response), ts);
 }
 
@@ -70,7 +65,6 @@ CsDetected::CsDetected(CsDetected &&other) :
        malwareName(std::move(other.malwareName)),
        detailedUrl(std::move(other.detailedUrl)),
        severity(other.severity),
-       threat(other.threat),
        response(other.response),
        ts(other.ts)
 {
@@ -85,7 +79,6 @@ CsDetected &CsDetected::operator=(CsDetected &&other)
        malwareName = std::move(other.malwareName);
        detailedUrl = std::move(other.detailedUrl);
        severity = other.severity;
-       threat = other.threat;
        response = other.response;
        ts = other.ts;
 
index df4c813..eaaba96 100644 (file)
@@ -50,7 +50,6 @@ struct CsDetected : public IResult {
        std::string detailedUrl;
        std::string pkgId;
        csr_cs_severity_level_e severity;
-       csr_cs_threat_type_e threat;
        csr_cs_user_response_e response;
        bool isApp;
        time_t ts;
index 4275c09..a209619 100644 (file)
@@ -232,7 +232,6 @@ RowShPtrs Manager::getDetectedMalwares(const std::string &dir)
                row->targetName = stmt.getText();
                row->dataVersion = stmt.getText();
                row->severity = static_cast<csr_cs_severity_level_e>(stmt.getInt());
-               row->threat = static_cast<csr_cs_threat_type_e>(stmt.getInt());
                row->malwareName = stmt.getText();
                row->detailedUrl = stmt.getText();
                row->ts = static_cast<time_t>(stmt.getInt64());
@@ -257,7 +256,6 @@ RowShPtr Manager::getDetectedMalware(const std::string &path)
        row->targetName = stmt.getText();
        row->dataVersion = stmt.getText();
        row->severity = static_cast<csr_cs_severity_level_e>(stmt.getInt());
-       row->threat = static_cast<csr_cs_threat_type_e>(stmt.getInt());
        row->malwareName = stmt.getText();
        row->detailedUrl = stmt.getText();
        row->ts = static_cast<time_t>(stmt.getInt64());
@@ -275,7 +273,6 @@ void Manager::insertDetectedMalware(const CsDetected &d,
        stmt.bind(d.targetName);
        stmt.bind(dataVersion);
        stmt.bind(static_cast<int>(d.severity));
-       stmt.bind(static_cast<int>(d.threat));
        stmt.bind(d.malwareName);
        stmt.bind(d.detailedUrl);
        stmt.bind(static_cast<sqlite3_int64>(d.ts));
index c85c1ec..64d3969 100644 (file)
@@ -38,33 +38,33 @@ const std::string SEL_SCAN_REQUEST =
        "select last_scan from SCAN_REQUEST where dir = ? and data_version = ?";
 
 const std::string INS_SCAN_REQUEST =
-       "insert or replace into SCAN_REQUEST (dir, last_scan, data_version) "
+       "insert or replace into SCAN_REQUEST (dir, last_scan, data_version)"
        "values (?, ?, ?)";
 
 const std::string DEL_SCAN_REQUEST_BY_DIR =
        "delete from SCAN_REQUEST where dir = ?";
 
 const std::string DEL_SCAN_REQUEST =
-       "delete from SCAN_REQUEST ";
+       "delete from SCAN_REQUEST";
 
 
 const std::string SEL_DETECTED_BY_DIR =
        "SELECT path, data_version, "
-       " severity, threat, malware_name, "
-       " detailed_url, detected_time, ignored "
-       " FROM detected_malware_file where path like ? || '%' ";
+       "severity, malware_name, "
+       "detailed_url, detected_time, ignored "
+       "FROM detected_malware_file where path like ? || '%'";
 
 const std::string SEL_DETECTED_BY_PATH =
        "SELECT path, data_version, "
-       " severity, threat, malware_name, "
-       " detailed_url, detected_time, ignored "
-       " FROM detected_malware_file where path = ? ";
+       "severity, malware_name, "
+       "detailed_url, detected_time, ignored "
+       "FROM detected_malware_file where path = ?";
 
 const std::string INS_DETECTED =
        "insert or replace into DETECTED_MALWARE_FILE "
-       " (path, data_version, severity, threat, malware_name, "
-       " detailed_url, detected_time, ignored) "
-       " values (?, ?, ?, ?, ?, ?, ?, ?)";
+       "(path, data_version, severity, malware_name, "
+       "detailed_url, detected_time, ignored) "
+       "values (?, ?, ?, ?, ?, ?, ?)";
 
 const std::string UPD_DETECTED_INGNORED =
        "update DETECTED_MALWARE_FILE set ignored = ? where path = ?";
@@ -74,7 +74,7 @@ const std::string DEL_DETECTED_BY_PATH =
 
 const std::string DEL_DETECTED_DEPRECATED =
        "delete from DETECTED_MALWARE_FILE where path like ? || '%' "
-       " and data_version != ?";
+       "and data_version != ?";
 
 } // namespace Query
 } // namespace Db
index cf4b041..594c8c3 100755 (executable)
@@ -108,15 +108,6 @@ int CsLoader::getSeverity(csre_cs_detected_h d,
        return m_pc.fpGetSeverity(d, pseverity);
 }
 
-int CsLoader::getThreatType(csre_cs_detected_h d,
-                                                       csre_cs_threat_type_e *pthreat)
-{
-       if (d == nullptr || pthreat == nullptr)
-               ThrowExc(InvalidParam, "cs loader get threat type");
-
-       return m_pc.fpGetThreatType(d, pthreat);
-}
-
 int CsLoader::getMalwareName(csre_cs_detected_h d, std::string &value)
 {
        if (d == nullptr)
@@ -273,8 +264,6 @@ CsLoader::CsLoader(const std::string &enginePath)
                                                        "csre_cs_scan_app_on_cloud"));
        m_pc.fpGetSeverity = reinterpret_cast<FpGetSeverity>(dlsym(handle,
                                                 "csre_cs_detected_get_severity"));
-       m_pc.fpGetThreatType = reinterpret_cast<FpGetThreatType>(dlsym(handle,
-                                                  "csre_cs_detected_get_threat_type"));
        m_pc.fpGetMalwareName = reinterpret_cast<FpGetMalwareName>(dlsym(handle,
                                                        "csre_cs_detected_get_malware_name"));
        m_pc.fpGetDetailedUrl = reinterpret_cast<FpGetDetailedUrl>(dlsym(handle,
@@ -309,7 +298,7 @@ CsLoader::CsLoader(const std::string &enginePath)
                        m_pc.fpContextCreate == nullptr || m_pc.fpContextDestroy == nullptr ||
                        m_pc.fpScanData == nullptr || m_pc.fpScanFile == nullptr  ||
                        m_pc.fpScanAppOnCloud == nullptr || m_pc.fpGetSeverity == nullptr ||
-                       m_pc.fpGetThreatType == nullptr || m_pc.fpGetMalwareName == nullptr ||
+                       m_pc.fpGetMalwareName == nullptr ||
                        m_pc.fpGetDetailedUrl == nullptr || m_pc.fpGetTimestamp == nullptr ||
                        m_pc.fpGetErrorString == nullptr || m_pc.fpGetEngineInfo == nullptr ||
                        m_pc.fpGetEngineApiVersion == nullptr || m_pc.fpGetEngineVendor == nullptr ||
index 15e1e73..40a357d 100755 (executable)
@@ -46,7 +46,6 @@ public:
                                           csre_cs_detected_h *);
 
        int getSeverity(csre_cs_detected_h, csre_cs_severity_level_e *);
-       int getThreatType(csre_cs_detected_h, csre_cs_threat_type_e *);
        int getMalwareName(csre_cs_detected_h, std::string &);
        int getDetailedUrl(csre_cs_detected_h, std::string &);
        int getTimestamp(csre_cs_detected_h, time_t *);
@@ -76,7 +75,6 @@ private:
        using FpScanAppOnCloud = int(*)(csre_cs_context_h, const char *,
                                                                        csre_cs_detected_h *);
        using FpGetSeverity = int(*)(csre_cs_detected_h, csre_cs_severity_level_e *);
-       using FpGetThreatType = int(*)(csre_cs_detected_h, csre_cs_threat_type_e *);
        using FpGetMalwareName = int(*)(csre_cs_detected_h, const char **);
        using FpGetDetailedUrl = int(*)(csre_cs_detected_h, const char **);
        using FpGetTimestamp = int(*)(csre_cs_detected_h, time_t *);
@@ -104,7 +102,6 @@ private:
                FpScanFile fpScanFile;
                FpScanAppOnCloud fpScanAppOnCloud;
                FpGetSeverity fpGetSeverity;
-               FpGetThreatType fpGetThreatType;
                FpGetMalwareName fpGetMalwareName;
                FpGetDetailedUrl fpGetDetailedUrl;
                FpGetTimestamp fpGetTimestamp;
index 9d0b8ad..e6f05e0 100644 (file)
@@ -627,15 +627,6 @@ CsDetected Logic::convert(csre_cs_detected_h &result)
 
        d.severity = Csr::convert(eseverity);
 
-       // getting threat type
-       csre_cs_threat_type_e ethreat = CSRE_CS_THREAT_GENERIC;
-       eret = m_cs->getThreatType(result, &ethreat);
-
-       if (eret != CSRE_ERROR_NONE)
-               ThrowExc(EngineError, "getting threat of cs detected. ret: " << eret);
-
-       d.threat = Csr::convert(ethreat);
-
        // getting malware name
        eret = m_cs->getMalwareName(result, d.malwareName);
 
index 3cc422b..25ebde0 100644 (file)
@@ -43,23 +43,6 @@ csr_cs_severity_level_e convert(const csre_cs_severity_level_e &e)
        }
 }
 
-csr_cs_threat_type_e convert(const csre_cs_threat_type_e &e)
-{
-       switch (e) {
-       case CSRE_CS_THREAT_MALWARE:
-               return CSR_CS_THREAT_MALWARE;
-
-       case CSRE_CS_THREAT_RISKY:
-               return CSR_CS_THREAT_RISKY;
-
-       case CSRE_CS_THREAT_GENERIC:
-               return CSR_CS_THREAT_GENERIC;
-
-       default:
-               ThrowExc(InternalError, "Invalid ethreat: " << static_cast<int>(e));
-       }
-}
-
 csr_wp_risk_level_e convert(const csre_wp_risk_level_e &e)
 {
        switch (e) {
index 13e517e..504440c 100644 (file)
@@ -29,7 +29,6 @@
 namespace Csr {
 
 csr_cs_severity_level_e convert(const csre_cs_severity_level_e &);
-csr_cs_threat_type_e convert(const csre_cs_threat_type_e &);
 
 csr_wp_risk_level_e convert(const csre_wp_risk_level_e &);
 
index 4fa8158..7114353 100644 (file)
@@ -36,15 +36,6 @@ typedef enum {
 } csr_cs_severity_level_e;
 
 /**
- * @brief the type of a threat detected
- */
-typedef enum {
-       CSR_CS_THREAT_MALWARE = 0x00,  /**< Malware. */
-       CSR_CS_THREAT_RISKY   = 0x01,  /**< It's not a malware but still risky. */
-       CSR_CS_THREAT_GENERIC = 0x02   /**< Generic threat */
-} csr_cs_threat_type_e;
-
-/**
  * @brief the options about prompting a popup to a user.
  */
 typedef enum {
index df21dfb..3202f77 100644 (file)
@@ -445,22 +445,6 @@ int csr_cs_detected_get_severity(csr_cs_detected_h detected,
                                                                 csr_cs_severity_level_e *pseverity);
 
 /**
- * @brief extracts the threat type of a detected malware from the detected malware handle.
- *
- * @param[in]  detected      A detected malware handle.
- * @param[out] pthreat_type  A pointer of the threat type of a detected malware.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE                 Successful
- * @retval #CSR_ERROR_INVALID_HANDLE       Invalid detected malware handle
- * @retval #CSR_ERROR_INVALID_PARAMETER    pharmful_type is invalid.
- * @retval #CSR_ERROR_UNKNOWN              Error with unknown reason
- */
-int csr_cs_detected_get_threat_type(csr_cs_detected_h detected,
-                                                                       csr_cs_threat_type_e *pthreat_type);
-
-/**
  * @brief extracts the name of a detected malware from the detected malware handle.
  *
  * @param[in]  detected      A detected malware handle.
index bb8ba5a..3e7840c 100644 (file)
@@ -43,7 +43,6 @@ namespace {
 inline void checkDetected(Csr::CsLoader &loader,
                                                  csre_cs_detected_h detected,
                                                  csre_cs_severity_level_e expected_severity,
-                                                 csre_cs_threat_type_e expected_threat_type,
                                                  const char *expected_malware_name,
                                                  const char *expected_detailed_url,
                                                  time_t expected_timestamp)
@@ -56,10 +55,6 @@ inline void checkDetected(Csr::CsLoader &loader,
        ASSERT_IF(loader.getSeverity(detected, &severity), CSRE_ERROR_NONE);
        ASSERT_IF(severity, expected_severity);
 
-       csre_cs_threat_type_e threat_type;
-       ASSERT_IF(loader.getThreatType(detected, &threat_type), CSRE_ERROR_NONE);
-       ASSERT_IF(threat_type, expected_threat_type);
-
        std::string malware_name;
        ASSERT_IF(loader.getMalwareName(detected, malware_name), CSRE_ERROR_NONE);
        if (expected_malware_name != nullptr)
@@ -185,7 +180,6 @@ BOOST_AUTO_TEST_CASE(scan_data_high)
        checkDetected(h.loader,
                                  detected,
                                  CSRE_CS_SEVERITY_HIGH,
-                                 CSRE_CS_THREAT_MALWARE,
                                  "test_malware",
                                  "http://high.malware.com",
                                  0);
@@ -210,7 +204,6 @@ BOOST_AUTO_TEST_CASE(scan_data_medium)
        checkDetected(h.loader,
                                  detected,
                                  CSRE_CS_SEVERITY_MEDIUM,
-                                 CSRE_CS_THREAT_RISKY,
                                  "test_risk",
                                  nullptr,
                                  0);
@@ -248,7 +241,6 @@ BOOST_AUTO_TEST_CASE(scan_file_malware)
        checkDetected(h.loader,
                                  detected,
                                  CSRE_CS_SEVERITY_HIGH,
-                                 CSRE_CS_THREAT_MALWARE,
                                  "test_malware",
                                  "http://high.malware.com",
                                  0);
@@ -271,7 +263,6 @@ BOOST_AUTO_TEST_CASE(scan_file_risky)
        checkDetected(h.loader,
                                  detected,
                                  CSRE_CS_SEVERITY_MEDIUM,
-                                 CSRE_CS_THREAT_RISKY,
                                  "test_risk",
                                  "http://medium.malware.com",
                                  0);
@@ -294,7 +285,6 @@ BOOST_AUTO_TEST_CASE(scan_app_on_cloud)
        checkDetected(h.loader,
                                  detected,
                                  CSRE_CS_SEVERITY_HIGH,
-                                 CSRE_CS_THREAT_MALWARE,
                                  "test_malware",
                                  "http://high.malware.com",
                                  0);
index 3ce309e..da45c02 100644 (file)
@@ -40,7 +40,6 @@ void checkSameMalware(const CsDetected &d, const Db::Row &r)
 {
        ASSERT_IF(d.targetName,  r.targetName);
        ASSERT_IF(d.severity,    r.severity);
-       ASSERT_IF(d.threat,      r.threat);
        ASSERT_IF(d.malwareName, r.malwareName);
        ASSERT_IF(d.detailedUrl, r.detailedUrl);
        ASSERT_IF(d.ts,          r.ts);
@@ -115,7 +114,6 @@ BOOST_AUTO_TEST_CASE(detected_malware_file)
        CsDetected malware1;
        malware1.targetName = "/opt/testmalware1";
        malware1.severity = CSR_CS_SEVERITY_MEDIUM;
-       malware1.threat = CSR_CS_THREAT_MALWARE;
        malware1.malwareName = "testmalware1";
        malware1.detailedUrl = "http://detailed.malware.com";
        malware1.ts = 100;
@@ -123,7 +121,6 @@ BOOST_AUTO_TEST_CASE(detected_malware_file)
        CsDetected malware2;
        malware2.targetName = "/opt/testmalware2";
        malware2.severity = CSR_CS_SEVERITY_HIGH;
-       malware2.threat = CSR_CS_THREAT_RISKY;
        malware2.malwareName = "testmalware2";
        malware2.detailedUrl = "http://detailed2.malware.com";
        malware2.ts = 210;
@@ -131,7 +128,6 @@ BOOST_AUTO_TEST_CASE(detected_malware_file)
        CsDetected malware3;
        malware3.targetName = "/opt/testmalware3";
        malware3.severity = CSR_CS_SEVERITY_LOW;
-       malware3.threat = CSR_CS_THREAT_GENERIC;
        malware3.malwareName = "testmalware3";
        malware3.detailedUrl = "http://detailed3.malware.com";
        malware3.ts = 310;
index 91e6141..dec962e 100644 (file)
@@ -120,7 +120,6 @@ BOOST_AUTO_TEST_CASE(prompt_data)
        d.malwareName = "dummy malware in data";
        d.detailedUrl = "http://detailedurl/cs_prompt_data";
        d.severity = CSR_CS_SEVERITY_MEDIUM;
-       d.threat = CSR_CS_THREAT_RISKY;
 
        Ui::AskUser askuser;
        printPressed(askuser.cs(Ui::CommandId::CS_PROMPT_DATA,
@@ -138,7 +137,6 @@ BOOST_AUTO_TEST_CASE(prompt_app)
        d.malwareName = "dummy malware in app";
        d.detailedUrl = "http://detailedurl/cs_prompt_app";
        d.severity = CSR_CS_SEVERITY_MEDIUM;
-       d.threat = CSR_CS_THREAT_RISKY;
 
        Ui::AskUser askuser;
        printPressed(askuser.cs(Ui::CommandId::CS_PROMPT_APP,
@@ -156,7 +154,6 @@ BOOST_AUTO_TEST_CASE(prompt_file)
        d.malwareName = "dummy malware";
        d.detailedUrl = "http://detailedurl/cs_prompt_file";
        d.severity = CSR_CS_SEVERITY_MEDIUM;
-       d.threat = CSR_CS_THREAT_RISKY;
 
        Ui::AskUser askuser;
        printPressed(askuser.cs(Ui::CommandId::CS_PROMPT_FILE,
@@ -174,7 +171,6 @@ BOOST_AUTO_TEST_CASE(notify_data)
        d.malwareName = "dummy malware in data";
        d.detailedUrl = "http://detailedurl/cs_notify_data";
        d.severity = CSR_CS_SEVERITY_HIGH;
-       d.threat = CSR_CS_THREAT_RISKY;
 
        Ui::AskUser askuser;
        printPressed(askuser.cs(Ui::CommandId::CS_NOTIFY_DATA,
@@ -192,7 +188,6 @@ BOOST_AUTO_TEST_CASE(notify_app)
        d.malwareName = "dummy malware in app";
        d.detailedUrl = "http://detailedurl/cs_notify_app";
        d.severity = CSR_CS_SEVERITY_HIGH;
-       d.threat = CSR_CS_THREAT_RISKY;
 
        Ui::AskUser askuser;
        printPressed(askuser.cs(Ui::CommandId::CS_NOTIFY_APP,
@@ -210,7 +205,6 @@ BOOST_AUTO_TEST_CASE(notify_file)
        d.malwareName = "dummy malware";
        d.detailedUrl = "http://detailedurl/cs_notify_file";
        d.severity = CSR_CS_SEVERITY_HIGH;
-       d.threat = CSR_CS_THREAT_RISKY;
 
        Ui::AskUser askuser;
        auto response = askuser.cs(Ui::CommandId::CS_NOTIFY_FILE,
index 425543c..1ab6f89 100644 (file)
@@ -42,7 +42,6 @@ namespace {
 
 inline void checkDetected(csre_cs_detected_h detected,
                                                  csre_cs_severity_level_e expected_severity,
-                                                 csre_cs_threat_type_e expected_threat_type,
                                                  const char *expected_malware_name,
                                                  const char *expected_detailed_url,
                                                  long expected_timestamp)
@@ -57,13 +56,6 @@ inline void checkDetected(csre_cs_detected_h detected,
                                                  "severity isn't expected value. "
                                                  "val: " << severity << " expected: " << expected_severity);
 
-       csre_cs_threat_type_e threat_type;
-       ASSERT_IF(csre_cs_detected_get_threat_type(detected, &threat_type),
-                         CSRE_ERROR_NONE);
-       BOOST_REQUIRE_MESSAGE(threat_type == expected_threat_type,
-                                                 "threat type isn't expected value. "
-                                                 "val: " << threat_type << " expected: " << expected_threat_type);
-
        const char *malware_name = nullptr;
        ASSERT_IF(csre_cs_detected_get_malware_name(detected, &malware_name),
                          CSRE_ERROR_NONE);
@@ -160,7 +152,6 @@ BOOST_AUTO_TEST_CASE(scan_data_high)
 
        checkDetected(detected,
                                  CSRE_CS_SEVERITY_HIGH,
-                                 CSRE_CS_THREAT_MALWARE,
                                  "test_malware",
                                  "http://high.malware.com",
                                  0);
@@ -188,7 +179,6 @@ BOOST_AUTO_TEST_CASE(scan_data_medium)
 
        checkDetected(detected,
                                  CSRE_CS_SEVERITY_MEDIUM,
-                                 CSRE_CS_THREAT_RISKY,
                                  "test_risk",
                                  nullptr,
                                  0);
@@ -227,7 +217,6 @@ BOOST_AUTO_TEST_CASE(scan_file_malware)
 
        checkDetected(detected,
                                  CSRE_CS_SEVERITY_HIGH,
-                                 CSRE_CS_THREAT_MALWARE,
                                  "test_malware",
                                  "http://high.malware.com",
                                  0);
@@ -250,7 +239,6 @@ BOOST_AUTO_TEST_CASE(scan_file_risky)
 
        checkDetected(detected,
                                  CSRE_CS_SEVERITY_MEDIUM,
-                                 CSRE_CS_THREAT_RISKY,
                                  "test_risk",
                                  "http://medium.malware.com",
                                  0);
@@ -273,7 +261,6 @@ BOOST_AUTO_TEST_CASE(scan_app_on_cloud)
 
        checkDetected(detected,
                                  CSRE_CS_SEVERITY_HIGH,
-                                 CSRE_CS_THREAT_MALWARE,
                                  "test_malware",
                                  "http://high.malware.com",
                                  0);