feat: add api server class

This commit is contained in:
2024-12-24 13:25:36 +09:00
parent cc655ac864
commit a06e72d24a
124 changed files with 460 additions and 413 deletions

17
src/APIServer.ts Normal file
View 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
}

View File

@ -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')
)
}
}

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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