Skip to content

Commit

Permalink
fix: broken links in markdown and typos in log messages (#1572)
Browse files Browse the repository at this point in the history
Fixes #1571
  • Loading branch information
quixoticmonk authored Jan 24, 2024
1 parent 5cb2240 commit f2f4d5e
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ Error: Suppression path "/this/construct/path" did not match any resource. This
See [this issue](https://github.com/aws/aws-cdk/issues/18440) for more information.

<details>
<summary>Example) Supressing Violations in Pipelines</summary>
<summary>Example) Suppressing Violations in Pipelines</summary>

`example-app.ts`

Expand Down
12 changes: 6 additions & 6 deletions RULES.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/IgnoreSuppressionConditions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ As a [NagPack](./NagPack.md) author or user, you can optionally create a conditi

## Creating A Condition

Conditions implement the `INagSuppressionIgnore` interface. They return a message string when the `createMessage()` method is called. If the method returns a non-empty string the suppression is ignored. Conversely if the method returns an empty string the suppression is allowed.
Conditions implement the `INagSuppressionIgnore` interface. They return a message string when the `createMessage()` method is called. If the method returns a non-empty string the suppression is ignored. Conversely, if the method returns an empty string the suppression is allowed.

Here is an example of a re-usable condition class that ignores a suppression if the suppression reason doesn't contain the word `Arun`

Expand Down
2 changes: 1 addition & 1 deletion docs/NagLogger.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SPDX-License-Identifier: Apache-2.0
`NagLogger`s implement the `INagLogger` interface. Corresponding `INagLogger` method of a loggers is called after a `CfnResource` is evaluated against a `NagRule`. Each of these methods are passed information that relate to the validation state.

1. The `onCompliance` method is called when a CfnResource passes the compliance check for a given rule.
2. The `onNonCompliance` method is 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.
2. The `onNonCompliance` method is called when a CfnResource does not pass the compliance check for a given rule and the rule violation is not suppressed by the user.
3. The `onSuppressed` method is called when a CfnResource does not pass the compliance check for a given rule **and** the rule violation is suppressed by the user.
4. The `onError` method is called when a rule throws an error during while validating a CfnResource for compliance.
5. The `onSuppressedError` method is called when a rule throws an error during while validating a CfnResource for compliance **and** the error is suppressed.
Expand Down
2 changes: 1 addition & 1 deletion docs/NagPack.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SPDX-License-Identifier: Apache-2.0

# NagPack

A `NagPack` is a named collection of [rules](./RuleCreation.md) that can be used to validate your stacks and applications. All of the [pre-built packs](../README.md#available-packs) are `NagPacks`.
A `NagPack` is a named collection of [rules](./RuleCreation.md) that can be used to validate your stacks and applications. All of the [pre-built packs](../README.md#available-rules-and-packs) are `NagPacks`.

## Creating a NagPack

Expand Down
2 changes: 1 addition & 1 deletion docs/RuleCreation.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A rule returns a `NagRuleResult` which is either a `NagRuleCompliance` status or
- `NagRuleCompliance.COMPLIANT` - The resource that **meets** the requirements.
- `NagRuleCompliance.NOT_APPLICABLE` - The rule **does not apply** to the given resource.
- Ex. The current resource is a S3 Bucket but the rule is for validating DMS Replication Instances.
- `NagRuleFindings` A a string array with a list of all findings.
- `NagRuleFindings` A string array with a list of all findings.

```typescript
import { CfnResource } from 'aws-cdk-lib';
Expand Down
4 changes: 2 additions & 2 deletions src/nag-logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ export class NagReportLogger implements INagLogger {
body = JSON.stringify({ lines: [] } as NagReportSchema);
} else {
throw new Error(
`Unrecognized ouput format ${format} for the NagReportLogger`
`Unrecognized output format ${format} for the NagReportLogger`
);
}
writeFileSync(filePath, body);
Expand Down Expand Up @@ -368,7 +368,7 @@ export class NagReportLogger implements INagLogger {
writeFileSync(filePath, JSON.stringify(report));
} else {
throw new Error(
`Unrecognized ouput format ${format} for the NagReportLogger`
`Unrecognized output format ${format} for the NagReportLogger`
);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/packs/aws-solutions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export class AwsSolutionsChecks extends NagPack {
ruleSuffixOverride: 'EB1',
info: 'The Elastic Beanstalk environment is not configured to use a specific VPC.',
explanation:
'Use a non-default VPC in order to seperate your environment from default resources.',
'Use a non-default VPC in order to separate your environment from default resources.',
level: NagMessageLevel.ERROR,
rule: ElasticBeanstalkVPCSpecified,
node: node,
Expand Down Expand Up @@ -725,7 +725,7 @@ export class AwsSolutionsChecks extends NagPack {
ruleSuffixOverride: 'RS11',
info: 'The Redshift cluster does not have user activity logging enabled.',
explanation:
'User activity logging logs each query before it is performed on the clusters databse. To enable this feature associate a Resdhsift Cluster Parameter Group with the "enable_user_activity_logging" parameter set to "true".',
'User activity logging logs each query before it is performed on the clusters database. To enable this feature associate a Redshift Cluster Parameter Group with the "enable_user_activity_logging" parameter set to "true".',
level: NagMessageLevel.ERROR,
rule: RedshiftClusterUserActivityLogging,
node: node,
Expand Down Expand Up @@ -1326,7 +1326,7 @@ export class AwsSolutionsChecks extends NagPack {
ruleSuffixOverride: 'SF2',
info: 'The Step Function does not have X-Ray tracing enabled.',
explanation:
'X-ray provides an end-to-end view of how an application is performing. This helps operators to discover performance issues, detect permission problems, and track requests made to and from other AWS services.',
'X-Ray provides an end-to-end view of how an application is performing. This helps operators to discover performance issues, detect permission problems, and track requests made to and from other AWS services.',
level: NagMessageLevel.ERROR,
rule: StepFunctionStateMachineXray,
node: node,
Expand Down
2 changes: 1 addition & 1 deletion src/packs/nist-800-53-r5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export class NIST80053R5Checks extends NagPack {
*/
private checkAutoScaling(node: CfnResource): void {
this.applyRule({
info: 'The Auto Scaling group (which is associated with a load balancer) does not utilize ELB healthchecks - (Control IDs: AU-12(3), AU-14a, AU-14b, CA-2(2), CA-7, CA-7b, CM-6a, CM-9b, PM-14a.1, PM-14b, PM-31, SC-6, SC-36(1)(a), SI-2a).',
info: 'The Auto Scaling group (which is associated with a load balancer) does not utilize ELB health checks - (Control IDs: AU-12(3), AU-14a, AU-14b, CA-2(2), CA-7, CA-7b, CM-6a, CM-9b, PM-14a.1, PM-14b, PM-31, SC-6, SC-36(1)(a), SI-2a).',
explanation:
'The Elastic Load Balancer (ELB) health checks for Amazon Elastic Compute Cloud (Amazon EC2) Auto Scaling groups support maintenance of adequate capacity and availability. The load balancer periodically sends pings, attempts connections, or sends requests to test Amazon EC2 instances health in an auto-scaling group. If an instance is not reporting back, traffic is sent to a new Amazon EC2 instance.',
level: NagMessageLevel.ERROR,
Expand Down
2 changes: 1 addition & 1 deletion src/packs/pci-dss-321.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export class PCIDSS321Checks extends NagPack {
*/
private checkAutoScaling(node: CfnResource): void {
this.applyRule({
info: 'The Auto Scaling group (which is associated with a load balancer) does not utilize ELB healthchecks - (Control ID: 2.2).',
info: 'The Auto Scaling group (which is associated with a load balancer) does not utilize ELB health checks - (Control ID: 2.2).',
explanation:
'The Elastic Load Balancer (ELB) health checks for Amazon Elastic Compute Cloud (Amazon EC2) Auto Scaling groups support maintenance of adequate capacity and availability. The load balancer periodically sends pings, attempts connections, or sends requests to test Amazon EC2 instances health in an auto-scaling group. If an instance is not reporting back, traffic is sent to a new Amazon EC2 instance.',
level: NagMessageLevel.ERROR,
Expand Down

0 comments on commit f2f4d5e

Please sign in to comment.