var getSingleComplianceItemFinding = function()

in index.js [78:100]


var getSingleComplianceItemFinding = function (missingPatch, stsData) {
    return {
        AwsAccountId: stsData.Account,
        CreatedAt: new Date().toISOString(),
        Description: 'A critical patch is missing in some of the instances. Check further details in Systems Manager Compliance \n Patch Title: ' + missingPatch.Title + '\n Patch Id: ' + missingPatch.Id,
        GeneratorId: 'SSM',
        Id: missingPatch.Title + ' - ' + InstanceID,
        ProductArn: 'arn:aws:securityhub:' + process.env.AWS_REGION + ':' + stsData.Account + ':product/' + stsData.Account + '/default',
        Resources: missingPatch.resources,
        SchemaVersion: "2018-10-08",
        Severity: { /* required */
            Normalized: '70' // TODO
        },
        Title: 'Critical Patch with title ' + missingPatch.Title + ' missing',
        UpdatedAt: new Date().toISOString(), /* required */
        Compliance: {
            Status: 'FAILED'
        },
        Types: [
            'PATCH'
        ],
    }
}