Skip to content

Commit

Permalink
Cyberleague: [premieroctet#159] move bellwetherData declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastien-Wappizy committed Oct 4, 2024
1 parent 512c563 commit 5903cad
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions backend/web/server/plugins/cyberleague/statistic.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,6 @@ const User = require("../../models/User")
const { COMPANY_SIZE_1001_PLUS, STAT_MIN_SCORES, COMPANY_SIZE_0_10 } = require("./consts")


const bellwetherDataStructure = {
threatSecurityIncident: {value: 0, count: 0},
threatSecurityIncidentETI: {value: 0, count: 0},
threatLeakage: {value: 0, count: 0},
threatCriticalIncident: {value: 0, count: 0},
maturityBudget: {value: 0, count: 0},
maturityBudgetPME: {value: 0, count: 0},
maturityCyberRef: {value: 0, count: 0},
protectionIntrusion: {value: 0, count: 0},
protectionIntrusionPME: {value: 0, count: 0},
protectionIntrusionETI: {value: 0, count: 0},
protectionExternalized: {value: 0, count: 0},
protectionWebApp: {value: 0, count: 0},
protectionWebAppPME: {value: 0, count: 0},
protectionWebAppETI: {value: 0, count: 0},
protectionAntivirus: {value: 0, count: 0},
practicesCharter: {value: 0, count: 0},
practicesFinancial: {value: 0, count: 0},
practicesSensibilization: {value: 0, count: 0}
}

const regexSecurityIncident = (text) => {
return false
}
Expand Down Expand Up @@ -117,6 +96,27 @@ const computeBellwetherStatistics = async (filters) => {
return s
})

const bellwetherData = {
threatSecurityIncident: {value: 0, count: 0},
threatSecurityIncidentETI: {value: 0, count: 0},
threatLeakage: {value: 0, count: 0},
threatCriticalIncident: {value: 0, count: 0},
maturityBudget: {value: 0, count: 0},
maturityBudgetPME: {value: 0, count: 0},
maturityCyberRef: {value: 0, count: 0},
protectionIntrusion: {value: 0, count: 0},
protectionIntrusionPME: {value: 0, count: 0},
protectionIntrusionETI: {value: 0, count: 0},
protectionExternalized: {value: 0, count: 0},
protectionWebApp: {value: 0, count: 0},
protectionWebAppPME: {value: 0, count: 0},
protectionWebAppETI: {value: 0, count: 0},
protectionAntivirus: {value: 0, count: 0},
practicesCharter: {value: 0, count: 0},
practicesFinancial: {value: 0, count: 0},
practicesSensibilization: {value: 0, count: 0}
}

cleanScores.forEach((s)=> {
s.answers.forEach((a) => {
if (regexAntivirus(a.question.text)) {
Expand Down

0 comments on commit 5903cad

Please sign in to comment.