Props for the AnnotationLogger.
import { AnnotationLoggerProps } from 'cdk-nag'
const annotationLoggerProps: AnnotationLoggerProps = { ... }
Name | Type | Description |
---|---|---|
logIgnores |
boolean |
Whether or not to log suppressed rule violations as informational messages (default: false). |
verbose |
boolean |
Whether or not to enable extended explanatory descriptions on warning, error, and logged ignore messages. |
public readonly logIgnores: boolean;
- Type: boolean
Whether or not to log suppressed rule violations as informational messages (default: false).
public readonly verbose: boolean;
- Type: boolean
Whether or not to enable extended explanatory descriptions on warning, error, and logged ignore messages.
Shared data for all INagLogger methods.
import { NagLoggerBaseData } from 'cdk-nag'
const nagLoggerBaseData: NagLoggerBaseData = { ... }
Name | Type | Description |
---|---|---|
nagPackName |
string |
No description. |
resource |
aws-cdk-lib.CfnResource |
No description. |
ruleExplanation |
string |
No description. |
ruleId |
string |
No description. |
ruleInfo |
string |
No description. |
ruleLevel |
NagMessageLevel |
No description. |
ruleOriginalName |
string |
No description. |
public readonly nagPackName: string;
- Type: string
public readonly resource: CfnResource;
- Type: aws-cdk-lib.CfnResource
public readonly ruleExplanation: string;
- Type: string
public readonly ruleId: string;
- Type: string
public readonly ruleInfo: string;
- Type: string
public readonly ruleLevel: NagMessageLevel;
- Type: NagMessageLevel
public readonly ruleOriginalName: string;
- Type: string
Data for onCompliance method of an INagLogger.
import { NagLoggerComplianceData } from 'cdk-nag'
const nagLoggerComplianceData: NagLoggerComplianceData = { ... }
Name | Type | Description |
---|---|---|
nagPackName |
string |
No description. |
resource |
aws-cdk-lib.CfnResource |
No description. |
ruleExplanation |
string |
No description. |
ruleId |
string |
No description. |
ruleInfo |
string |
No description. |
ruleLevel |
NagMessageLevel |
No description. |
ruleOriginalName |
string |
No description. |
public readonly nagPackName: string;
- Type: string
public readonly resource: CfnResource;
- Type: aws-cdk-lib.CfnResource
public readonly ruleExplanation: string;
- Type: string
public readonly ruleId: string;
- Type: string
public readonly ruleInfo: string;
- Type: string
public readonly ruleLevel: NagMessageLevel;
- Type: NagMessageLevel
public readonly ruleOriginalName: string;
- Type: string
Data for onError method of an INagLogger.
import { NagLoggerErrorData } from 'cdk-nag'
const nagLoggerErrorData: NagLoggerErrorData = { ... }
Name | Type | Description |
---|---|---|
nagPackName |
string |
No description. |
resource |
aws-cdk-lib.CfnResource |
No description. |
ruleExplanation |
string |
No description. |
ruleId |
string |
No description. |
ruleInfo |
string |
No description. |
ruleLevel |
NagMessageLevel |
No description. |
ruleOriginalName |
string |
No description. |
errorMessage |
string |
No description. |
public readonly nagPackName: string;
- Type: string
public readonly resource: CfnResource;
- Type: aws-cdk-lib.CfnResource
public readonly ruleExplanation: string;
- Type: string
public readonly ruleId: string;
- Type: string
public readonly ruleInfo: string;
- Type: string
public readonly ruleLevel: NagMessageLevel;
- Type: NagMessageLevel
public readonly ruleOriginalName: string;
- Type: string
public readonly errorMessage: string;
- Type: string
Data for onNonCompliance method of an INagLogger.
import { NagLoggerNonComplianceData } from 'cdk-nag'
const nagLoggerNonComplianceData: NagLoggerNonComplianceData = { ... }
Name | Type | Description |
---|---|---|
nagPackName |
string |
No description. |
resource |
aws-cdk-lib.CfnResource |
No description. |
ruleExplanation |
string |
No description. |
ruleId |
string |
No description. |
ruleInfo |
string |
No description. |
ruleLevel |
NagMessageLevel |
No description. |
ruleOriginalName |
string |
No description. |
findingId |
string |
No description. |
public readonly nagPackName: string;
- Type: string
public readonly resource: CfnResource;
- Type: aws-cdk-lib.CfnResource
public readonly ruleExplanation: string;
- Type: string
public readonly ruleId: string;
- Type: string
public readonly ruleInfo: string;
- Type: string
public readonly ruleLevel: NagMessageLevel;
- Type: NagMessageLevel
public readonly ruleOriginalName: string;
- Type: string
public readonly findingId: string;
- Type: string
Data for onNotApplicable method of an INagLogger.
import { NagLoggerNotApplicableData } from 'cdk-nag'
const nagLoggerNotApplicableData: NagLoggerNotApplicableData = { ... }
Name | Type | Description |
---|---|---|
nagPackName |
string |
No description. |
resource |
aws-cdk-lib.CfnResource |
No description. |
ruleExplanation |
string |
No description. |
ruleId |
string |
No description. |
ruleInfo |
string |
No description. |
ruleLevel |
NagMessageLevel |
No description. |
ruleOriginalName |
string |
No description. |
public readonly nagPackName: string;
- Type: string
public readonly resource: CfnResource;
- Type: aws-cdk-lib.CfnResource
public readonly ruleExplanation: string;
- Type: string
public readonly ruleId: string;
- Type: string
public readonly ruleInfo: string;
- Type: string
public readonly ruleLevel: NagMessageLevel;
- Type: NagMessageLevel
public readonly ruleOriginalName: string;
- Type: string
Data for onSuppressed method of an INagLogger.
import { NagLoggerSuppressedData } from 'cdk-nag'
const nagLoggerSuppressedData: NagLoggerSuppressedData = { ... }
Name | Type | Description |
---|---|---|
nagPackName |
string |
No description. |
resource |
aws-cdk-lib.CfnResource |
No description. |
ruleExplanation |
string |
No description. |
ruleId |
string |
No description. |
ruleInfo |
string |
No description. |
ruleLevel |
NagMessageLevel |
No description. |
ruleOriginalName |
string |
No description. |
findingId |
string |
No description. |
suppressionReason |
string |
No description. |
public readonly nagPackName: string;
- Type: string
public readonly resource: CfnResource;
- Type: aws-cdk-lib.CfnResource
public readonly ruleExplanation: string;
- Type: string
public readonly ruleId: string;
- Type: string
public readonly ruleInfo: string;
- Type: string
public readonly ruleLevel: NagMessageLevel;
- Type: NagMessageLevel
public readonly ruleOriginalName: string;
- Type: string
public readonly findingId: string;
- Type: string
public readonly suppressionReason: string;
- Type: string
Data for onSuppressedError method of an INagLogger.
import { NagLoggerSuppressedErrorData } from 'cdk-nag'
const nagLoggerSuppressedErrorData: NagLoggerSuppressedErrorData = { ... }
Name | Type | Description |
---|---|---|
nagPackName |
string |
No description. |
resource |
aws-cdk-lib.CfnResource |
No description. |
ruleExplanation |
string |
No description. |
ruleId |
string |
No description. |
ruleInfo |
string |
No description. |
ruleLevel |
NagMessageLevel |
No description. |
ruleOriginalName |
string |
No description. |
errorMessage |
string |
No description. |
errorSuppressionReason |
string |
No description. |
public readonly nagPackName: string;
- Type: string
public readonly resource: CfnResource;
- Type: aws-cdk-lib.CfnResource
public readonly ruleExplanation: string;
- Type: string
public readonly ruleId: string;
- Type: string
public readonly ruleInfo: string;
- Type: string
public readonly ruleLevel: NagMessageLevel;
- Type: NagMessageLevel
public readonly ruleOriginalName: string;
- Type: string
public readonly errorMessage: string;
- Type: string
public readonly errorSuppressionReason: string;
- Type: string
Interface for creating a NagPack.
import { NagPackProps } from 'cdk-nag'
const nagPackProps: NagPackProps = { ... }
Name | Type | Description |
---|---|---|
additionalLoggers |
INagLogger[] |
Additional NagLoggers for logging rule validation outputs. |
logIgnores |
boolean |
Whether or not to log suppressed rule violations as informational messages (default: false). |
reportFormats |
NagReportFormat[] |
If reports are enabled, the output formats of compliance reports in the App's output directory (default: only CSV). |
reports |
boolean |
Whether or not to generate compliance reports for applied Stacks in the App's output directory (default: true). |
suppressionIgnoreCondition |
INagSuppressionIgnore |
Conditionally prevent rules from being suppressed (default: no user provided condition). |
verbose |
boolean |
Whether or not to enable extended explanatory descriptions on warning, error, and logged ignore messages (default: false). |
public readonly additionalLoggers: INagLogger[];
- Type: INagLogger[]
Additional NagLoggers for logging rule validation outputs.
public readonly logIgnores: boolean;
- Type: boolean
Whether or not to log suppressed rule violations as informational messages (default: false).
public readonly reportFormats: NagReportFormat[];
- Type: NagReportFormat[]
If reports are enabled, the output formats of compliance reports in the App's output directory (default: only CSV).
public readonly reports: boolean;
- Type: boolean
Whether or not to generate compliance reports for applied Stacks in the App's output directory (default: true).
public readonly suppressionIgnoreCondition: INagSuppressionIgnore;
- Type: INagSuppressionIgnore
Conditionally prevent rules from being suppressed (default: no user provided condition).
public readonly verbose: boolean;
- Type: boolean
Whether or not to enable extended explanatory descriptions on warning, error, and logged ignore messages (default: false).
Interface for creating a rule suppression.
import { NagPackSuppression } from 'cdk-nag'
const nagPackSuppression: NagPackSuppression = { ... }
Name | Type | Description |
---|---|---|
id |
string |
The id of the rule to ignore. |
reason |
string |
The reason to ignore the rule (minimum 10 characters). |
appliesTo |
string | RegexAppliesTo[] |
Rule specific granular suppressions. |
public readonly id: string;
- Type: string
The id of the rule to ignore.
public readonly reason: string;
- Type: string
The reason to ignore the rule (minimum 10 characters).
public readonly appliesTo: string | RegexAppliesTo[];
- Type: string | RegexAppliesTo[]
Rule specific granular suppressions.
import { NagReportLine } from 'cdk-nag'
const nagReportLine: NagReportLine = { ... }
Name | Type | Description |
---|---|---|
compliance |
string |
No description. |
exceptionReason |
string |
No description. |
resourceId |
string |
No description. |
ruleId |
string |
No description. |
ruleInfo |
string |
No description. |
ruleLevel |
string |
No description. |
public readonly compliance: string;
- Type: string
public readonly exceptionReason: string;
- Type: string
public readonly resourceId: string;
- Type: string
public readonly ruleId: string;
- Type: string
public readonly ruleInfo: string;
- Type: string
public readonly ruleLevel: string;
- Type: string
Props for the NagReportLogger.
import { NagReportLoggerProps } from 'cdk-nag'
const nagReportLoggerProps: NagReportLoggerProps = { ... }
Name | Type | Description |
---|---|---|
formats |
NagReportFormat[] |
No description. |
public readonly formats: NagReportFormat[];
- Type: NagReportFormat[]
import { NagReportSchema } from 'cdk-nag'
const nagReportSchema: NagReportSchema = { ... }
Name | Type | Description |
---|---|---|
lines |
NagReportLine[] |
No description. |
public readonly lines: NagReportLine[];
- Type: NagReportLine[]
A regular expression to apply to matching findings.
import { RegexAppliesTo } from 'cdk-nag'
const regexAppliesTo: RegexAppliesTo = { ... }
Name | Type | Description |
---|---|---|
regex |
string |
An ECMA-262 regex string. |
public readonly regex: string;
- Type: string
An ECMA-262 regex string.
Information about the NagRule and the relevant NagSuppression for the INagSuppressionIgnore.
import { SuppressionIgnoreInput } from 'cdk-nag'
const suppressionIgnoreInput: SuppressionIgnoreInput = { ... }
Name | Type | Description |
---|---|---|
findingId |
string |
No description. |
reason |
string |
No description. |
resource |
aws-cdk-lib.CfnResource |
No description. |
ruleId |
string |
No description. |
ruleLevel |
NagMessageLevel |
No description. |
public readonly findingId: string;
- Type: string
public readonly reason: string;
- Type: string
public readonly resource: CfnResource;
- Type: aws-cdk-lib.CfnResource
public readonly ruleId: string;
- Type: string
public readonly ruleLevel: NagMessageLevel;
- Type: NagMessageLevel
- Implements: INagLogger
A NagLogger that outputs to the CDK Annotations system.
import { AnnotationLogger } from 'cdk-nag'
new AnnotationLogger(props?: AnnotationLoggerProps)
Name | Type | Description |
---|---|---|
props |
AnnotationLoggerProps |
No description. |
- Type: AnnotationLoggerProps
Name | Description |
---|---|
onCompliance |
Called when a CfnResource passes the compliance check for a given rule. |
onError |
Called when a rule throws an error during while validating a CfnResource for compliance. |
onNonCompliance |
Called when a CfnResource does not pass the compliance check for a given rule and the the rule violation is not suppressed by the user. |
onNotApplicable |
Called when a rule does not apply to the given CfnResource. |
onSuppressed |
Called when a CfnResource does not pass the compliance check for a given rule and the rule violation is suppressed by the user. |
onSuppressedError |
Called when a rule throws an error during while validating a CfnResource for compliance and the error is suppressed. |
public onCompliance(_data: NagLoggerComplianceData): void
Called when a CfnResource passes the compliance check for a given rule.
- Type: NagLoggerComplianceData
public onError(data: NagLoggerErrorData): void
Called when a rule throws an error during while validating a CfnResource for compliance.
- Type: NagLoggerErrorData
public onNonCompliance(data: NagLoggerNonComplianceData): void
Called when a CfnResource does not pass the compliance check for a given rule and the the rule violation is not suppressed by the user.
public onNotApplicable(_data: NagLoggerNotApplicableData): void
Called when a rule does not apply to the given CfnResource.
public onSuppressed(data: NagLoggerSuppressedData): void
Called when a CfnResource does not pass the compliance check for a given rule and the rule violation is suppressed by the user.
- Type: NagLoggerSuppressedData
public onSuppressedError(data: NagLoggerSuppressedErrorData): void
Called when a rule throws an error during while validating a CfnResource for compliance and the error is suppressed.
Name | Type | Description |
---|---|---|
logIgnores |
boolean |
No description. |
verbose |
boolean |
No description. |
suppressionId |
string |
No description. |
public readonly logIgnores: boolean;
- Type: boolean
public readonly verbose: boolean;
- Type: boolean
public readonly suppressionId: string;
- Type: string
Check Best practices based on AWS Solutions Security Matrix.
import { AwsSolutionsChecks } from 'cdk-nag'
new AwsSolutionsChecks(props?: NagPackProps)
Name | Type | Description |
---|---|---|
props |
NagPackProps |
No description. |
- Type: NagPackProps
Name | Description |
---|---|
visit |
All aspects can visit an IConstruct. |
public visit(node: IConstruct): void
All aspects can visit an IConstruct.
- Type: constructs.IConstruct
Name | Type | Description |
---|---|---|
readPackName |
string |
No description. |
public readonly readPackName: string;
- Type: string
Check for HIPAA Security compliance.
Based on the HIPAA Security AWS operational best practices: https://docs.aws.amazon.com/config/latest/developerguide/operational-best-practices-for-hipaa_security.html
import { HIPAASecurityChecks } from 'cdk-nag'
new HIPAASecurityChecks(props?: NagPackProps)
Name | Type | Description |
---|---|---|
props |
NagPackProps |
No description. |
- Type: NagPackProps
Name | Description |
---|---|
visit |
All aspects can visit an IConstruct. |
public visit(node: IConstruct): void
All aspects can visit an IConstruct.
- Type: constructs.IConstruct
Name | Type | Description |
---|---|---|
readPackName |
string |
No description. |
public readonly readPackName: string;
- Type: string
- Implements: aws-cdk-lib.IAspect
Base class for all rule packs.
import { NagPack } from 'cdk-nag'
new NagPack(props?: NagPackProps)
Name | Type | Description |
---|---|---|
props |
NagPackProps |
No description. |
- Type: NagPackProps
Name | Description |
---|---|
visit |
All aspects can visit an IConstruct. |
public visit(node: IConstruct): void
All aspects can visit an IConstruct.
- Type: constructs.IConstruct
Name | Type | Description |
---|---|---|
readPackName |
string |
No description. |
public readonly readPackName: string;
- Type: string
- Implements: INagLogger
A NagLogger that creates compliance reports.
import { NagReportLogger } from 'cdk-nag'
new NagReportLogger(props: NagReportLoggerProps)
Name | Type | Description |
---|---|---|
props |
NagReportLoggerProps |
No description. |
- Type: NagReportLoggerProps
Name | Description |
---|---|
getFormatStacks |
No description. |
onCompliance |
Called when a CfnResource passes the compliance check for a given rule. |
onError |
Called when a rule throws an error during while validating a CfnResource for compliance. |
onNonCompliance |
Called when a CfnResource does not pass the compliance check for a given rule and the the rule violation is not suppressed by the user. |
onNotApplicable |
Called when a rule does not apply to the given CfnResource. |
onSuppressed |
Called when a CfnResource does not pass the compliance check for a given rule and the rule violation is suppressed by the user. |
onSuppressedError |
Called when a rule throws an error during while validating a CfnResource for compliance and the error is suppressed. |
public getFormatStacks(format: NagReportFormat): string[]
- Type: NagReportFormat
public onCompliance(data: NagLoggerComplianceData): void
Called when a CfnResource passes the compliance check for a given rule.
- Type: NagLoggerComplianceData
public onError(data: NagLoggerErrorData): void
Called when a rule throws an error during while validating a CfnResource for compliance.
- Type: NagLoggerErrorData
public onNonCompliance(data: NagLoggerNonComplianceData): void
Called when a CfnResource does not pass the compliance check for a given rule and the the rule violation is not suppressed by the user.
public onNotApplicable(data: NagLoggerNotApplicableData): void
Called when a rule does not apply to the given CfnResource.
public onSuppressed(data: NagLoggerSuppressedData): void
Called when a CfnResource does not pass the compliance check for a given rule and the rule violation is suppressed by the user.
- Type: NagLoggerSuppressedData
public onSuppressedError(data: NagLoggerSuppressedErrorData): void
Called when a rule throws an error during while validating a CfnResource for compliance and the error is suppressed.
Name | Type | Description |
---|---|---|
formats |
NagReportFormat[] |
No description. |
public readonly formats: NagReportFormat[];
- Type: NagReportFormat[]
Helper class with methods for rule creation.
import { NagRules } from 'cdk-nag'
new NagRules()
Name | Type | Description |
---|
Name | Description |
---|---|
resolveIfPrimitive |
Use in cases where a primitive value must be known to pass a rule. |
resolveResourceFromInstrinsic |
Use in cases where a token resolves to an intrinsic function and the referenced resource must be known to pass a rule. |
import { NagRules } from 'cdk-nag'
NagRules.resolveIfPrimitive(node: CfnResource, parameter: any)
Use in cases where a primitive value must be known to pass a rule.
https://developer.mozilla.org/en-US/docs/Glossary/Primitive
- Type: aws-cdk-lib.CfnResource
The CfnResource to check.
- Type: any
The value to attempt to resolve.
import { NagRules } from 'cdk-nag'
NagRules.resolveResourceFromInstrinsic(node: CfnResource, parameter: any)
Use in cases where a token resolves to an intrinsic function and the referenced resource must be known to pass a rule.
- Type: aws-cdk-lib.CfnResource
The CfnResource to check.
- Type: any
The value to attempt to resolve.
Helper class with methods to add cdk-nag suppressions to cdk resources.
import { NagSuppressions } from 'cdk-nag'
new NagSuppressions()
Name | Type | Description |
---|
Name | Description |
---|---|
addResourceSuppressions |
Add cdk-nag suppressions to a CfnResource and optionally its children. |
addResourceSuppressionsByPath |
Add cdk-nag suppressions to a CfnResource and optionally its children via its path. |
addStackSuppressions |
Apply cdk-nag suppressions to a Stack and optionally nested stacks. |
import { NagSuppressions } from 'cdk-nag'
NagSuppressions.addResourceSuppressions(construct: IConstruct | IConstruct[], suppressions: NagPackSuppression[], applyToChildren?: boolean)
Add cdk-nag suppressions to a CfnResource and optionally its children.
- Type: constructs.IConstruct | constructs.IConstruct[]
The IConstruct(s) to apply the suppression to.
- Type: NagPackSuppression[]
A list of suppressions to apply to the resource.
- Type: boolean
Apply the suppressions to children CfnResources (default:false).
import { NagSuppressions } from 'cdk-nag'
NagSuppressions.addResourceSuppressionsByPath(stack: Stack, path: string | string[], suppressions: NagPackSuppression[], applyToChildren?: boolean)
Add cdk-nag suppressions to a CfnResource and optionally its children via its path.
- Type: aws-cdk-lib.Stack
The Stack the construct belongs to.
- Type: string | string[]
The path(s) to the construct in the provided stack.
- Type: NagPackSuppression[]
A list of suppressions to apply to the resource.
- Type: boolean
Apply the suppressions to children CfnResources (default:false).
import { NagSuppressions } from 'cdk-nag'
NagSuppressions.addStackSuppressions(stack: Stack, suppressions: NagPackSuppression[], applyToNestedStacks?: boolean)
Apply cdk-nag suppressions to a Stack and optionally nested stacks.
- Type: aws-cdk-lib.Stack
The Stack to apply the suppression to.
- Type: NagPackSuppression[]
A list of suppressions to apply to the stack.
- Type: boolean
Apply the suppressions to children stacks (default:false).
Check for NIST 800-53 rev 4 compliance.
Based on the NIST 800-53 rev 4 AWS operational best practices: https://docs.aws.amazon.com/config/latest/developerguide/operational-best-practices-for-nist-800-53_rev_4.html
import { NIST80053R4Checks } from 'cdk-nag'
new NIST80053R4Checks(props?: NagPackProps)
Name | Type | Description |
---|---|---|
props |
NagPackProps |
No description. |
- Type: NagPackProps
Name | Description |
---|---|
visit |
All aspects can visit an IConstruct. |
public visit(node: IConstruct): void
All aspects can visit an IConstruct.
- Type: constructs.IConstruct
Name | Type | Description |
---|---|---|
readPackName |
string |
No description. |
public readonly readPackName: string;
- Type: string
Check for NIST 800-53 rev 5 compliance.
Based on the NIST 800-53 rev 5 AWS operational best practices: https://docs.aws.amazon.com/config/latest/developerguide/operational-best-practices-for-nist-800-53_rev_5.html
import { NIST80053R5Checks } from 'cdk-nag'
new NIST80053R5Checks(props?: NagPackProps)
Name | Type | Description |
---|---|---|
props |
NagPackProps |
No description. |
- Type: NagPackProps
Name | Description |
---|---|
visit |
All aspects can visit an IConstruct. |
public visit(node: IConstruct): void
All aspects can visit an IConstruct.
- Type: constructs.IConstruct
Name | Type | Description |
---|---|---|
readPackName |
string |
No description. |
public readonly readPackName: string;
- Type: string
Check for PCI DSS 3.2.1 compliance. Based on the PCI DSS 3.2.1 AWS operational best practices: https://docs.aws.amazon.com/config/latest/developerguide/operational-best-practices-for-pci-dss.html.
import { PCIDSS321Checks } from 'cdk-nag'
new PCIDSS321Checks(props?: NagPackProps)
Name | Type | Description |
---|---|---|
props |
NagPackProps |
No description. |
- Type: NagPackProps
Name | Description |
---|---|
visit |
All aspects can visit an IConstruct. |
public visit(node: IConstruct): void
All aspects can visit an IConstruct.
- Type: constructs.IConstruct
Name | Type | Description |
---|---|---|
readPackName |
string |
No description. |
public readonly readPackName: string;
- Type: string
- Implements: INagSuppressionIgnore
Always ignore the suppression.
import { SuppressionIgnoreAlways } from 'cdk-nag'
new SuppressionIgnoreAlways(triggerMessage: string)
Name | Type | Description |
---|---|---|
triggerMessage |
string |
No description. |
- Type: string
Name | Description |
---|---|
createMessage |
No description. |
public createMessage(_input: SuppressionIgnoreInput): string
- Type: SuppressionIgnoreInput
- Implements: INagSuppressionIgnore
Ignore the suppression if all of the given INagSuppressionIgnore return a non-empty message.
import { SuppressionIgnoreAnd } from 'cdk-nag'
new SuppressionIgnoreAnd(SuppressionIgnoreAnds: ...INagSuppressionIgnore[])
Name | Type | Description |
---|---|---|
SuppressionIgnoreAnds |
...INagSuppressionIgnore[] |
No description. |
- Type: ...INagSuppressionIgnore[]
Name | Description |
---|---|
createMessage |
No description. |
public createMessage(input: SuppressionIgnoreInput): string
- Type: SuppressionIgnoreInput
- Implements: INagSuppressionIgnore
Ignore Suppressions for Rules with a NagMessageLevel.ERROR.
import { SuppressionIgnoreErrors } from 'cdk-nag'
new SuppressionIgnoreErrors()
Name | Type | Description |
---|
Name | Description |
---|---|
createMessage |
No description. |
public createMessage(input: SuppressionIgnoreInput): string
- Type: SuppressionIgnoreInput
- Implements: INagSuppressionIgnore
Don't ignore the suppression.
import { SuppressionIgnoreNever } from 'cdk-nag'
new SuppressionIgnoreNever()
Name | Type | Description |
---|
Name | Description |
---|---|
createMessage |
No description. |
public createMessage(_input: SuppressionIgnoreInput): string
- Type: SuppressionIgnoreInput
- Implements: INagSuppressionIgnore
Ignore the suppression if any of the given INagSuppressionIgnore return a non-empty message.
import { SuppressionIgnoreOr } from 'cdk-nag'
new SuppressionIgnoreOr(orSuppressionIgnores: ...INagSuppressionIgnore[])
Name | Type | Description |
---|---|---|
orSuppressionIgnores |
...INagSuppressionIgnore[] |
No description. |
- Type: ...INagSuppressionIgnore[]
Name | Description |
---|---|
createMessage |
No description. |
public createMessage(input: SuppressionIgnoreInput): string
- Type: SuppressionIgnoreInput
- Implemented By: IApplyRule
Interface for JSII interoperability for passing parameters and the Rule Callback to @applyRule method.
Name | Description |
---|---|
rule |
The callback to the rule. |
public rule(node: CfnResource): NagRuleCompliance | string[]
The callback to the rule.
- Type: aws-cdk-lib.CfnResource
The CfnResource to check.
Name | Type | Description |
---|---|---|
explanation |
string |
Why the rule exists. |
info |
string |
Why the rule was triggered. |
level |
NagMessageLevel |
The annotations message level to apply to the rule if triggered. |
node |
aws-cdk-lib.CfnResource |
The CfnResource to check. |
ignoreSuppressionCondition |
INagSuppressionIgnore |
A condition in which a suppression should be ignored. |
ruleSuffixOverride |
string |
Override for the suffix of the Rule ID for this rule. |
public readonly explanation: string;
- Type: string
Why the rule exists.
public readonly info: string;
- Type: string
Why the rule was triggered.
public readonly level: NagMessageLevel;
- Type: NagMessageLevel
The annotations message level to apply to the rule if triggered.
public readonly node: CfnResource;
- Type: aws-cdk-lib.CfnResource
The CfnResource to check.
public readonly ignoreSuppressionCondition: INagSuppressionIgnore;
- Type: INagSuppressionIgnore
A condition in which a suppression should be ignored.
public readonly ruleSuffixOverride: string;
- Type: string
Override for the suffix of the Rule ID for this rule.
- Implemented By: AnnotationLogger, NagReportLogger, INagLogger
Interface for creating NagSuppression Ignores.
Name | Description |
---|---|
onCompliance |
Called when a CfnResource passes the compliance check for a given rule. |
onError |
Called when a rule throws an error during while validating a CfnResource for compliance. |
onNonCompliance |
Called when a CfnResource does not pass the compliance check for a given rule and the the rule violation is not suppressed by the user. |
onNotApplicable |
Called when a rule does not apply to the given CfnResource. |
onSuppressed |
Called when a CfnResource does not pass the compliance check for a given rule and the rule violation is suppressed by the user. |
onSuppressedError |
Called when a rule throws an error during while validating a CfnResource for compliance and the error is suppressed. |
public onCompliance(data: NagLoggerComplianceData): void
Called when a CfnResource passes the compliance check for a given rule.
- Type: NagLoggerComplianceData
public onError(data: NagLoggerErrorData): void
Called when a rule throws an error during while validating a CfnResource for compliance.
- Type: NagLoggerErrorData
public onNonCompliance(data: NagLoggerNonComplianceData): void
Called when a CfnResource does not pass the compliance check for a given rule and the the rule violation is not suppressed by the user.
public onNotApplicable(data: NagLoggerNotApplicableData): void
Called when a rule does not apply to the given CfnResource.
public onSuppressed(data: NagLoggerSuppressedData): void
Called when a CfnResource does not pass the compliance check for a given rule and the rule violation is suppressed by the user.
- Type: NagLoggerSuppressedData
public onSuppressedError(data: NagLoggerSuppressedErrorData): void
Called when a rule throws an error during while validating a CfnResource for compliance and the error is suppressed.
- Implemented By: SuppressionIgnoreAlways, SuppressionIgnoreAnd, SuppressionIgnoreErrors, SuppressionIgnoreNever, SuppressionIgnoreOr, INagSuppressionIgnore
Interface for creating NagSuppression Ignores.
Name | Description |
---|---|
createMessage |
No description. |
public createMessage(input: SuppressionIgnoreInput): string
- Type: SuppressionIgnoreInput
The severity level of the rule.
Name | Description |
---|---|
WARN |
No description. |
ERROR |
No description. |
Possible output formats of the NagReport.
Name | Description |
---|---|
CSV |
No description. |
JSON |
No description. |
The compliance level of a resource in relation to a rule.
Name | Description |
---|---|
COMPLIANT |
No description. |
NON_COMPLIANT |
No description. |
NOT_APPLICABLE |
No description. |
Additional states a rule can be in post compliance validation.
Name | Description |
---|---|
SUPPRESSED |
No description. |
UNKNOWN |
No description. |