Giter VIP home page Giter VIP logo

cdk-nag's Introduction

cdk-nag

PyPI version npm version Maven version NuGet version Go version

View on Construct Hub

Check CDK applications or CloudFormation templates for best practices using a combination of available rule packs. Inspired by cfn_nag.

Check out this blog post for a guided overview!

demo

Available Rules and Packs

See RULES for more information on all the available packs.

  1. AWS Solutions
  2. HIPAA Security
  3. NIST 800-53 rev 4
  4. NIST 800-53 rev 5
  5. PCI DSS 3.2.1

RULES also includes a collection of additional rules that are not currently included in any of the pre-built NagPacks, but are still available for inclusion in custom NagPacks.

Read the NagPack developer docs if you are interested in creating your own pack.

Usage

For a full list of options See NagPackProps in the API.md

Including in an application
import { App, Aspects } from 'aws-cdk-lib';
import { CdkTestStack } from '../lib/cdk-test-stack';
import { AwsSolutionsChecks } from 'cdk-nag';

const app = new App();
new CdkTestStack(app, 'CdkNagDemo');
// Simple rule informational messages
Aspects.of(app).add(new AwsSolutionsChecks());
// Additional explanations on the purpose of triggered rules
// Aspects.of(stack).add(new AwsSolutionsChecks({ verbose: true }));

Suppressing a Rule

Example 1) Default Construct
import { SecurityGroup, Vpc, Peer, Port } from 'aws-cdk-lib/aws-ec2';
import { Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { NagSuppressions } from 'cdk-nag';

export class CdkTestStack extends Stack {
  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);
    const test = new SecurityGroup(this, 'test', {
      vpc: new Vpc(this, 'vpc'),
    });
    test.addIngressRule(Peer.anyIpv4(), Port.allTraffic());
    NagSuppressions.addResourceSuppressions(test, [
      { id: 'AwsSolutions-EC23', reason: 'lorem ipsum' },
    ]);
  }
}
Example 2) On Multiple Constructs
import { SecurityGroup, Vpc, Peer, Port } from 'aws-cdk-lib/aws-ec2';
import { Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { NagSuppressions } from 'cdk-nag';

export class CdkTestStack extends Stack {
  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);
    const vpc = new Vpc(this, 'vpc');
    const test1 = new SecurityGroup(this, 'test', { vpc });
    test1.addIngressRule(Peer.anyIpv4(), Port.allTraffic());
    const test2 = new SecurityGroup(this, 'test', { vpc });
    test2.addIngressRule(Peer.anyIpv4(), Port.allTraffic());
    NagSuppressions.addResourceSuppressions(
      [test1, test2],
      [{ id: 'AwsSolutions-EC23', reason: 'lorem ipsum' }]
    );
  }
}
Example 3) Child Constructs
import { User, PolicyStatement } from 'aws-cdk-lib/aws-iam';
import { Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { NagSuppressions } from 'cdk-nag';

export class CdkTestStack extends Stack {
  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);
    const user = new User(this, 'rUser');
    user.addToPolicy(
      new PolicyStatement({
        actions: ['s3:PutObject'],
        resources: ['arn:aws:s3:::bucket_name/*'],
      })
    );
    // Enable adding suppressions to child constructs
    NagSuppressions.addResourceSuppressions(
      user,
      [
        {
          id: 'AwsSolutions-IAM5',
          reason: 'lorem ipsum',
          appliesTo: ['Resource::arn:aws:s3:::bucket_name/*'], // optional
        },
      ],
      true
    );
  }
}
Example 4) Stack Level
import { App, Aspects } from 'aws-cdk-lib';
import { CdkTestStack } from '../lib/cdk-test-stack';
import { AwsSolutionsChecks, NagSuppressions } from 'cdk-nag';

const app = new App();
const stack = new CdkTestStack(app, 'CdkNagDemo');
Aspects.of(app).add(new AwsSolutionsChecks());
NagSuppressions.addStackSuppressions(stack, [
  { id: 'AwsSolutions-EC23', reason: 'lorem ipsum' },
]);
Example 5) Construct path

If you received the following error on synth/deploy

[Error at /StackName/Custom::CDKBucketDeployment8675309/ServiceRole/Resource] AwsSolutions-IAM4: The IAM user, role, or group uses AWS managed policies
import { Bucket } from 'aws-cdk-lib/aws-s3';
import { BucketDeployment } from 'aws-cdk-lib/aws-s3-deployment';
import { Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { NagSuppressions } from 'cdk-nag';

export class CdkTestStack extends Stack {
  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);
    new BucketDeployment(this, 'rDeployment', {
      sources: [],
      destinationBucket: Bucket.fromBucketName(this, 'rBucket', 'foo'),
    });
    NagSuppressions.addResourceSuppressionsByPath(
      this,
      '/StackName/Custom::CDKBucketDeployment8675309/ServiceRole/Resource',
      [{ id: 'AwsSolutions-IAM4', reason: 'at least 10 characters' }]
    );
  }
}
Example 6) Granular Suppressions of findings

Certain rules support granular suppressions of findings. If you received the following errors on synth/deploy

[Error at /StackName/rFirstUser/DefaultPolicy/Resource] AwsSolutions-IAM5[Action::s3:*]: The IAM entity contains wildcard permissions and does not have a cdk-nag rule suppression with evidence for those permission.
[Error at /StackName/rFirstUser/DefaultPolicy/Resource] AwsSolutions-IAM5[Resource::*]: The IAM entity contains wildcard permissions and does not have a cdk-nag rule suppression with evidence for those permission.
[Error at /StackName/rSecondUser/DefaultPolicy/Resource] AwsSolutions-IAM5[Action::s3:*]: The IAM entity contains wildcard permissions and does not have a cdk-nag rule suppression with evidence for those permission.
[Error at /StackName/rSecondUser/DefaultPolicy/Resource] AwsSolutions-IAM5[Resource::*]: The IAM entity contains wildcard permissions and does not have a cdk-nag rule suppression with evidence for those permission.

By applying the following suppressions

import { User } from 'aws-cdk-lib/aws-iam';
import { Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { NagSuppressions } from 'cdk-nag';

export class CdkTestStack extends Stack {
  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);
    const firstUser = new User(this, 'rFirstUser');
    firstUser.addToPolicy(
      new PolicyStatement({
        actions: ['s3:*'],
        resources: ['*'],
      })
    );
    const secondUser = new User(this, 'rSecondUser');
    secondUser.addToPolicy(
      new PolicyStatement({
        actions: ['s3:*'],
        resources: ['*'],
      })
    );
    const thirdUser = new User(this, 'rSecondUser');
    thirdUser.addToPolicy(
      new PolicyStatement({
        actions: ['sqs:CreateQueue'],
        resources: [`arn:aws:sqs:${this.region}:${this.account}:*`],
      })
    );
    NagSuppressions.addResourceSuppressions(
      firstUser,
      [
        {
          id: 'AwsSolutions-IAM5',
          reason:
            "Only suppress AwsSolutions-IAM5 's3:*' finding on First User.",
          appliesTo: ['Action::s3:*'],
        },
      ],
      true
    );
    NagSuppressions.addResourceSuppressions(
      secondUser,
      [
        {
          id: 'AwsSolutions-IAM5',
          reason: 'Suppress all AwsSolutions-IAM5 findings on Second User.',
        },
      ],
      true
    );
    NagSuppressions.addResourceSuppressions(
      thirdUser,
      [
        {
          id: 'AwsSolutions-IAM5',
          reason: 'Suppress AwsSolutions-IAM5 on the SQS resource.',
          appliesTo: [
            {
              regex: '/^Resource::arn:aws:sqs:(.*):\\*$/g',
            },
          ],
        },
      ],
      true
    );
  }
}

You would see the following error on synth/deploy

[Error at /StackName/rFirstUser/DefaultPolicy/Resource] AwsSolutions-IAM5[Resource::*]: The IAM entity contains wildcard permissions and does not have a cdk-nag rule suppression with evidence for those permission.

Suppressing aws-cdk-lib/pipelines Violations

The aws-cdk-lib/pipelines.CodePipeline construct and its child constructs are not guaranteed to be "Visited" by Aspects, as they are not added during the "Construction" phase of the cdk lifecycle. Because of this behavior, you may experience problems such as rule violations not appearing or the inability to suppress violations on these constructs.

You can remediate these rule violation and suppression problems by forcing the pipeline construct creation forward by calling .buildPipeline() on your CodePipeline object. Otherwise you may see errors such as:

Error: Suppression path "/this/construct/path" did not match any resource. This can occur when a resource does not exist or if a suppression is applied before a resource is created.

See this issue for more information.

Example) Suppressing Violations in Pipelines

example-app.ts

import { App, Aspects } from 'aws-cdk-lib';
import { AwsSolutionsChecks } from 'cdk-nag';
import { ExamplePipeline } from '../lib/example-pipeline';

const app = new App();
new ExamplePipeline(app, 'example-cdk-pipeline');
Aspects.of(app).add(new AwsSolutionsChecks({ verbose: true }));
app.synth();

example-pipeline.ts

import { Stack, StackProps } from 'aws-cdk-lib';
import { Repository } from 'aws-cdk-lib/aws-codecommit';
import {
  CodePipeline,
  CodePipelineSource,
  ShellStep,
} from 'aws-cdk-lib/pipelines';
import { NagSuppressions } from 'cdk-nag';
import { Construct } from 'constructs';

export class ExamplePipeline extends Stack {
  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);

    const exampleSynth = new ShellStep('ExampleSynth', {
      commands: ['yarn build --frozen-lockfile'],
      input: CodePipelineSource.codeCommit(
        new Repository(this, 'ExampleRepo', { repositoryName: 'ExampleRepo' }),
        'main'
      ),
    });

    const ExamplePipeline = new CodePipeline(this, 'ExamplePipeline', {
      synth: exampleSynth,
    });

    // Force the pipeline construct creation forward before applying suppressions.
    // @See https://github.com/aws/aws-cdk/issues/18440
    ExamplePipeline.buildPipeline();

    // The path suppression will error if you comment out "ExamplePipeline.buildPipeline();""
    NagSuppressions.addResourceSuppressionsByPath(
      this,
      '/example-cdk-pipeline/ExamplePipeline/Pipeline/ArtifactsBucket/Resource',
      [
        {
          id: 'AwsSolutions-S1',
          reason: 'Because I said so',
        },
      ]
    );
  }
}

Rules and Property Overrides

In some cases L2 Constructs do not have a native option to remediate an issue and must be fixed via Raw Overrides. Since raw overrides take place after template synthesis these fixes are not caught by cdk-nag. In this case you should remediate the issue and suppress the issue like in the following example.

Example) Property Overrides
import {
  Instance,
  InstanceType,
  InstanceClass,
  MachineImage,
  Vpc,
  CfnInstance,
} from 'aws-cdk-lib/aws-ec2';
import { Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { NagSuppressions } from 'cdk-nag';

export class CdkTestStack extends Stack {
  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);
    const instance = new Instance(this, 'rInstance', {
      vpc: new Vpc(this, 'rVpc'),
      instanceType: new InstanceType(InstanceClass.T3),
      machineImage: MachineImage.latestAmazonLinux(),
    });
    const cfnIns = instance.node.defaultChild as CfnInstance;
    cfnIns.addPropertyOverride('DisableApiTermination', true);
    NagSuppressions.addResourceSuppressions(instance, [
      {
        id: 'AwsSolutions-EC29',
        reason: 'Remediated through property override.',
      },
    ]);
  }
}

Conditionally Ignoring Suppressions

You can optionally create a condition that prevents certain rules from being suppressed. You can create conditions for any variety of reasons. Examples include a condition that always ignores a suppression, a condition that ignores a suppression based on the date, a condition that ignores a suppression based on the reason. You can read the developer docs for more information on creating your own conditions.

Example) Using the pre-built `SuppressionIgnoreErrors` class to ignore suppressions on any `Error` level rules.
import { App, Aspects } from 'aws-cdk-lib';
import { CdkTestStack } from '../lib/cdk-test-stack';
import { AwsSolutionsChecks, SuppressionIgnoreErrors } from 'cdk-nag';

const app = new App();
new CdkTestStack(app, 'CdkNagDemo');
// Ignore Suppressions on any errors
Aspects.of(app).add(
  new AwsSolutionsChecks({
    suppressionIgnoreCondition: new SuppressionIgnoreErrors(),
  })
);

Customizing Logging

NagLoggers give NagPack authors and users the ability to create their own custom reporting mechanisms. All pre-built NagPackscome with the AnnotationsLoggerand the NagReportLogger (with CSV reports) enabled by default.

See the NagLogger developer docs for more information.

Example) Adding the `ExtremelyHelpfulConsoleLogger` example from the NagLogger docs
import { App, Aspects } from 'aws-cdk-lib';
import { CdkTestStack } from '../lib/cdk-test-stack';
import { ExtremelyHelpfulConsoleLogger } from './docs/NagLogger';
import { AwsSolutionsChecks } from 'cdk-nag';

const app = new App();
new CdkTestStack(app, 'CdkNagDemo');
Aspects.of(app).add(
  new AwsSolutionsChecks({
    additionalLoggers: [new ExtremelyHelpfulConsoleLogger()],
  })
);

Using on CloudFormation templates

You can use cdk-nag on existing CloudFormation templates by using the cloudformation-include module.

Example 1) CloudFormation template with suppression

Sample CloudFormation template with suppression

{
  "Resources": {
    "rBucket": {
      "Type": "AWS::S3::Bucket",
      "Properties": {
        "BucketName": "some-bucket-name"
      },
      "Metadata": {
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "id": "AwsSolutions-S1",
              "reason": "at least 10 characters"
            }
          ]
        }
      }
    }
  }
}

Sample App

import { App, Aspects } from 'aws-cdk-lib';
import { CdkTestStack } from '../lib/cdk-test-stack';
import { AwsSolutionsChecks } from 'cdk-nag';

const app = new App();
new CdkTestStack(app, 'CdkNagDemo');
Aspects.of(app).add(new AwsSolutionsChecks());

Sample Stack with imported template

import { CfnInclude } from 'aws-cdk-lib/cloudformation-include';
import { NagSuppressions } from 'cdk-nag';
import { Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';

export class CdkTestStack extends Stack {
  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);
    new CfnInclude(this, 'Template', {
      templateFile: 'my-template.json',
    });
    // Add any additional suppressions
    NagSuppressions.addResourceSuppressionsByPath(
      this,
      '/CdkNagDemo/Template/rBucket',
      [
        {
          id: 'AwsSolutions-S2',
          reason: 'at least 10 characters',
        },
      ]
    );
  }
}
Example 2) CloudFormation template with granular suppressions

Sample CloudFormation template with suppression

{
  "Resources": {
    "myPolicy": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": [
                "kms:Decrypt",
                "kms:DescribeKey",
                "kms:Encrypt",
                "kms:ReEncrypt*",
                "kms:GenerateDataKey*"
              ],
              "Effect": "Allow",
              "Resource": ["some-key-arn"]
            }
          ],
          "Version": "2012-10-17"
        }
      },
      "Metadata": {
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "id": "AwsSolutions-IAM5",
              "reason": "Allow key data access",
              "applies_to": [
                "Action::kms:ReEncrypt*",
                "Action::kms:GenerateDataKey*"
              ]
            }
          ]
        }
      }
    }
  }
}

Sample App

import { App, Aspects } from 'aws-cdk-lib';
import { CdkTestStack } from '../lib/cdk-test-stack';
import { AwsSolutionsChecks } from 'cdk-nag';

const app = new App();
new CdkTestStack(app, 'CdkNagDemo');
Aspects.of(app).add(new AwsSolutionsChecks());

Sample Stack with imported template

import { CfnInclude } from 'aws-cdk-lib/cloudformation-include';
import { NagSuppressions } from 'cdk-nag';
import { Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';

export class CdkTestStack extends Stack {
  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);
    new CfnInclude(this, 'Template', {
      templateFile: 'my-template.json',
    });
    // Add any additional suppressions
    NagSuppressions.addResourceSuppressionsByPath(
      this,
      '/CdkNagDemo/Template/myPolicy',
      [
        {
          id: 'AwsSolutions-IAM5',
          reason: 'Allow key data access',
          appliesTo: ['Action::kms:ReEncrypt*', 'Action::kms:GenerateDataKey*'],
        },
      ]
    );
  }
}

Contributing

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

cdk-nag's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cdk-nag's Issues

Check codebuild repo URL for sensitive info

Control IDs:
SA-3(a)

Rulename:
codebuild-project-source-repo-url-check

Story:
As an AWS developer
I would like to check if my Codebuild configuration is compliant (repo URL does not contain sensitive information such as access tokens, usernames, passwords)
So that I can check if my application conforms with Control ID SA-3(a) within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant Codebuild resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant Codebuild resource for Control ID SA-3(a) within NIST 800-53 .
  • Given a CDK stack with a compliant Codebuild resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control ID SA-3(a) within NIST 800-53.
  • Given a CDK stack without a Codebuild resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control ID SA-3(a) within NIST 800-53.

Ensure ELBs are load balanced across AZs

Control IDs:
SC-5, CP-10

Rulename:
elb-cross-zone-load-balancing-enabled

Story:
As an AWS developer
I would like to check if my ELB configuration is compliant (load balanced across AZs)
So that I can check if my application conforms with Control IDs SC-5, CP-10 within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant ELB resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant ELB resource for Control IDs SC-5, CP-10 within NIST 800-53.
  • Given a CDK stack with a compliant ELB resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs SC-5, CP-10 within NIST 800-53.
  • Given a CDK stack without a ELB resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs SC-5, CP-10 within NIST 800-53.

NIST.800.53 - CloudTrail CloudWatch Logs Enabled

Used to verify compliance with these Control IDs:
AC-2(4), AC-2(g), AU-2(a)(d), AU-3, AU-6(1)(3), AU-7(1), AU-12(a)(c), CA-7(a)(b), SI-4(2), SI-4(4), SI-4(5),
SI-4(a)(b)(c)

Story:
As an AWS consultant, I would like to check that CloudTrail has CloudWatch logs enabled so that I can check if my application conforms with the above NIST standards

Acceptance Criteria:
Given a CDK stack with a non-compliant CloudTrail configuration

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant configuration for AU-2 NIST standard

Given a CDK stack with a compliant CloudTrail configuration

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about the compliant configuration for AU-2 NIST standard

Given a CDK stack with no CloudTrail resources or configuration

  • When NIST-503 Secure Aspects is run
    -Then the CDK stack deploys and the consultant does not receive an explanation about AU-2 NIST standard

Ensure EC2 Instances have all common ports restricted

Control IDs:
AC-4, CM-2, SC-7, SC-7(3)

Rulename:
restricted-common-ports

Story:
As an AWS developer
I would like to check if my EC2 configuration is compliant (all common ports restricted)
So that I can check if my application conforms with Control IDs AC-4, CM-2, SC-7, SC-7(3) within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant EC2 resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant EC2 resource for Control IDs AC-4, CM-2, SC-7, SC-7(3) within NIST 800-53 .
  • Given a CDK stack with a compliant EC2 resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-4, CM-2, SC-7, SC-7(3) within NIST 800-53.
  • Given a CDK stack without an EC2 resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-4, CM-2, SC-7, SC-7(3) within NIST 800-53.

NIST 800.53 - Ensure Secrets Manager Has Successful Key Rotation

Currently marked as unable to be implemented via aspects

secretsmanager-scheduled-rotation-success-check

Used to verify compliance with these Control IDs:
AC-2(1) and AC-2(j)

Story:
As an AWS consultant, I would like to check if my AWS Secrets Manager secrets have rotated successfully according to the rotation schedule s o that I can check if my application conforms with the above NIST standards

Acceptance Criteria:
Given a CDK stack with a non-compliant Secrets Manager resource

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant resource for AC-2(1) NIST standard

Given a CDK stack with a compliant Secrets Manager resource and other compliant resources

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about the compliant resource for AC-2(1) NIST standard

Given a CDK stack with no Secrets Manager resources and other compliant resources

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about AC-2(1) NIST standard

Ensure ELB autoscaling group healthchecks are required

Control IDs:
SC-5

Rulename:
autoscaling-group-elb-healthcheck-required

Story:
As an AWS developer
I would like to check if my ELB autoscaling group configuration is compliant (healthchecks required)
So that I can check if my application conforms with Control ID SC-5 within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant ELB autoscaling resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant ELB autoscaling resource for Control ID SC-5 within NIST 800-53.
  • Given a CDK stack with a compliant ELB autoscaling resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control ID SC-5 within NIST 800-53.
  • Given a CDK stack without a ELB autoscaling resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control ID SC-5 within NIST 800-53.

Ensure that the VPC default Security Group is closed

Control IDs:
AC-4, SC-7, SC-7(3)

Rulename:
vpc-default-security-group-closed

Story:
As an AWS developer
I would like to check if my VPC configuration is compliant (default security group is closed)
So that I can check if my application conforms with Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant VPC resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant VPC resource for Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53.
  • Given a CDK stack with a compliant VPC resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53.
  • Given a CDK stack without a VPC resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53.

NIST 800.53 - Ensure CMK Backing Key Rotation is Enabled

Currently marked as unable to be implemented via aspects

cmk-backing-key-rotation-enabled

Used to verify compliance with these Control IDs:
SC-12

Story:
As an AWS consultant, I would like to ensure that my symmetric AWS KMS keys have key rotation enabled so that I can check if my application conforms with the SC-12 NIST standard

Acceptance Criteria:
Given a CDK stack with a non-compliant KMS key
When NIST-503 Secure Aspects is run
Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant key for SC-12 NIST standard

Given a CDK stack with compliant KMS key(s)
When NIST-503 Secure Aspects is run
Then the CDK stack deploys and the consultant does not receive an explanation about the compliant key(s) for SC-12 NIST standard

Given a CDK stack with no KMS keys or configuration
When NIST-503 Secure Aspects is run
Then the CDK stack deploys and the consultant does not receive an explanation about SC-12 NIST standard

Ensure elasticsearch is node-to-node encrypted

Control IDs:
S7, SC-8, SC-8(1)

Rulename:
elasticsearch-node-to-node-encryption-check

Story:
As an AWS developer
I would like to check if my Elasticsearch configuration is compliant (node to node encrypted)
So that I can check if my application conforms with Control IDs S7, SC-8, SC-8(1) within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant Elasticsearch resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant Elasticsearch resource for Control IDs S7, SC-8, SC-8(1) within NIST 800-53.
  • Given a CDK stack with a compliant Elasticsearch resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs S7, SC-8, SC-8(1) within NIST 800-53.
  • Given a CDK stack without a Elasticsearch resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs S7, SC-8, SC-8(1) within NIST 800-53.

Ensure EC2 resources have detailed monitoring enabled

Rulename:
ec2-instance-detailed-monitoring-enabled

Story:
As an AWS consultant
I would like to check if my EC2 configuration is compliant (has detailed monitoring enabled)
So that I can check if my application conforms with Control IDs CA-7(a)(b), SI-4(2), SI-4(a)(b)(c) within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant EC2 resource
    • When NIST-503 Secure Aspects is run
    • Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant EC2 resource for Control IDs CA-7(a)(b), SI-4(2), SI-4(a)(b)(c) within NIST 800-53 .
  • Given a CDK stack with a compliant EC2 resource and other compliant resources
    • When NIST-503 Secure Aspects is run
    • Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs CA-7(a)(b), SI-4(2), SI-4(a)(b)(c) within NIST 800-53..
  • Given a CDK stack without an EC2 resource and other compliant resources:
    • When NIST-503 Secure Aspects is run
    • Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs CA-7(a)(b), SI-4(2), SI-4(a)(b)(c) within NIST 800-53.

Check that IMDSV2 is enabled on EC2 resources

Control ID:
AC-6

AWS Config Rule:
ec2-imdsv2-check

Story:
As an AWS consultant
I would like to check if my EC2 configuration is compliant (Instance Metadata Service Version 2 (IMDSv2) enabled)
So that I can check if my application conforms with Control ID AC-6 within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant EC2 resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant EC2 resource for Control ID AC-6 within NIST 800-53.
  • Given a CDK stack with a compliant EC2 resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control ID AC-6 within NIST 800-53.
  • Given a CDK stack without an EC2 resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control ID AC-6 within NIST 800-53.

NIST.800.53 - CloudTrail S3 Data Events Enabled

Currently marked as unable to be implemented via aspects

cloudtrail-s3-dataevents-enabled

Used to verify compliance with these Control IDs:
AC-2(g), AU-2(a)(d), AU-3, AU-12(a)(c)

Story:
As an AWS consultant, I would like to check that CloudTrail has logging enabled for S3 data events so that I can check if my application conforms with the above NIST standards

Acceptance Criteria:
Given a CDK stack with a non-compliant CloudTrail configuration

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant configuration for AU-2 NIST standard

Given a CDK stack with a compliant CloudTrail configuration

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about the compliant configuration for AU-2 NIST standard

Given a CDK stack with no CloudTrail resources or configuration

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about AU-2 NIST standard

Ensure EC2 machines have SSH restricted

Control IDs:
AC-4, SC-7, SC-7(3)

Rulename:
restricted-ssh

Rule description:
Checks whether security groups that are in use disallow unrestricted incoming SSH traffic.

Story:
As an AWS developer
I would like to check if my EC2 configuration is compliant (SSH traffic denied by default)
So that I can check if my application conforms with Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant EC2 resource
    • When NIST-503 Secure Aspects is run
    • Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant EC2 resource for Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53 .
  • Given a CDK stack with a compliant EC2 resource and other compliant resources
    • When NIST-503 Secure Aspects is run
    • Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53.
  • Given a CDK stack without an EC2 resource and other compliant resources:
    • When NIST-503 Secure Aspects is run
    • Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53 .

NIST.800.53 - Ensure DMS replication is not public

Check that DMS Replication is not public

Control ID:
AC-4

AWS Config Rule:
dms-replication-not-public

Story:
As an AWS consultant
I would like to check if my DMS replication instance configuration is compliant (Cannot be publicly accessed)
So that I can check if my application conforms with Control ID AC-4 within NIST 800-53.

Acceptance Criteria:

* Given a CDK stack with a *non-compliant DMS replication* instance
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant DMS replication instance for Control ID AC-4 within NIST 800-53 .
* Given a CDK stack with a *compliant DMS replication* instance and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about NIST 800-53.
* Given a CDK stack *without a DMS replication* instance and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about NIST 800-53

Ensure aws credentials are stored as environment variables

Control IDs:
AC-6, IA-5(7), SA-3(a)

Rulename:
codebuild-project-envvar-awscred-check

Story:
As an AWS developer
I would like to check if my Codebuild configuration is compliant (AWS credentials not stored within project environment)
So that I can check if my application conforms with Control IDs AC-6, IA-5(7), SA-3(a) within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant Codebuild resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant Codebuild resource for Control IDs AC-6, IA-5(7), SA-3(a) within NIST 800-53.
  • Given a CDK stack with a compliant Codebuild resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-6, IA-5(7), SA-3(a) within NIST 800-53.
  • Given a CDK stack without a Codebuild resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-6, IA-5(7), SA-3(a) within NIST 800-53.

NIST 800.53 Ensure EC2 instances are stopped

Control IDs:
CM-2

Rulename:
ec2-stopped-instance

Story:
As an AWS developer
I would like to check if my EC2 configuration is compliant (not stopped for too long)
So that I can check if my application conforms with Control IDs CM-2 within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant EC2 resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant EC2 resource for Control IDs CM-2 within NIST 800-53.
  • Given a CDK stack with a compliant EC2 resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs CM-2 within NIST 800-53.
  • Given a CDK stack without an EC2 resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs CM-2 within NIST 800-53.

NIST 800.53 IAM Password Policy

Currently marked as unable to be implemented

Used to verify compliance with these Control IDs:
AC-2(1), AC-2(f), AC-2(j), IA-2, IA-5(1)(a)(d)(e), IA-5(4)

Story:

  • As an AWS consultant
  • I would like to check that my organizational IAM password policy meets or exceeds the requirements as stated by NIST SP 800-63 and the CIS AWS Foundations Benchmark for password strength
  • So that I can check if my application conforms with the AC-2(1), AC-2(f), AC-2(j), IA-2, IA-5(1)(a)(d)(e), and IA-5(4) NIST standards

Acceptance Criteria:

Given a CDK stack with a non-compliant IAM password policy

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant password policy for AC-2(1) NIST standard

Given a CDK stack with a compliant IAM password policy

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about the compliant resource for AC-2(1) NIST standard

Given a CDK stack with no IAM users, resources, or configuration

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about AC-2(1) NIST standard

NIST 800.53 Ensure managed EC2 instances are complaint with their association

Control IDs:
CM-2, CM-7(a), CM-8(3)(a), SI-2(2)

Rulename:
ec2-managedinstance-association-compliance-status-check

Story:
As an AWS developer
I would like to check if my EC2 configuration is compliant with association standards.
So that I can check if my application conforms with Control IDs CM-2, CM-7(a), CM-8(3)(a), SI-2(2) within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant EC2 resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant EC2 resource for Control IDs CM-2, CM-7(a), CM-8(3)(a), SI-2(2) within NIST 800-53 .
  • Given a CDK stack with a compliant EC2 resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs CM-2, CM-7(a), CM-8(3)(a), SI-2(2) within NIST 800-53.
  • Given a CDK stack without an EC2 resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs CM-2, CM-7(a), CM-8(3)(a), SI-2(2) within NIST 800-53.

Ensure Sagemaker endpoint configuration has a key configured in KMS

Control IDs:
SC-13, SC-28

Rulename:
sagemaker-endpoint-configuration-kms-key-configured

Story:
As an AWS developer
I would like to check if my Sagemaker configuration is compliant (key configured in KMS)
So that I can check if my application conforms with Control IDs SC-13, SC-28 within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant Sagemaker resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant sagemaker resource for Control IDs SC-13, SC-28 within NIST 800-53.
  • Given a CDK stack with a compliant Sagemaker resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs SC-13, SC-28 within NIST 800-53.
  • Given a CDK stack without a Sagemaker resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs SC-13, SC-28 within NIST 800-53.

iam-policy-no-statements-with-admin-access

Used to verify compliance with these Control IDs:
AC-2(1), AC-2(j), AC-3, and AC-6

Story:

  • As an AWS consultant
  • I would like to check that none of my IAM policy statements give admin access
  • So that I can check if my application conforms with the AC-2(1), AC-2(j), AC-3, and AC-6 NIST standards

Acceptance Criteria:

Given a CDK stack with one or more non-compliant IAM policies:

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant policy for relevant NIST standards

Given a CDK stack with compliant IAM policies:

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about the compliant resource for relevant NIST standards

Given a CDK stack with no IAM policies:

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about relevant NIST standards

Ensure EC2 instances don't use public IP addresses

Control IDs:
AC-4, AC-6, AC-21(b), SC-7, SC-7(3)

Rulename:
ec2-instance-no-public-ip

Story:
As an AWS developer
I would like to check if my EC2 configuration is compliant (no instance with public IPs)
So that I can check if my application conforms with Control IDs AC-4, AC-6, AC-21(b), SC-7, SC-7(3) within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant EC2 resource
    • When NIST-503 Secure Aspects is run
    • Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant EC2 resource for Control IDs AC-4, AC-6, AC-21(b), SC-7, SC-7(3) within NIST 800-53 .
  • Given a CDK stack with a compliant EC2 resource and other compliant resources
    • When NIST-503 Secure Aspects is run
    • Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-4, AC-6, AC-21(b), SC-7, SC-7(3) within NIST 800-53.
  • Given a CDK stack without an EC2 resource and other compliant resources:
    • When NIST-503 Secure Aspects is run
    • Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-4, AC-6, AC-21(b), SC-7, SC-7(3) within NIST 800-53.

iam-no-inline-policy-check

Used to verify compliance with these Control IDs:
AC-6

Story:

  • As an AWS consultant
  • I would like to check that none of my IAM users, roles, or groups have any inline policies
  • So that I can check if my application conforms with the AC-6 NIST standard

Acceptance Criteria:

Given a CDK stack with one or more non-compliant IAM users, roles, or groups

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant resource for AC-6 NIST standard

Given a CDK stack with one or more compliant IAM users, roles, or groups

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about the compliant resource for AC-6 NIST standard

Given a CDK stack with no IAM users, roles, or groups

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about AC-6 NIST standard

NIST 800.53 Ensure Redshift cluster does not allow public access

Control ID:
AC-3/AC-4/AC-6/AC-21(b)/SC-7/SC-7(3)

AWS Config Rule:
redshift-cluster-public-access-check

Story:
As an AWS consultant
I would like to check if my Redshift cluster configuration is compliant (does not allow public access)
So that I can check if my application conforms with Control IDs AC-3, AC-4, AC-6, AC-21(b), SC-7, and SC-7(3) within NIST 800-53.

Acceptance Criteria:

* Given a CDK stack with *a* *non-compliant Redshift* cluster
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant Redshift cluster for Control IDs AC-3, AC-4, AC-6, AC-21(b), SC-7, and SC-7(3) within NIST 800-53 .
* Given a CDK stack with *a* *compliant Redshift* cluster and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about NIST 800-53.
* Given a CDK stack *without a Redshift* cluster and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about NIST 800-53

NIST 800.53 IAM Group Has Users Check

Currently marked as unable to be implemented

Used to verify compliance with these Control IDs:
AC-2(j), AC-3, AC-5c, AC-6, SC-2

Story:

  • As an AWS consultant
  • I would like to check that each of my IAM groups deployed has at least one IAM user
  • So that I can check if my application conforms with the AC-2(j), AC-3, AC-5c, AC-6, and SC-2 NIST standards

Acceptance Criteria:

Given a CDK stack with one or more non-compliant IAM groups:

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant group for the relevant NIST standards

Given a CDK stack with compliant IAM group(s):

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about the compliant resource for the relevant NIST standards

Given a CDK stack with no IAM group:

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about the relevant NIST standards

Ensure ELB has TLS and HTTPS listeners only

Control IDs:
AC-17(2), SC-7, SC-8, SC-8(1), SC-23

Rulename:
elb-tls-https-listeners-only

Story:
As an AWS developer
I would like to check if my ELB configuration is compliant (only SSL or HTTPS listeners enabled)
So that I can check if my application conforms with Control IDs AC-17(2), SC-7, SC-8, SC-8(1), SC-23 within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant ELB resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant ELB resource for Control IDs AC-17(2), SC-7, SC-8, SC-8(1), SC-23 within NIST 800-53.
  • Given a CDK stack with a compliant ELB resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-17(2), SC-7, SC-8, SC-8(1), SC-23 within NIST 800-53.
  • Given a CDK stack without a ELB resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-17(2), SC-7, SC-8, SC-8(1), SC-23 within NIST 800-53.

Ensure ELBs require an ACM certificate

Control IDs:
AC-17(2), SC-7, SC-8, SC-8(1), SC-13

Rulename:
elb-acm-certificate-required

Story:
As an AWS developer
I would like to check if my ELB configuration is compliant (ACM certificate required)
So that I can check if my application conforms with Control IDs AC-17(2), SC-7, SC-8, SC-8(1), SC-13 within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant ELB resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant ELB resource for Control IDs AC-17(2), SC-7, SC-8, SC-8(1), SC-13 within NIST 800-53.
  • Given a CDK stack with a compliant ELB resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-17(2), SC-7, SC-8, SC-8(1), SC-13 within NIST 800-53.
  • Given a CDK stack without a ELB resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-17(2), SC-7, SC-8, SC-8(1), SC-13 within NIST 800-53.

NIST 800.53 Ensure managed EC2 instances are compliant with their patches

Control IDs:
SI-7(1), SI-2(2), CM-8(3)(a)

Rulename:
ec2-managedinstance-patch-compliance-status-check

Story:
As an AWS developer
I would like to check if my EC2 configuration is compliant with patch requirements
So that I can check if my application conforms with Control IDs SI-7(1), SI-2(2), CM-8(3)(a) within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant EC2 resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant EC2 resource for Control IDs SI-7(1), SI-2(2), CM-8(3)(a) within NIST 800-53.
  • Given a CDK stack with a compliant EC2 resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs SI-7(1), SI-2(2), CM-8(3)(a) within NIST 800-53.
  • Given a CDK stack without an EC2 resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs SI-7(1), SI-2(2), CM-8(3)(a) within NIST 800-53.

Ensure VPC Security Groups allow only authorized ports

Control IDs:
AC-4, SC-7, SC-7(3)

Rulename:
vpc-sg-open-only-to-authorized-ports

Story:
As an AWS developer
I would like to check if my VPC configuration is compliant (only authorized ports are open)
So that I can check if my application conforms with Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant VPC resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant VPC resource for Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53 .
  • Given a CDK stack with a compliant VPC resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53.
  • Given a CDK stack without a VPC resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53.

Ensure public access to lambda functions is prohibited

Control IDs:
AC-3, AC-4, AC-6, AC-21(b), SC-7, SC-7(3)

Rulename:
lambda-function-public-access-prohibited

Story:
As an AWS developer
I would like to check if my lambda configuration is compliant (public access prohibited)
So that I can check if my application conforms with Control IDs AC-3, AC-4, AC-6, AC-21(b), SC-7, SC-7(3) within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant lambda function
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant lambda resource for Control IDs AC-3, AC-4, AC-6, AC-21(b), SC-7, SC-7(3) within NIST 800-53 .
  • Given a CDK stack with a compliant lambda function and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-3, AC-4, AC-6, AC-21(b), SC-7, SC-7(3) within NIST 800-53.
  • Given a CDK stack without a lambda function and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-3, AC-4, AC-6, AC-21(b), SC-7, SC-7(3) within NIST 800-53.

Ensure EC2 instances are inside a VPC

Control IDs:
AC-4, SC-7, SC-7(3)

Rulename:
ec2-instances-in-vpc

Story:
As an AWS developer
I would like to check if my EC2 configuration is compliant (all instances within a VPC)
So that I can check if my application conforms with Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant EC2 resource
    • When NIST-503 Secure Aspects is run
    • Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant EC2 resource for Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53 .
  • Given a CDK stack with a compliant EC2 resource and other compliant resources
    • When NIST-503 Secure Aspects is run
    • Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53 .
  • Given a CDK stack without an EC2 resource and other compliant resources:
    • When NIST-503 Secure Aspects is run
    • Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53.

NIST 800.53 - IAM Access Keys Rotated

Currently marked as unable to be implemented via aspects

access-keys-rotated

Used to verify compliance with these Control IDs:
AC-2(1) and AC-2(j)

Story:
As an AWS consultant, I would like to check if my IAM access keys are rotated as per organizational policy and in accordance with my access key rotation value so that I can check if my application conforms with the above NIST standards

Acceptance Criteria:
Given a CDK stack with IAM access key resources and a non-existent or non-compliant access key rotation value

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant value for AC-2(1) NIST standard

Given a CDK stack with a compliant access key rotation value

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about the compliant resource for AC-2(1) NIST standard

Given a CDK stack with no access key rotation value or IAM access key resources

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about AC-2(1) NIST standard

NIST 800.53 Ensure Redshift cluster has Configuration and Audit Logging Enabled

Control ID:
AC-2(4)/AC-2(g)/AU-2(a)(d)/AU-3/AU-12(a)(c)/SC-13/SC-28

AWS Config Rule:
redshift-cluster-configuration-check

Story:
As an AWS consultant
I would like to check if my Redshift cluster configuration is compliant (is configured with encryption and audit logging enabled)
So that I can check if my application conforms with Control IDs AC-2(4), AC-2(g), AU-2(a)(d), AU-3, AU-12(a)(c), SC-13, and SC-28 within NIST 800-53.

Acceptance Criteria:

* Given a CDK stack with *a* *non-compliant Redshift* cluster
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant Redshift cluster for Control IDs AC-2(4), AC-2(g), AU-2(a)(d), AU-3, AU-12(a)(c), SC-13, and SC-28 within NIST 800-53 .
* Given a CDK stack with *a* *compliant Redshift* cluster and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about NIST 800-53.
* Given a CDK stack *without a Redshift* cluster and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about NIST 800-53

NIST.800.53 - CloudTrail Encryption Enabled

Used to verify compliance with these Control IDs:
AU-9, SC-13, SC-28

Story:
As an AWS consultant, I would like to check that my CDK deployment has encryption enabled for my CloudTrail trails so that I can check if my application conforms with the above NIST standards

Acceptance Criteria:
Given a CDK stack with a non-compliant CloudTrail configuration

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant configuration for AU-9 NIST standard

Given a CDK stack with a compliant CloudTrail configuration

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about the compliant configuration for AU-9 NIST standard

Given a CDK stack with no CloudTrail resources or configuration

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about AU-9 NIST standard

Ensure DynamoDB has PITR enabled

Control ID:
CP-9(b)/CP-10/SI-12

AWS Config Rule:
dynamodb-pitr-enabled

Story:
As an AWS consultant
I would like to check if my DynamoDB table configuration is compliant (PITR enabled)
So that I can check if my application conforms with Control IDs CP-9(b), CP-10, and SI-12 within NIST 800-53.

Acceptance Criteria:

* Given a CDK stack with a *non-compliant DynamoDB* table
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant DynamoDB table for Control IDs CP-9(b), CP-10, and SI-12 within NIST 800-53 .
* Given a CDK stack with a *compliant DynamoDB* table and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about NIST 800-53.
* Given a CDK stack *without a DynamoDB* table and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about NIST 800-53

iam-user-no-policies-check

Used to verify compliance with these Control IDs:
AC-2(j), AC-3, AC-5c, AC-6

Story:

  • As an AWS consultant
  • I would like to check that my IAM policies are only attached at the group and role levels, and not to individual users
  • So that I can check if my application conforms with the AC-2(j), AC-3, AC-5c, and AC-6 NIST standards

Acceptance Criteria:

Given a CDK stack with one or more non-compliant IAM users:

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant user for relevant NIST standards

Given a CDK stack with compliant IAM user(s):

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about the compliant resource for relevant NIST standards

Given a CDK stack with no IAM users:

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about relevant NIST standards

Ensure DynamoDB tables are encrypted in KMS

Control ID:
SC-13

AWS Config Rule:
dynamodb-table-encrypted-kms

Story:
As an AWS consultant
I would like to check if my DynamoDB table configuration is compliant (encrypted in KMS)
So that I can check if my application conforms with Control ID SC-13 within NIST 800-53.

Acceptance Criteria:

* Given a CDK stack with a *non-compliant DynamoDB* table
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant DynamoDB table for Control ID SC-13 within NIST 800-53 .
* Given a CDK stack with a *compliant DynamoDB* table and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about NIST 800-53.
* Given a CDK stack *without a DynamoDB* table and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about NIST 800-53

Ensure lambda functions are inside a VPC

Control IDs:
AC-4, SC-7, SC-7(3)

Rulename:
lambda-inside-vpc

Story:
As an AWS developer
I would like to check if my lambda configuration is compliant (functions within a VPC)
So that I can check if my application conforms with Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant lambda function
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant lambda resource for Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53.
  • Given a CDK stack with a compliant lambda function and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53.
  • Given a CDK stack without a lambda function and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53.

Ensure EFS has been encrypted

Control ID:
SC-13/SC-28

AWS Config Rule:
efs-encrypted-check

Story:
As an AWS consultant
I would like to check if my EFS instance configuration is compliant (encrypted)
So that I can check if my application conforms with Control IDs SC-13 and SC-28 within NIST 800-53.

Acceptance Criteria:

* Given a CDK stack with a *non-compliant EFS* instance
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant EFS instance for Control IDs SC-13 and SC-28 within NIST 800-53 .
* Given a CDK stack with a *compliant EFS* instance and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about NIST 800-53.
* Given a CDK stack *without a EFS* instance and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about NIST 800-53

Ensure encryption for EC2 EBS volumes is the default

Control IDs:
SC-28

Rulename:
ec2-ebs-encryption-by-default

Story:
As an AWS developer
I would like to check if my EBS configuration is compliant (encrypted by default)
So that I can check if my application conforms with Control ID SC-28 within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant EBS resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant EBS resource for Control ID SC-28 within NIST 800-53.
  • Given a CDK stack with a compliant EBS resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control ID SC-28 within NIST 800-53.
  • Given a CDK stack without an EBS resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control ID SC-28 within NIST 800-53.

NIST 800.53 Ensure volumes in use are checked

Control IDs:
CM-2, SC-4

Rulename:
ec2-volume-inuse-check

Story:
As an AWS developer
I would like to check if my EC2 configuration is compliant (EBS volumes deleted when not in use)
So that I can check if my application conforms with Control IDs CM-2, SC-4 within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant EC2 resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant EC2 resource for Control IDs CM-2, SC-4 within NIST 800-53 .
  • Given a CDK stack with a compliant EC2 resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs CM-2, SC-4 within NIST 800-53.
  • Given a CDK stack without an EC2 resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs CM-2, SC-4 within NIST 800-53.

Ensure Sagemaker has no direct internet access

Control IDs:
AC-3, AC-4, AC-6, AC-21(b), SC-7, SC-7(3)

Rulename:
sagemaker-notebook-no-direct-internet-access

Story:
As an AWS developer
I would like to check if my Sagemaker notebook configuration is compliant (key configured in KMS)
So that I can check if my application conforms with Control IDs AC-3, AC-4, AC-6, AC-21(b), SC-7, SC-7(3) within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant Sagemaker resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant sagemaker resource for Control IDs AC-3, AC-4, AC-6, AC-21(b), SC-7, SC-7(3) within NIST 800-53.
  • Given a CDK stack with a compliant Sagemaker resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-3, AC-4, AC-6, AC-21(b), SC-7, SC-7(3) within NIST 800-53.
  • Given a CDK stack without a Sagemaker resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-3, AC-4, AC-6, AC-21(b), SC-7, SC-7(3) within NIST 800-53.

Ensure volumes are encrypted

Control IDs:
SC-13, SC-28

Rulename:
encrypted-volumes

Story:
As an AWS developer
I would like to check if my EC2 configuration is compliant (all volumes are encrypted)
So that I can check if my application conforms with Control IDs SC-13, SC-28 within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant EC2 resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant EC2 resource for Control IDs SC-13, SC-28 within NIST 800-53 .
  • Given a CDK stack with a compliant EC2 resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs SC-13, SC-28 within NIST 800-53.
  • Given a CDK stack without an EC2 resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs SC-13, SC-28 within NIST 800-53.

Ensure Sagemaker notebook configuration has a key configured in KMS

Control IDs:
SC-13, SC-28

Rulename:
sagemaker-notebook-instance-kms-key-configured

Story:
As an AWS developer
I would like to check if my Sagemaker notebook configuration is compliant (key configured in KMS)
So that I can check if my application conforms with Control IDs SC-13, SC-28 within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant Sagemaker resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant sagemaker resource for Control IDs SC-13, SC-28 within NIST 800-53.
  • Given a CDK stack with a compliant Sagemaker resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs SC-13, SC-28 within NIST 800-53.
  • Given a CDK stack without a Sagemaker resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs SC-13, SC-28 within NIST 800-53.

NIST.800.53 - CloudTrail Log File Validation Enabled

Used to verify compliance with these Control IDs:
SI-7, SI-7(1)

Story:
As an AWS consultant, I would like to ensure that my CloudTrail configuration has log file validation enabled so that I can check if my application conforms with the above NIST standards

Acceptance Criteria:
Given a CDK stack with a non-compliant CloudTrail configuration

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant configuration for SI-7 NIST standard

Given a CDK stack with compliant CloudTrail configuration(s)

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about the compliant configuration for SI-7 NIST standard

Given a CDK stack with no CloudTrail resources or configurations

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about SI-7 NIST standard

Ensure elasticsearch data is encrypted at rest

Control IDs:
SC-13, SC-28

Rulename:
elasticsearch-encrypted-at-rest

Story:
As an AWS developer
I would like to check if my Elasticsearch configuration is compliant (data encrypted at rest)
So that I can check if my application conforms with Control IDs SC-13, SC-28 within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant Elasticsearch resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant Elasticsearch resource for Control IDs SC-13, SC-28 within NIST 800-53.
  • Given a CDK stack with a compliant Elasticsearch resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs SC-13, SC-28 within NIST 800-53.
  • Given a CDK stack without a Elasticsearch resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs SC-13, SC-28 within NIST 800-53.

Ensure deletion protection for ELBs

Control IDs:
CM-2, CP-10

Rulename:
elb-deletion-protection-enabled

Story:
As an AWS developer
I would like to check if my ELB configuration is compliant (deletion protection is enabled)
So that I can check if my application conforms with Control IDs CM-2, CP-10 within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant ELB resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant ELB resource for Control IDs CM-2, CP-10 within NIST 800-53.
  • Given a CDK stack with a compliant ELB resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs CM-2, CP-10 within NIST 800-53.
  • Given a CDK stack without a ELB resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs CM-2, CP-10 within NIST 800-53.

Ensure elasticsearch is running within a VPC

Control IDs:
AC-4, SC-7, SC-7(3)

Rulename:
elasticsearch-in-vpc-only

Story:
As an AWS developer
I would like to check if my Elasticsearch configuration is compliant (running within a VPC)
So that I can check if my application conforms with Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant Elasticsearch resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant Elasticsearch resource for Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53 .
  • Given a CDK stack with a compliant Elasticsearch resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53.
  • Given a CDK stack without a Elasticsearch resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control IDs AC-4, SC-7, SC-7(3) within NIST 800-53.

iam-group-membership-check

Used to verify compliance with these Control IDs:
AC-2(1), AC-2(j), AC-3, and AC-6

Story:

  • As an AWS consultant
  • I would like to check that each of my IAM users are members of at least one group
  • So that I can check if my application conforms with the AC-2(1) NIST standard

Acceptance Criteria:

Given a CDK stack with one or more non-compliant IAM users:

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant user for AC-2(1) NIST standard

Given a CDK stack with compliant IAM user(s):

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about the compliant resource for AC-2(1) NIST standard

Given a CDK stack with no IAM users:

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about AC-2(1) NIST standard

NIST 800.53 - IAM User MFA Enabled

Currently marked as unable to be implemented

Used to verify compliance with these Control IDs:
IA-2(1)(2)(11)

Story:

  • As an AWS consultant
  • I would like to ensure that the IAM users created in my CDK deployment have MFA enabled
  • So that I can check if my application conforms with the IA-2(1)(2)(11) standard

Acceptance Criteria:

Given a CDK stack with one or more non-compliant IAM users

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant users for IA-2 NIST standard

Given a CDK stack with only compliant IAM users

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about the compliant users for IA-2 NIST standard

Given a CDK stack with no IAM users

  • When NIST-503 Secure Aspects is run
  • Then the CDK stack deploys and the consultant does not receive an explanation about IA-2 NIST standard

Ensure 2 tunnels for VPC-VPN connections

Control IDs:
CP-10

Rulename:
vpc-vpn-2-tunnels-up

Story:
As an AWS developer
I would like to check if my VPC-VPN configuration is compliant (at least two redundant tunnels)
So that I can check if my application conforms with Control ID CP-10 within NIST 800-53.

Acceptance Criteria:

  • Given a CDK stack with a non-compliant VPC-VPN tunnel resource
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack does not deploy and the consultant receives an explanation about the non compliant VPC-VPN tunnel resource for Control ID CP-10 within NIST 800-53.
  • Given a CDK stack with a compliant VPC-VPN tunnel resource and other compliant resources
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control ID CP-10 within NIST 800-53.
  • Given a CDK stack without a VPC-VPN tunnel resource and other compliant resources:
    * When NIST-503 Secure Aspects is run
    * Then the CDK stack deploys and the consultant does not receive an explanation about Control ID CP-10 within NIST 800-53.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.