Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function printSecurityDiff(oldTemplate: any, newTemplate: cxapi.CloudFormationStackArtifact, requireApproval: RequireApproval): boolean {
const diff = cfnDiff.diffTemplate(oldTemplate, newTemplate.template);
if (difRequiresApproval(diff, requireApproval)) {
// tslint:disable-next-line:max-line-length
warning(`This deployment will make potentially sensitive changes according to your current security approval level (--require-approval ${requireApproval}).`);
warning(`Please confirm you intend to make the following modifications:\n`);
cfnDiff.formatSecurityChanges(process.stdout, diff, buildLogicalToPathMap(newTemplate));
return true;
}
return false;
}