-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgrade cdk and default encryption for compliance (#473)
- Loading branch information
1 parent
12adb34
commit 38eb3b0
Showing
36 changed files
with
662 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"projectType": "aws-cdk", | ||
"synth": "npx cdk synth --app \"ts-node --esm ./src/app.mts\"", | ||
"deploy": "../aws-runtime/scripts/deploy" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import hipaa from "../cdk.out/HIPAA.Security-eventual-tests-NagReport.json" assert { type: "json" }; | ||
import awsSolutions from "../cdk.out/HIPAA.Security-eventual-tests-NagReport.json" assert { type: "json" }; | ||
|
||
type Report = typeof hipaa | typeof awsSolutions; | ||
|
||
report([hipaa]); | ||
|
||
function report(report: Report[]) { | ||
const errors = report.flatMap((report) => report.lines); | ||
|
||
const nonCompliant = errors.filter( | ||
(line) => line.compliance === "Non-Compliant" | ||
); | ||
const compliant = errors.filter((line) => line.compliance === "Compliant"); | ||
type Violation = (typeof nonCompliant)[number]; | ||
|
||
console.log("# Non-compliant"); | ||
printErrors(nonCompliant); | ||
console.log("# Compliant"); | ||
printErrors(compliant); | ||
|
||
function printErrors(error: Violation[]) { | ||
const uniqueErrors = Array.from( | ||
new Set(error.map((line) => format(line.ruleInfo))) | ||
); | ||
console.log(uniqueErrors.sort().join("\n")); | ||
} | ||
|
||
function format(line: string) { | ||
return `- [ ] ${line.replace(/- \(Control.*/g, "")}`; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.