audit-html-generator
v1.0.2
Published
Audit HTML generator for emails
Downloads
2
Readme
GeneratorAuditHTML
CloudCoreo GeneratoAuditHTML
description
Generator notifiers and html for the audit plans
install
npm install audit-html-generator
usage
const input = {
"stack_name": "audit-aws-elb",
"instance_name": "mike-plan1",
"violations": {
"cc-581e3012bd6-staging-vpn-elb": {
"violations": {
"elb-inventory": {
"display_name": "ELB Object Inventory",
"description": "This rule performs an inventory on all ELBs in the target AWS account.",
"category": "Inventory",
"suggested_action": "None.",
"level": "Information",
"region": "us-east-1"
}
}, "tags": [{ "value": "staging-vpn-elb", "key": "Name" }]
},
"cc-581e59ffbd6-kubestg-elb": {
"violations": {
"elb-inventory": {
"display_name": "ELB Object Inventory",
"description": "This rule performs an inventory on all ELBs in the target AWS account.",
"category": "Inventory",
"suggested_action": "None.",
"level": "Information",
"region": "us-east-1"
}
}, "tags": [{ "value": "kubestg-elb", "key": "Name" }]
}
}
};
const GeneratorAuditHTML = require('./index.js');
const AuditHTML = new GeneratorAuditHTML(input['violations'], "${AUDIT_AWS_ELB_ALERT_NO_OWNER_RECIPIENT}");
console.log(AuditHTML.getNotifiers());