@SuppressWarnings("static-access") @Test public void checkSSMAgentTest() throws Exception { mockStatic(RulesElasticSearchRepositoryUtil.class); when(RulesElasticSearchRepositoryUtil.getQueryDetailsFromES(anyString(),anyObject(),anyObject(),anyObject(),anyString(),anyInt(),anyObject(),anyObject(),anyObject())).thenReturn(CommonTestUtils.getJsonObject()); assertThat(pacmanUtils.checkSSMAgent("123","snap","123","123","123","123"),is(notNullValue())); when(RulesElasticSearchRepositoryUtil.getQueryDetailsFromES(anyString(),anyObject(),anyObject(),anyObject(),anyString(),anyInt(),anyObject(),anyObject(),anyObject())).thenReturn(CommonTestUtils.getEmptyJsonObject()); assertThat(pacmanUtils.checkSSMAgent("123","snap","123","123","123","123"),is(notNullValue())); }
public static boolean checkSSMAgent(String id, String esUrl, String attributeName, String region, String accountId, String online) throws Exception { JsonArray hits; JsonParser parser = new JsonParser(); boolean isSSMAgentOnline = false; Map<String, Object> mustFilter = new HashMap<>(); Map<String, Object> mustNotFilter = new HashMap<>(); HashMultimap<String, Object> shouldFilter = HashMultimap.create(); Map<String, Object> mustTermsFilter = new HashMap<>(); mustFilter.put(convertAttributetoKeyword(attributeName), id); mustFilter.put(convertAttributetoKeyword(PacmanRuleConstants.REGION), region); mustFilter.put(convertAttributetoKeyword(PacmanRuleConstants.ACCOUNTID), accountId); mustFilter.put(convertAttributetoKeyword(PacmanRuleConstants.PING_STATUS), online); JsonObject resultJson = RulesElasticSearchRepositoryUtil.getQueryDetailsFromES(esUrl, mustFilter, mustNotFilter, shouldFilter, null, 0, mustTermsFilter, null,null); if (null != resultJson && resultJson.has(PacmanRuleConstants.HITS)) { String hitsJsonString = resultJson.get(PacmanRuleConstants.HITS).toString(); JsonObject hitsJson = (JsonObject) parser.parse(hitsJsonString); hits = hitsJson.getAsJsonObject().get(PacmanRuleConstants.HITS).getAsJsonArray(); if (hits.size() > 0) { JsonObject firstObject = (JsonObject) hits.get(0); JsonObject sourceJson = (JsonObject) firstObject.get(PacmanRuleConstants.SOURCE); if ((null != sourceJson) && (null != sourceJson.get(PacmanRuleConstants.INSTANCEID)) && (!sourceJson.get(PacmanRuleConstants.INSTANCEID).isJsonNull()) && (!StringUtils.isEmpty(sourceJson.get(PacmanRuleConstants.INSTANCEID).getAsString()))) isSSMAgentOnline = true; } } return isSSMAgentOnline; }
PacmanUtils { public static boolean checkSSMAgent(String id, String esUrl, String attributeName, String region, String accountId, String online) throws Exception { JsonArray hits; JsonParser parser = new JsonParser(); boolean isSSMAgentOnline = false; Map<String, Object> mustFilter = new HashMap<>(); Map<String, Object> mustNotFilter = new HashMap<>(); HashMultimap<String, Object> shouldFilter = HashMultimap.create(); Map<String, Object> mustTermsFilter = new HashMap<>(); mustFilter.put(convertAttributetoKeyword(attributeName), id); mustFilter.put(convertAttributetoKeyword(PacmanRuleConstants.REGION), region); mustFilter.put(convertAttributetoKeyword(PacmanRuleConstants.ACCOUNTID), accountId); mustFilter.put(convertAttributetoKeyword(PacmanRuleConstants.PING_STATUS), online); JsonObject resultJson = RulesElasticSearchRepositoryUtil.getQueryDetailsFromES(esUrl, mustFilter, mustNotFilter, shouldFilter, null, 0, mustTermsFilter, null,null); if (null != resultJson && resultJson.has(PacmanRuleConstants.HITS)) { String hitsJsonString = resultJson.get(PacmanRuleConstants.HITS).toString(); JsonObject hitsJson = (JsonObject) parser.parse(hitsJsonString); hits = hitsJson.getAsJsonObject().get(PacmanRuleConstants.HITS).getAsJsonArray(); if (hits.size() > 0) { JsonObject firstObject = (JsonObject) hits.get(0); JsonObject sourceJson = (JsonObject) firstObject.get(PacmanRuleConstants.SOURCE); if ((null != sourceJson) && (null != sourceJson.get(PacmanRuleConstants.INSTANCEID)) && (!sourceJson.get(PacmanRuleConstants.INSTANCEID).isJsonNull()) && (!StringUtils.isEmpty(sourceJson.get(PacmanRuleConstants.INSTANCEID).getAsString()))) isSSMAgentOnline = true; } } return isSSMAgentOnline; } }
PacmanUtils { public static boolean checkSSMAgent(String id, String esUrl, String attributeName, String region, String accountId, String online) throws Exception { JsonArray hits; JsonParser parser = new JsonParser(); boolean isSSMAgentOnline = false; Map<String, Object> mustFilter = new HashMap<>(); Map<String, Object> mustNotFilter = new HashMap<>(); HashMultimap<String, Object> shouldFilter = HashMultimap.create(); Map<String, Object> mustTermsFilter = new HashMap<>(); mustFilter.put(convertAttributetoKeyword(attributeName), id); mustFilter.put(convertAttributetoKeyword(PacmanRuleConstants.REGION), region); mustFilter.put(convertAttributetoKeyword(PacmanRuleConstants.ACCOUNTID), accountId); mustFilter.put(convertAttributetoKeyword(PacmanRuleConstants.PING_STATUS), online); JsonObject resultJson = RulesElasticSearchRepositoryUtil.getQueryDetailsFromES(esUrl, mustFilter, mustNotFilter, shouldFilter, null, 0, mustTermsFilter, null,null); if (null != resultJson && resultJson.has(PacmanRuleConstants.HITS)) { String hitsJsonString = resultJson.get(PacmanRuleConstants.HITS).toString(); JsonObject hitsJson = (JsonObject) parser.parse(hitsJsonString); hits = hitsJson.getAsJsonObject().get(PacmanRuleConstants.HITS).getAsJsonArray(); if (hits.size() > 0) { JsonObject firstObject = (JsonObject) hits.get(0); JsonObject sourceJson = (JsonObject) firstObject.get(PacmanRuleConstants.SOURCE); if ((null != sourceJson) && (null != sourceJson.get(PacmanRuleConstants.INSTANCEID)) && (!sourceJson.get(PacmanRuleConstants.INSTANCEID).isJsonNull()) && (!StringUtils.isEmpty(sourceJson.get(PacmanRuleConstants.INSTANCEID).getAsString()))) isSSMAgentOnline = true; } } return isSSMAgentOnline; } private  PacmanUtils(); }
PacmanUtils { public static boolean checkSSMAgent(String id, String esUrl, String attributeName, String region, String accountId, String online) throws Exception { JsonArray hits; JsonParser parser = new JsonParser(); boolean isSSMAgentOnline = false; Map<String, Object> mustFilter = new HashMap<>(); Map<String, Object> mustNotFilter = new HashMap<>(); HashMultimap<String, Object> shouldFilter = HashMultimap.create(); Map<String, Object> mustTermsFilter = new HashMap<>(); mustFilter.put(convertAttributetoKeyword(attributeName), id); mustFilter.put(convertAttributetoKeyword(PacmanRuleConstants.REGION), region); mustFilter.put(convertAttributetoKeyword(PacmanRuleConstants.ACCOUNTID), accountId); mustFilter.put(convertAttributetoKeyword(PacmanRuleConstants.PING_STATUS), online); JsonObject resultJson = RulesElasticSearchRepositoryUtil.getQueryDetailsFromES(esUrl, mustFilter, mustNotFilter, shouldFilter, null, 0, mustTermsFilter, null,null); if (null != resultJson && resultJson.has(PacmanRuleConstants.HITS)) { String hitsJsonString = resultJson.get(PacmanRuleConstants.HITS).toString(); JsonObject hitsJson = (JsonObject) parser.parse(hitsJsonString); hits = hitsJson.getAsJsonObject().get(PacmanRuleConstants.HITS).getAsJsonArray(); if (hits.size() > 0) { JsonObject firstObject = (JsonObject) hits.get(0); JsonObject sourceJson = (JsonObject) firstObject.get(PacmanRuleConstants.SOURCE); if ((null != sourceJson) && (null != sourceJson.get(PacmanRuleConstants.INSTANCEID)) && (!sourceJson.get(PacmanRuleConstants.INSTANCEID).isJsonNull()) && (!StringUtils.isEmpty(sourceJson.get(PacmanRuleConstants.INSTANCEID).getAsString()))) isSSMAgentOnline = true; } } return isSSMAgentOnline; } private  PacmanUtils(); static Set<String> getMissingTags(List<String> tags, List<String> mandatoryTags); static Annotation createAnnotaion(Map<String, String> ruleParam, String missingTagsStr,
            List<String> mandatoryTagsList, String description, String severity, String category); static XmlRpcClient getXMLRPCClient(String rpcUrl); static Boolean establishTrustForAllCertificates(); static Set<String> getMissingTagsfromResourceAttribute(List<String> mandatoryTags,
            Map<String, String> attributes); static Boolean checkIsCompliant(String version, Set<String> criteriaMapkeys,
            Map<String, String> kernelCriteriaMapDetails); static Map<String, String> getBody(Map<String, String> resourceAttributes); static String getResponse(Map<String, String> body, String apiGWurl); static boolean isAccountExists(List<String> accountNames, String resourceAttrAccName); static boolean isGuardDutyFindingsExists(String id, String esUrl, String attribute); static boolean checkResourceIdFromElasticSearch(String id, String esUrl, String attributeName, String region); static Map<String, String> getSeviceLimit(String id, String accountId, String esUrl); static List<String> getVolumeIdFromElasticSearch(String id, String esUrl, String attributeName); static Map<String, Boolean> getPolicyPublicAccess(AmazonS3Client awsS3Client, String s3BucketName,
            String accessType); static Map<String, Double> getVolumeCost(List<String> idList, String costServiceUrl); static Annotation createAnnotaion(Map<String, String> ruleParam, String missingTagsStr,
            List<String> mandatoryTagsList, String description, String severity, String category, String targetType); static Map<String, Boolean> getQueryFromElasticSearch(String securityGroupId,
            List<String> serviceWithSgEsUrl, String esUrlParam); static String getAppTagMappedToOU(String appId, String esUrl, String attributeName); static boolean checkAppTagMappedtoOUMatchesCurrentAppTag(String appId, String esUrl, String attributeName,
            String currentApptag); static Map<String, Boolean> checkS3HasOpenAccess(String checkId, String accountId, String esUrl,
            String resourceInfo); static String doHttpPost(final String url, final String requestBody); static String doHttpGet(final String url, Map<String, String> headers); static List<GroupIdentifier> getSecurityGroupsByInstanceId(String instanceId, String esUrl); static Set<String> getRouteTableId(String subnetId, String vpcId, String routetableEsURL, String type); static boolean getRouteTableRoutesId(List<String> routeTableIdList,Set<String> routeTableIdSet, String routetableRoutesEsURL,
            String cidrfilterValue, String internetGateWay); static boolean checkInstanceIdForPortRuleInES(String instanceId, String ec2PortUrl, String ruleId); static List<String> getSeverityVulnerabilitiesByInstanceId(String instanceId, String ec2WithVulnUrl,
            String severityVulnValue); static boolean checkACLAccess(AmazonS3Client awsS3Client, String s3BucketName, String accessType); static Annotation createS3Annotation(Map<String, String> ruleParam, String description, String severity,
            String category, String accessType, List<String> sourcesVerified, Map<String, Object> accessLevels,
            String resourceId); static Map<String, Boolean> checkAccessibleToAll(Set<GroupIdentifier> secuityGroups, String portToCheck,
            String sgRulesUrl, String cidrIp, String cidripv6,String target); static CloseableHttpClient getCloseableHttpClient(); static Map<String, Boolean> getFromAndToPorts(String fromPort, String toPort, String ipprotocol,
            Map<String, Boolean> openPorts); static Map<String, Boolean> isAccessbleToAll(Set<GroupIdentifier> secuityGroupSet, int target,
            String sgRulesUrl, String cidrIp); static boolean checkResourceIdForRuleInES(String resourceId, String url, String ruleId, String accountid); static Map<String, String> getIdleLoadBalancerDetails(String checkId, String id, String esUrl,
            String region, String accountId); static boolean getUnownedAdGroup(String resourceId, String url); static boolean getNestedRoles(String resourceId, String url, String type); static JsonArray getMemberOf(String resourceId, String url); static Map<String, Object> checkInstanceIdFromElasticSearchForQualys(String id, String esUrl,
            String attributeName, String target); static Map<String, String> getLowUtilizationEc2Details(String checkId, String id, String esUrl,
            String region, String accountId); static Map<String, String> getDetailsForCheckId(String checkId, String id, String esUrl, String region,
            String accountId); static String getQueryDataForCheckid(String checkId, String esUrl, String id, String region, String accountId); static Map<String, String> getRDSDetailsForCheckId(String checkId, String id, String esUrl, String region,
            String accountId); static Map<String, String> getAmazonEC2ReservedInstanceLeaseExpiration(String checkId, String id,
            String esUrl, String region, String accountId); static Map<String, Boolean> getPublicAccessPolicy(AmazonS3Client awsS3Client, String s3BucketName,
            String accessType); @SuppressWarnings("unchecked") static Map<String, String> getEBSVolumeWithCheckId(String checkId, String id, String esUrl, String region,
            String accountId); static Map<String, String> getEBSSnapshotWithCheckId(String checkId, String id, String esUrl, String region,
            String accountId); static Map<String, String> getRDSSnapshotWithCheckId(String checkId, String id, String esUrl, String region,
            String accountId); static boolean checkSSMAgent(String id, String esUrl, String attributeName, String region, String accountId,
            String online); static Map<String, Object> getResourceCreatedDetails(String reSourceId, String eventType,
            String heimdallESURL); static String convertAttributetoKeyword(String attributeName); static Annotation createELBAnnotation(String elbType, Map<String, String> ruleParam,
             String description, String severity, String category); static String getPacmanHost(String envVariableName); static String formatUrl(Map<String, String> ruleParam, String param); static String formatUrl(Map<String, String> ruleParam, String param,String host); static Boolean doesAllHaveValue(String...strings ); static List<String> splitStringToAList(String toSplit, String separator); static Long calculateLaunchedDuration(String formattedDateString); static boolean isNonStandardRegion(List<String> standardRegions,
            String region); static Boolean isIgwFound(String cidrIp, String id, String type, Map<String, Object> issue,
            Set<String> routeTableIdSet, String routetableRoutesEsURL, String internetGateWay,String cidrIpv6); static String getKernelInfoFromElasticSearchBySource(
            String instanceId, String kernelInfoApi, String source); static Annotation createAnnotation(String resourceType, Map<String, String> ruleParam, String description,
            String severity, String category); static boolean getRouteTableRoutesId(List<String> routeTableIdList, Set<String> routeTableIdSet,
            String routetableRoutesEsURL, String cidrIp, String internetGateWay,String cidrIpv6); static boolean isHavingPublicAccess(JsonArray jsonArray, String endPoint); static List<GroupIdentifier> getSecurityGrouplist(String securityGroupId, String delimeter,
            List<GroupIdentifier> securityGrouplist); static Annotation setAnnotation(Map<String, Boolean> openPortsMap, Map<String, String> ruleParam,
            String subnetId, String descrition, LinkedHashMap<String, Object> issue); static List<GroupIdentifier> getSecurityBroupIdByElb(String resourceId, String elbSecurityApi,
            String accountId, String region); static Annotation createS3Annotation(Map<String, String> ruleParam, String description); static List<GroupIdentifier> getSecurityGroupsByResourceId(String resourceId, String esUrl,String resourceField,String sgField,String sgStatusField); static String getEnvironmentVariable(String envVar); static Map<String,String> getHeader(String base64Creds); static JsonObject getConfigurationsFromConfigApi(String url,Map<String,String> headers); static Set<String> getValueFromElasticSearchAsSet(String esUrl, Map<String,Object> mustFilterMap,HashMultimap<String, Object> shouldFilterMap,Map<String, Object> mustTermsFilterMap,String fieldKey,Map<String, List<String>> matchPhrase); static String getQueryFromElasticSearch(String securityGroupId,
            List<String> serviceWithSgEsUrl, String esUrlParam,Map<String,String> ruleParams); static String getValueFromElasticSearch(String accountId,String id, String esUrl, String attributeName, String region,String fieldKey,String latest,Map<String, List<String>> matchPhrase); static boolean checkInstanceIdForPortRuleInES(String instanceId, String ec2PortUrl, String ruleId,
			String type); static Map<String, Object> checkResourceIdBypolicyName(String esUrl, Map<String, Object> mustFilter); static Map<String, Object> getAzurePolicyEvaluationResults(String esUrl, String resourceId,
			String policyDefinitionName); }
PacmanUtils { public static boolean checkSSMAgent(String id, String esUrl, String attributeName, String region, String accountId, String online) throws Exception { JsonArray hits; JsonParser parser = new JsonParser(); boolean isSSMAgentOnline = false; Map<String, Object> mustFilter = new HashMap<>(); Map<String, Object> mustNotFilter = new HashMap<>(); HashMultimap<String, Object> shouldFilter = HashMultimap.create(); Map<String, Object> mustTermsFilter = new HashMap<>(); mustFilter.put(convertAttributetoKeyword(attributeName), id); mustFilter.put(convertAttributetoKeyword(PacmanRuleConstants.REGION), region); mustFilter.put(convertAttributetoKeyword(PacmanRuleConstants.ACCOUNTID), accountId); mustFilter.put(convertAttributetoKeyword(PacmanRuleConstants.PING_STATUS), online); JsonObject resultJson = RulesElasticSearchRepositoryUtil.getQueryDetailsFromES(esUrl, mustFilter, mustNotFilter, shouldFilter, null, 0, mustTermsFilter, null,null); if (null != resultJson && resultJson.has(PacmanRuleConstants.HITS)) { String hitsJsonString = resultJson.get(PacmanRuleConstants.HITS).toString(); JsonObject hitsJson = (JsonObject) parser.parse(hitsJsonString); hits = hitsJson.getAsJsonObject().get(PacmanRuleConstants.HITS).getAsJsonArray(); if (hits.size() > 0) { JsonObject firstObject = (JsonObject) hits.get(0); JsonObject sourceJson = (JsonObject) firstObject.get(PacmanRuleConstants.SOURCE); if ((null != sourceJson) && (null != sourceJson.get(PacmanRuleConstants.INSTANCEID)) && (!sourceJson.get(PacmanRuleConstants.INSTANCEID).isJsonNull()) && (!StringUtils.isEmpty(sourceJson.get(PacmanRuleConstants.INSTANCEID).getAsString()))) isSSMAgentOnline = true; } } return isSSMAgentOnline; } private  PacmanUtils(); static Set<String> getMissingTags(List<String> tags, List<String> mandatoryTags); static Annotation createAnnotaion(Map<String, String> ruleParam, String missingTagsStr,
            List<String> mandatoryTagsList, String description, String severity, String category); static XmlRpcClient getXMLRPCClient(String rpcUrl); static Boolean establishTrustForAllCertificates(); static Set<String> getMissingTagsfromResourceAttribute(List<String> mandatoryTags,
            Map<String, String> attributes); static Boolean checkIsCompliant(String version, Set<String> criteriaMapkeys,
            Map<String, String> kernelCriteriaMapDetails); static Map<String, String> getBody(Map<String, String> resourceAttributes); static String getResponse(Map<String, String> body, String apiGWurl); static boolean isAccountExists(List<String> accountNames, String resourceAttrAccName); static boolean isGuardDutyFindingsExists(String id, String esUrl, String attribute); static boolean checkResourceIdFromElasticSearch(String id, String esUrl, String attributeName, String region); static Map<String, String> getSeviceLimit(String id, String accountId, String esUrl); static List<String> getVolumeIdFromElasticSearch(String id, String esUrl, String attributeName); static Map<String, Boolean> getPolicyPublicAccess(AmazonS3Client awsS3Client, String s3BucketName,
            String accessType); static Map<String, Double> getVolumeCost(List<String> idList, String costServiceUrl); static Annotation createAnnotaion(Map<String, String> ruleParam, String missingTagsStr,
            List<String> mandatoryTagsList, String description, String severity, String category, String targetType); static Map<String, Boolean> getQueryFromElasticSearch(String securityGroupId,
            List<String> serviceWithSgEsUrl, String esUrlParam); static String getAppTagMappedToOU(String appId, String esUrl, String attributeName); static boolean checkAppTagMappedtoOUMatchesCurrentAppTag(String appId, String esUrl, String attributeName,
            String currentApptag); static Map<String, Boolean> checkS3HasOpenAccess(String checkId, String accountId, String esUrl,
            String resourceInfo); static String doHttpPost(final String url, final String requestBody); static String doHttpGet(final String url, Map<String, String> headers); static List<GroupIdentifier> getSecurityGroupsByInstanceId(String instanceId, String esUrl); static Set<String> getRouteTableId(String subnetId, String vpcId, String routetableEsURL, String type); static boolean getRouteTableRoutesId(List<String> routeTableIdList,Set<String> routeTableIdSet, String routetableRoutesEsURL,
            String cidrfilterValue, String internetGateWay); static boolean checkInstanceIdForPortRuleInES(String instanceId, String ec2PortUrl, String ruleId); static List<String> getSeverityVulnerabilitiesByInstanceId(String instanceId, String ec2WithVulnUrl,
            String severityVulnValue); static boolean checkACLAccess(AmazonS3Client awsS3Client, String s3BucketName, String accessType); static Annotation createS3Annotation(Map<String, String> ruleParam, String description, String severity,
            String category, String accessType, List<String> sourcesVerified, Map<String, Object> accessLevels,
            String resourceId); static Map<String, Boolean> checkAccessibleToAll(Set<GroupIdentifier> secuityGroups, String portToCheck,
            String sgRulesUrl, String cidrIp, String cidripv6,String target); static CloseableHttpClient getCloseableHttpClient(); static Map<String, Boolean> getFromAndToPorts(String fromPort, String toPort, String ipprotocol,
            Map<String, Boolean> openPorts); static Map<String, Boolean> isAccessbleToAll(Set<GroupIdentifier> secuityGroupSet, int target,
            String sgRulesUrl, String cidrIp); static boolean checkResourceIdForRuleInES(String resourceId, String url, String ruleId, String accountid); static Map<String, String> getIdleLoadBalancerDetails(String checkId, String id, String esUrl,
            String region, String accountId); static boolean getUnownedAdGroup(String resourceId, String url); static boolean getNestedRoles(String resourceId, String url, String type); static JsonArray getMemberOf(String resourceId, String url); static Map<String, Object> checkInstanceIdFromElasticSearchForQualys(String id, String esUrl,
            String attributeName, String target); static Map<String, String> getLowUtilizationEc2Details(String checkId, String id, String esUrl,
            String region, String accountId); static Map<String, String> getDetailsForCheckId(String checkId, String id, String esUrl, String region,
            String accountId); static String getQueryDataForCheckid(String checkId, String esUrl, String id, String region, String accountId); static Map<String, String> getRDSDetailsForCheckId(String checkId, String id, String esUrl, String region,
            String accountId); static Map<String, String> getAmazonEC2ReservedInstanceLeaseExpiration(String checkId, String id,
            String esUrl, String region, String accountId); static Map<String, Boolean> getPublicAccessPolicy(AmazonS3Client awsS3Client, String s3BucketName,
            String accessType); @SuppressWarnings("unchecked") static Map<String, String> getEBSVolumeWithCheckId(String checkId, String id, String esUrl, String region,
            String accountId); static Map<String, String> getEBSSnapshotWithCheckId(String checkId, String id, String esUrl, String region,
            String accountId); static Map<String, String> getRDSSnapshotWithCheckId(String checkId, String id, String esUrl, String region,
            String accountId); static boolean checkSSMAgent(String id, String esUrl, String attributeName, String region, String accountId,
            String online); static Map<String, Object> getResourceCreatedDetails(String reSourceId, String eventType,
            String heimdallESURL); static String convertAttributetoKeyword(String attributeName); static Annotation createELBAnnotation(String elbType, Map<String, String> ruleParam,
             String description, String severity, String category); static String getPacmanHost(String envVariableName); static String formatUrl(Map<String, String> ruleParam, String param); static String formatUrl(Map<String, String> ruleParam, String param,String host); static Boolean doesAllHaveValue(String...strings ); static List<String> splitStringToAList(String toSplit, String separator); static Long calculateLaunchedDuration(String formattedDateString); static boolean isNonStandardRegion(List<String> standardRegions,
            String region); static Boolean isIgwFound(String cidrIp, String id, String type, Map<String, Object> issue,
            Set<String> routeTableIdSet, String routetableRoutesEsURL, String internetGateWay,String cidrIpv6); static String getKernelInfoFromElasticSearchBySource(
            String instanceId, String kernelInfoApi, String source); static Annotation createAnnotation(String resourceType, Map<String, String> ruleParam, String description,
            String severity, String category); static boolean getRouteTableRoutesId(List<String> routeTableIdList, Set<String> routeTableIdSet,
            String routetableRoutesEsURL, String cidrIp, String internetGateWay,String cidrIpv6); static boolean isHavingPublicAccess(JsonArray jsonArray, String endPoint); static List<GroupIdentifier> getSecurityGrouplist(String securityGroupId, String delimeter,
            List<GroupIdentifier> securityGrouplist); static Annotation setAnnotation(Map<String, Boolean> openPortsMap, Map<String, String> ruleParam,
            String subnetId, String descrition, LinkedHashMap<String, Object> issue); static List<GroupIdentifier> getSecurityBroupIdByElb(String resourceId, String elbSecurityApi,
            String accountId, String region); static Annotation createS3Annotation(Map<String, String> ruleParam, String description); static List<GroupIdentifier> getSecurityGroupsByResourceId(String resourceId, String esUrl,String resourceField,String sgField,String sgStatusField); static String getEnvironmentVariable(String envVar); static Map<String,String> getHeader(String base64Creds); static JsonObject getConfigurationsFromConfigApi(String url,Map<String,String> headers); static Set<String> getValueFromElasticSearchAsSet(String esUrl, Map<String,Object> mustFilterMap,HashMultimap<String, Object> shouldFilterMap,Map<String, Object> mustTermsFilterMap,String fieldKey,Map<String, List<String>> matchPhrase); static String getQueryFromElasticSearch(String securityGroupId,
            List<String> serviceWithSgEsUrl, String esUrlParam,Map<String,String> ruleParams); static String getValueFromElasticSearch(String accountId,String id, String esUrl, String attributeName, String region,String fieldKey,String latest,Map<String, List<String>> matchPhrase); static boolean checkInstanceIdForPortRuleInES(String instanceId, String ec2PortUrl, String ruleId,
			String type); static Map<String, Object> checkResourceIdBypolicyName(String esUrl, Map<String, Object> mustFilter); static Map<String, Object> getAzurePolicyEvaluationResults(String esUrl, String resourceId,
			String policyDefinitionName);  }