function notRelevant()

in src/macie-finding-handler/macie-finding-handler.js [55:73]


function notRelevant(finding) {
    //Don't process if not a finding resulting from a sensitive data discovery job
    if (finding.category !== 'CLASSIFICATION') {
        console.log("Not a data classification finding, exiting");
        return true;
    } 

    //Determine if any action should be taken based on configured minimum severity level
    if (finding.severity.score) {
        const score = finding.severity.score;

        if ((score < 2 && minSeverityLevel !== 'LOW') || (score < 3 && minSeverityLevel === 'HIGH')) {
            console.log("Score and severity threshold not met, exiting");
            return true;
        }
    }

    return false;
}