feat: add api server class
This commit is contained in:
17
src/APIServer.ts
Normal file
17
src/APIServer.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import express, { Request, Response } from 'express'
|
||||
|
||||
export class APIServer {
|
||||
private readonly router =
|
||||
express.Router()
|
||||
|
||||
constructor () {
|
||||
this.router.get('/bp_status', this.getBPStatus.bind(this))
|
||||
}
|
||||
|
||||
private getBPStatus (req: Request, res: Response) {
|
||||
res.send([])
|
||||
}
|
||||
|
||||
public getRouter = () =>
|
||||
this.router
|
||||
}
|
@ -1,17 +1,45 @@
|
||||
import express from 'express'
|
||||
import express, { Request, Response } from 'express'
|
||||
import { APIServer } from './APIServer'
|
||||
|
||||
export class WebServer {
|
||||
export class WebServer {
|
||||
private readonly app = express()
|
||||
|
||||
public WebServer () {
|
||||
private readonly apiServer = new APIServer()
|
||||
|
||||
constructor (
|
||||
private readonly port = 2424
|
||||
) {
|
||||
this.initRoutes()
|
||||
this.app.listen(this.port, this.showBanner.bind(this))
|
||||
}
|
||||
|
||||
private initRoutes () {
|
||||
|
||||
this.app.use(express.static('./public'))
|
||||
this.app.use('/api', this.apiServer.getRouter())
|
||||
this.app.use(this.error404)
|
||||
}
|
||||
|
||||
public listen() {
|
||||
this.app.listen()
|
||||
private error404 (_: Request, res: Response) {
|
||||
res.status(404).send({ success: false, message: 'Page not found' })
|
||||
}
|
||||
|
||||
private showBanner () {
|
||||
console.log(`
|
||||
|
||||
_______ _______ _______ _______ _______ _______
|
||||
| _ || || || || || |
|
||||
| |_| || _ || _____|| ___||_ _|| _____|
|
||||
| || |_| || |_____ | |___ | | | |_____
|
||||
| _ | | ___||_____ || ___| | | |_____ |
|
||||
| |_| || | _____| || |___ | | _____| |
|
||||
|_______||___| |_______||_______| |___| |_______|
|
||||
Created By Minhyeok Park
|
||||
|
||||
Server is now on http://127.0.0.1:${this.port}
|
||||
|
||||
`
|
||||
.split('\n')
|
||||
.map((v) => v.replace(/ /, ''))
|
||||
.join('\n')
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
DescribeLoadBalancerAttributesCommand,
|
||||
ModifyLoadBalancerAttributesCommand
|
||||
} from '@aws-sdk/client-elastic-load-balancing-v2'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ALBHttpDropInvalidHeaderEnabled implements BPSet {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { ElasticLoadBalancingV2Client, DescribeLoadBalancersCommand } from '@aws-sdk/client-elastic-load-balancing-v2'
|
||||
import { WAFV2Client, GetWebACLForResourceCommand, AssociateWebACLCommand } from '@aws-sdk/client-wafv2'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ALBWAFEnabled implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
DescribeLoadBalancerAttributesCommand,
|
||||
ModifyLoadBalancerAttributesCommand
|
||||
} from '@aws-sdk/client-elastic-load-balancing-v2'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ELBCrossZoneLoadBalancingEnabled implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
DescribeLoadBalancerAttributesCommand,
|
||||
ModifyLoadBalancerAttributesCommand
|
||||
} from '@aws-sdk/client-elastic-load-balancing-v2'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ELBDeletionProtectionEnabled implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
DescribeLoadBalancerAttributesCommand,
|
||||
ModifyLoadBalancerAttributesCommand
|
||||
} from '@aws-sdk/client-elastic-load-balancing-v2'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ELBLoggingEnabled implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
GetStagesCommand
|
||||
} from '@aws-sdk/client-apigatewayv2'
|
||||
import { WAFV2Client, GetWebACLForResourceCommand, AssociateWebACLCommand } from '@aws-sdk/client-wafv2'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class APIGatewayAssociatedWithWAF implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
GetStagesCommand,
|
||||
UpdateStageCommand
|
||||
} from '@aws-sdk/client-apigatewayv2'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class APIGatewayExecutionLoggingEnabled implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
GetStagesCommand,
|
||||
UpdateStageCommand
|
||||
} from '@aws-sdk/client-apigatewayv2'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class APIGatewayV2AccessLogsEnabled implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
GetRoutesCommand,
|
||||
UpdateRouteCommand
|
||||
} from '@aws-sdk/client-apigatewayv2'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class APIGatewayV2AuthorizationTypeConfigured implements BPSet {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { AutoScalingClient, DescribeAutoScalingGroupsCommand, UpdateAutoScalingGroupCommand } from '@aws-sdk/client-auto-scaling'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class AutoScalingGroupELBHealthCheckRequired implements BPSet {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { AutoScalingClient, DescribeAutoScalingGroupsCommand, UpdateAutoScalingGroupCommand } from '@aws-sdk/client-auto-scaling'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class AutoScalingLaunchTemplate implements BPSet {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { AutoScalingClient, DescribeAutoScalingGroupsCommand, UpdateAutoScalingGroupCommand } from '@aws-sdk/client-auto-scaling'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class AutoScalingMultipleAZ implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
GetDistributionCommand,
|
||||
UpdateDistributionCommand
|
||||
} from '@aws-sdk/client-cloudfront'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class CloudFrontAccessLogsEnabled implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
GetDistributionCommand,
|
||||
UpdateDistributionCommand
|
||||
} from '@aws-sdk/client-cloudfront'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class CloudFrontAssociatedWithWAF implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
GetDistributionCommand,
|
||||
UpdateDistributionCommand
|
||||
} from '@aws-sdk/client-cloudfront'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class CloudFrontDefaultRootObjectConfigured implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
GetDistributionCommand,
|
||||
UpdateDistributionCommand
|
||||
} from '@aws-sdk/client-cloudfront'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class CloudFrontNoDeprecatedSSLProtocols implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
GetDistributionCommand,
|
||||
UpdateDistributionCommand
|
||||
} from '@aws-sdk/client-cloudfront'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class CloudFrontS3OriginAccessControlEnabled implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
GetDistributionCommand,
|
||||
UpdateDistributionCommand
|
||||
} from '@aws-sdk/client-cloudfront'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class CloudFrontViewerPolicyHTTPS implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeLogGroupsCommand,
|
||||
PutRetentionPolicyCommand
|
||||
} from '@aws-sdk/client-cloudwatch-logs'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class CWLogGroupRetentionPeriodCheck implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeAlarmsCommand,
|
||||
PutMetricAlarmCommand
|
||||
} from '@aws-sdk/client-cloudwatch'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class CloudWatchAlarmSettingsCheck implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
BatchGetProjectsCommand,
|
||||
UpdateProjectCommand
|
||||
} from '@aws-sdk/client-codebuild'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class CodeBuildProjectEnvironmentPrivilegedCheck implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
BatchGetProjectsCommand,
|
||||
UpdateProjectCommand
|
||||
} from '@aws-sdk/client-codebuild'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class CodeBuildProjectLoggingEnabled implements BPSet {
|
||||
|
@ -5,7 +5,7 @@ import {
|
||||
BatchGetDeploymentGroupsCommand,
|
||||
UpdateDeploymentGroupCommand
|
||||
} from '@aws-sdk/client-codedeploy'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class CodeDeployAutoRollbackMonitorEnabled implements BPSet {
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
PutScalingPolicyCommand,
|
||||
DescribeScalingPoliciesCommand
|
||||
} from '@aws-sdk/client-application-auto-scaling'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class DynamoDBAutoscalingEnabled implements BPSet {
|
||||
|
@ -8,7 +8,7 @@ import {
|
||||
ListRecoveryPointsByResourceCommand,
|
||||
StartBackupJobCommand
|
||||
} from '@aws-sdk/client-backup'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class DynamoDBLastBackupRecoveryPointCreated implements BPSet {
|
||||
|
@ -5,7 +5,7 @@ import {
|
||||
DescribeContinuousBackupsCommand,
|
||||
UpdateContinuousBackupsCommand
|
||||
} from '@aws-sdk/client-dynamodb'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class DynamoDBPITREnabled implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
DescribeTableCommand,
|
||||
UpdateTableCommand
|
||||
} from '@aws-sdk/client-dynamodb'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class DynamoDBTableDeletionProtectionEnabled implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
DescribeTableCommand,
|
||||
UpdateTableCommand
|
||||
} from '@aws-sdk/client-dynamodb'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class DynamoDBTableEncryptedKMS implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
DescribeTableCommand,
|
||||
UpdateTableCommand
|
||||
} from '@aws-sdk/client-dynamodb'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class DynamoDBTableEncryptionEnabled implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeVolumesCommand,
|
||||
EnableEbsEncryptionByDefaultCommand
|
||||
} from '@aws-sdk/client-ec2'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class EC2EbsEncryptionByDefault implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
EC2Client,
|
||||
ModifyInstanceMetadataOptionsCommand
|
||||
} from '@aws-sdk/client-ec2'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class EC2Imdsv2Check implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
EC2Client,
|
||||
MonitorInstancesCommand
|
||||
} from '@aws-sdk/client-ec2'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class EC2InstanceDetailedMonitoringEnabled implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeInstancesCommand
|
||||
} from '@aws-sdk/client-ec2'
|
||||
import { SSMClient, DescribeInstanceInformationCommand } from '@aws-sdk/client-ssm'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class EC2InstanceManagedBySystemsManager implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeInstancesCommand,
|
||||
AssociateIamInstanceProfileCommand
|
||||
} from '@aws-sdk/client-ec2'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class EC2InstanceProfileAttached implements BPSet {
|
||||
|
@ -2,7 +2,7 @@ import {
|
||||
EC2Client,
|
||||
DescribeInstancesCommand
|
||||
} from '@aws-sdk/client-ec2'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class EC2NoAmazonKeyPair implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeInstancesCommand,
|
||||
TerminateInstancesCommand
|
||||
} from '@aws-sdk/client-ec2'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class EC2StoppedInstance implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeInstancesCommand,
|
||||
ModifyInstanceMetadataOptionsCommand
|
||||
} from '@aws-sdk/client-ec2'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class EC2TokenHopLimitCheck implements BPSet {
|
||||
|
@ -7,7 +7,7 @@ import {
|
||||
PutImageCommand,
|
||||
DeleteRepositoryCommand
|
||||
} from '@aws-sdk/client-ecr'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ECRKmsEncryption1 implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeRepositoriesCommand,
|
||||
PutImageScanningConfigurationCommand
|
||||
} from '@aws-sdk/client-ecr'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ECRPrivateImageScanningEnabled implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
PutLifecyclePolicyCommand,
|
||||
GetLifecyclePolicyCommand
|
||||
} from '@aws-sdk/client-ecr'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ECRPrivateLifecyclePolicyConfigured implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeRepositoriesCommand,
|
||||
PutImageTagMutabilityCommand
|
||||
} from '@aws-sdk/client-ecr'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ECRPrivateTagImmutabilityEnabled implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
DescribeTaskDefinitionCommand,
|
||||
RegisterTaskDefinitionCommand
|
||||
} from '@aws-sdk/client-ecs'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ECSAwsVpcNetworkingEnabled implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeClustersCommand,
|
||||
UpdateClusterSettingsCommand
|
||||
} from '@aws-sdk/client-ecs'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ECSContainerInsightsEnabled implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
RegisterTaskDefinitionCommand,
|
||||
ListTaskDefinitionsCommand
|
||||
} from '@aws-sdk/client-ecs'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ECSContainersNonPrivileged implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
RegisterTaskDefinitionCommand,
|
||||
ListTaskDefinitionsCommand
|
||||
} from '@aws-sdk/client-ecs'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ECSContainersReadonlyAccess implements BPSet {
|
||||
|
@ -5,7 +5,7 @@ import {
|
||||
DescribeServicesCommand,
|
||||
UpdateServiceCommand
|
||||
} from '@aws-sdk/client-ecs'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ECSFargateLatestPlatformVersion implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
DescribeTaskDefinitionCommand,
|
||||
RegisterTaskDefinitionCommand
|
||||
} from '@aws-sdk/client-ecs'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ECSTaskDefinitionLogConfiguration implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
DescribeTaskDefinitionCommand,
|
||||
RegisterTaskDefinitionCommand
|
||||
} from '@aws-sdk/client-ecs'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ECSTaskDefinitionMemoryHardLimit implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
DescribeTaskDefinitionCommand,
|
||||
RegisterTaskDefinitionCommand
|
||||
} from '@aws-sdk/client-ecs'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ECSTaskDefinitionNonRootUser implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
DeleteAccessPointCommand,
|
||||
CreateAccessPointCommand
|
||||
} from '@aws-sdk/client-efs'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class EFSAccessPointEnforceRootDirectory implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
DeleteAccessPointCommand,
|
||||
CreateAccessPointCommand
|
||||
} from '@aws-sdk/client-efs'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class EFSAccessPointEnforceUserIdentity implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
PutBackupPolicyCommand,
|
||||
DescribeBackupPolicyCommand
|
||||
} from '@aws-sdk/client-efs'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class EFSAutomaticBackupsEnabled implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
CreateFileSystemCommand,
|
||||
DeleteFileSystemCommand
|
||||
} from '@aws-sdk/client-efs'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class EFSEncryptedCheck implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
DescribeMountTargetsCommand
|
||||
} from '@aws-sdk/client-efs'
|
||||
import { EC2Client, DescribeRouteTablesCommand } from '@aws-sdk/client-ec2'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class EFSMountTargetPublicAccessible implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
DescribeClusterCommand,
|
||||
UpdateClusterConfigCommand
|
||||
} from '@aws-sdk/client-eks'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class EKSClusterLoggingEnabled implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
DescribeClusterCommand,
|
||||
AssociateEncryptionConfigCommand
|
||||
} from '@aws-sdk/client-eks'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class EKSClusterSecretsEncrypted implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
DescribeClusterCommand,
|
||||
UpdateClusterConfigCommand
|
||||
} from '@aws-sdk/client-eks'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class EKSEndpointNoPublicAccess implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeCacheClustersCommand,
|
||||
ModifyCacheClusterCommand
|
||||
} from '@aws-sdk/client-elasticache'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ElastiCacheAutoMinorVersionUpgradeCheck implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeReplicationGroupsCommand,
|
||||
ModifyReplicationGroupCommand
|
||||
} from '@aws-sdk/client-elasticache'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ElastiCacheRedisClusterAutomaticBackupCheck implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeReplicationGroupsCommand,
|
||||
ModifyReplicationGroupCommand
|
||||
} from '@aws-sdk/client-elasticache'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ElastiCacheReplGrpAutoFailoverEnabled implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeReplicationGroupsCommand,
|
||||
ModifyReplicationGroupCommand
|
||||
} from '@aws-sdk/client-elasticache'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ElastiCacheReplGrpEncryptedAtRest implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeReplicationGroupsCommand,
|
||||
ModifyReplicationGroupCommand
|
||||
} from '@aws-sdk/client-elasticache'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ElastiCacheReplGrpEncryptedInTransit implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
DeleteCacheClusterCommand,
|
||||
CreateCacheClusterCommand
|
||||
} from '@aws-sdk/client-elasticache'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class ElastiCacheSubnetGroupCheck implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
GetPolicyVersionCommand,
|
||||
DeletePolicyCommand
|
||||
} from '@aws-sdk/client-iam'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class IAMPolicyNoStatementsWithAdminAccess implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
GetPolicyVersionCommand,
|
||||
DeletePolicyCommand
|
||||
} from '@aws-sdk/client-iam'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class IAMPolicyNoStatementsWithAdminAccess implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
ListPoliciesCommand,
|
||||
ListEntitiesForPolicyCommand
|
||||
} from '@aws-sdk/client-iam'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class IAMRoleManagedPolicyCheck implements BPSet {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { LambdaClient, ListFunctionsCommand, UpdateFunctionConfigurationCommand } from '@aws-sdk/client-lambda'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class LambdaDLQCheck implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
GetPolicyCommand,
|
||||
RemovePermissionCommand
|
||||
} from '@aws-sdk/client-lambda'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class LambdaFunctionPublicAccessProhibited implements BPSet {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { LambdaClient, ListFunctionsCommand, UpdateFunctionConfigurationCommand } from '@aws-sdk/client-lambda'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class LambdaFunctionSettingsCheck implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
ListFunctionsCommand,
|
||||
UpdateFunctionConfigurationCommand
|
||||
} from '@aws-sdk/client-lambda'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class LambdaInsideVPC implements BPSet {
|
||||
|
@ -7,7 +7,7 @@ import {
|
||||
BackupClient,
|
||||
ListRecoveryPointsByResourceCommand
|
||||
} from '@aws-sdk/client-backup'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class AuroraLastBackupRecoveryPointCreated implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeDBClustersCommand,
|
||||
ModifyDBClusterCommand
|
||||
} from '@aws-sdk/client-rds'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class AuroraMySQLBacktrackingEnabled implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeDBInstancesCommand,
|
||||
ModifyDBInstanceCommand
|
||||
} from '@aws-sdk/client-rds'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class DBInstanceBackupEnabled implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeDBClustersCommand,
|
||||
ModifyDBClusterCommand
|
||||
} from '@aws-sdk/client-rds'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class RDSClusterAutoMinorVersionUpgradeEnabled implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeDBClustersCommand,
|
||||
ModifyDBClusterCommand
|
||||
} from '@aws-sdk/client-rds'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class RDSClusterDefaultAdminCheck implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeDBClustersCommand,
|
||||
ModifyDBClusterCommand
|
||||
} from '@aws-sdk/client-rds'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class RDSClusterDeletionProtectionEnabled implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeDBClustersCommand,
|
||||
ModifyDBClusterCommand
|
||||
} from '@aws-sdk/client-rds'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class RDSClusterEncryptedAtRest implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeDBClustersCommand,
|
||||
ModifyDBClusterCommand
|
||||
} from '@aws-sdk/client-rds'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class RDSClusterIAMAuthenticationEnabled implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeDBClustersCommand,
|
||||
ModifyDBClusterCommand
|
||||
} from '@aws-sdk/client-rds'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class RDSClusterMultiAZEnabled implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
ModifyDBClusterCommand
|
||||
} from '@aws-sdk/client-rds'
|
||||
import { EC2Client, DescribeSecurityGroupsCommand } from '@aws-sdk/client-ec2'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class RDSDBSecurityGroupNotAllowed implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeDBInstancesCommand,
|
||||
ModifyDBInstanceCommand
|
||||
} from '@aws-sdk/client-rds'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class RDSEnhancedMonitoringEnabled implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeDBInstancesCommand,
|
||||
ModifyDBInstanceCommand
|
||||
} from '@aws-sdk/client-rds'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class RDSInstancePublicAccessCheck implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeDBClustersCommand,
|
||||
ModifyDBClusterCommand
|
||||
} from '@aws-sdk/client-rds'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class RDSLoggingEnabled implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
DescribeDBClusterSnapshotsCommand,
|
||||
CopyDBClusterSnapshotCommand
|
||||
} from '@aws-sdk/client-rds'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class RDSSnapshotEncrypted implements BPSet {
|
||||
|
@ -5,7 +5,7 @@ import {
|
||||
CreateAccessPointCommand
|
||||
} from '@aws-sdk/client-s3-control'
|
||||
import { STSClient, GetCallerIdentityCommand } from '@aws-sdk/client-sts'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class S3AccessPointInVpcOnly implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
GetObjectLockConfigurationCommand,
|
||||
PutObjectLockConfigurationCommand
|
||||
} from '@aws-sdk/client-s3'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class S3BucketDefaultLockEnabled implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
GetPublicAccessBlockCommand,
|
||||
PutPublicAccessBlockCommand
|
||||
} from '@aws-sdk/client-s3'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class S3BucketLevelPublicAccessProhibited implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
GetBucketLoggingCommand,
|
||||
PutBucketLoggingCommand
|
||||
} from '@aws-sdk/client-s3'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class S3BucketLoggingEnabled implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
GetBucketPolicyCommand,
|
||||
PutBucketPolicyCommand
|
||||
} from '@aws-sdk/client-s3'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class S3BucketSSLRequestsOnly implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
GetBucketVersioningCommand,
|
||||
PutBucketVersioningCommand
|
||||
} from '@aws-sdk/client-s3'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class S3BucketVersioningEnabled implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
GetBucketEncryptionCommand,
|
||||
PutBucketEncryptionCommand
|
||||
} from '@aws-sdk/client-s3'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class S3DefaultEncryptionKMS implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
GetBucketNotificationConfigurationCommand,
|
||||
PutBucketNotificationConfigurationCommand
|
||||
} from '@aws-sdk/client-s3'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class S3EventNotificationsEnabled implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
ListBucketsCommand
|
||||
} from '@aws-sdk/client-s3'
|
||||
import { BackupClient, ListRecoveryPointsByResourceCommand } from '@aws-sdk/client-backup'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class S3LastBackupRecoveryPointCreated implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
GetBucketLifecycleConfigurationCommand,
|
||||
PutBucketLifecycleConfigurationCommand
|
||||
} from '@aws-sdk/client-s3'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class S3LifecyclePolicyCheck implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
RotateSecretCommand,
|
||||
UpdateSecretCommand
|
||||
} from '@aws-sdk/client-secrets-manager'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class SecretsManagerRotationEnabledCheck implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
ListSecretsCommand,
|
||||
RotateSecretCommand
|
||||
} from '@aws-sdk/client-secrets-manager'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class SecretsManagerScheduledRotationSuccessCheck implements BPSet {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
ListSecretsCommand,
|
||||
RotateSecretCommand
|
||||
} from '@aws-sdk/client-secrets-manager'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class SecretsManagerSecretPeriodicRotation implements BPSet {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
EnableSecurityHubCommand
|
||||
} from '@aws-sdk/client-securityhub'
|
||||
import { STSClient, GetCallerIdentityCommand } from '@aws-sdk/client-sts'
|
||||
import { BPSet } from '../BPSet'
|
||||
import { BPSet } from '../../types'
|
||||
import { Memorizer } from '../../Memorizer'
|
||||
|
||||
export class SecurityHubEnabled implements BPSet {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user