Tabnine Logo
PacmanRule
Code IndexAdd Tabnine to your IDE (free)

How to use
PacmanRule
in
com.tmobile.pacman.commons.rule

Best Java code snippets using com.tmobile.pacman.commons.rule.PacmanRule (Showing top 20 results out of 315)

origin: tmobile/pacbot

@PacmanRule(key = "check-for-missing-mandatory-tags", desc = "checks services for missing mandatory tags", severity = PacmanSdkConstants.SEV_HIGH,category=PacmanSdkConstants.GOVERNANCE)
public class TaggingRule extends BaseRule {
origin: tmobile/pacbot

annotation.put(PacmanSdkConstants.EXECUTION_ID, executionId);
if (null != ruleAnnotation) {
  annotation.put(PacmanSdkConstants.RULE_CATEGORY, ruleAnnotation.category());
  annotation.put(PacmanSdkConstants.RULE_SEVERITY, ruleAnnotation.severity());
origin: tmobile/pacbot

/**
 * Find associate class.
 *
 * @param ruleKey the rule key
 * @return the class
 * @throws InstantiationException the instantiation exception
 * @throws IllegalAccessException the illegal access exception
 * @throws ClassNotFoundException the class not found exception
 */
public static Class<?> findAssociateClass(String ruleKey)
    throws InstantiationException, IllegalAccessException, ClassNotFoundException {
  Reflections reflections = new Reflections("com.tmobile");
  Set<Class<?>> allRules = reflections.getTypesAnnotatedWith(PacmanRule.class);
  for (Class<?> ruleClass : allRules) {
    PacmanRule rule = ruleClass.getAnnotation(PacmanRule.class);
    if (rule.key().equals(ruleKey)) {
      return ruleClass;
    }
  }
  // if code reached here , this means no class found associated to this
  // key
  throw new ClassNotFoundException("cannot find class associated to rule");
}
origin: tmobile/pacbot

/**
 * Gets the rule attribute.
 *
 * @param result the result
 * @param ruleParam the rule param
 * @param ruleAnnotation the rule annotation
 * @param attribute the attribute
 * @return the attribute value from ruleParam--ruleAnnotation--RuleResult
 *         wherever found first, not_found otherwise
 */
public static String getRuleAttribute(RuleResult result, Map<String, String> ruleParam, PacmanRule ruleAnnotation,
    String attribute) {
  if (ruleParam != null && ruleParam.containsKey(attribute)) {
    return ruleParam.get(attribute);
  }
  if (ruleAnnotation != null) {
    return ruleAnnotation.category();
  }
  return getValueFromResult(result, attribute);
}
origin: tmobile/pacbot

@PacmanRule(key = "check-for-unused-application-elb", desc = "checks for unused application elb which are not associated with any instance", severity = PacmanSdkConstants.SEV_HIGH, category = PacmanSdkConstants.GOVERNANCE)
public class UnusedApplicationElbRule extends BaseRule {
origin: tmobile/pacbot

@PacmanRule(key = "check-for-service-account-with-svc", desc = "Checks for service account starts with svc_ or not", severity = PacmanSdkConstants.SEV_HIGH, category = PacmanSdkConstants.GOVERNANCE)
public class ServiceAccountWithSvcRule extends BaseRule {
origin: tmobile/pacbot

@PacmanRule(key = "check-for-improper-account-name", desc = "Checks for account names having spaces inbetween", severity = PacmanSdkConstants.SEV_HIGH, category = PacmanSdkConstants.GOVERNANCE)
public class CheckImproperAccountNamesRule extends BaseRule {
origin: tmobile/pacbot

@PacmanRule(key = "check-aws-config-enabled", desc = "Checks for AWS Config enabled for given AWS account and region", severity = PacmanSdkConstants.SEV_MEDIUM, category = PacmanSdkConstants.SECURITY)
public class CheckAWSConfigEnabled extends BaseRule {
origin: tmobile/pacbot

@PacmanRule(key = "check-for-s3-MFA-delete-enabled", desc = "checks s3 bucket has MFA delete enabled or not", severity = PacmanSdkConstants.SEV_HIGH, category = PacmanSdkConstants.SECURITY)
public class CheckMFADeleteEnabledRule extends BaseRule {
origin: tmobile/pacbot

@PacmanRule(key = "check-for-unused-classic-elb", desc = "checks for unused classic elb which are not associated with any instance", severity = PacmanSdkConstants.SEV_HIGH, category = PacmanSdkConstants.GOVERNANCE)
public class UnusedClassicElbRule extends BaseRule {
origin: tmobile/pacbot

@PacmanRule(key = "check-for-proper-roles-name", desc = "Checks for roles name starts with r_ or not", severity = PacmanSdkConstants.SEV_HIGH, category = PacmanSdkConstants.GOVERNANCE)
public class ProperRolesNameRule extends BaseRule {
origin: tmobile/pacbot

@PacmanRule(key = "check-for-unused-security-group", desc = "checks for unused security groups", severity = PacmanSdkConstants.SEV_HIGH, category = PacmanSdkConstants.GOVERNANCE)
public class SecurityGroupNotUsedRule extends BaseRule {
origin: tmobile/pacbot

@PacmanRule(key = "check-for-ec2-with-severity-vulnerabilities", desc = "If an EC2 instance having severity (S5,S4,S3) vulnerability then report it as an issue with severity High", severity = PacmanSdkConstants.SEV_HIGH, category = PacmanSdkConstants.SECURITY)
public class EC2withSeverityVulnerabilityRule extends BaseRule {
origin: tmobile/pacbot

@PacmanRule(key = "check-for-unused-ebs-rule", desc = "checks for unused Ebs which are not associated with any instance", severity = PacmanSdkConstants.SEV_HIGH, category = PacmanSdkConstants.GOVERNANCE)
public class UnusedEBSRule extends BaseRule {
origin: tmobile/pacbot

@PacmanRule(key = "check-for-lambda-fun-with-admin-or-IAM-privileges", desc = "Lambda functions should not have administrative permissions (Managed Policy : AdministratorAccess). Least privileges should be granted to lambda functions. Also IAM privileges should never be granted to lambda functions. (Exceptional cases has to be reviewed and prior whitelisting would be required.)", severity = PacmanSdkConstants.SEV_HIGH, category = PacmanSdkConstants.SECURITY)
public class CheckLambdaFunWithAdminOrIamPrivileges extends BaseRule {
origin: tmobile/pacbot

@PacmanRule(key = "check-for-service-limit", desc = "checks entirely for service limit", severity = PacmanSdkConstants.SEV_HIGH, category = PacmanSdkConstants.GOVERNANCE)
public class ServiceLimitRule extends BaseRule {
origin: tmobile/pacbot

@PacmanRule(key = "check-for-improper-roles-name", desc = "Checks for improper roles name", severity = PacmanSdkConstants.SEV_HIGH, category = PacmanSdkConstants.GOVERNANCE)
public class CheckImproperRolesNamesRule extends BaseRule {
origin: tmobile/pacbot

@PacmanRule(key = "check-for-unused-elastic-ip", desc = "checks for unused elastic ip which are not associated with any instance", severity = PacmanSdkConstants.SEV_HIGH, category = PacmanSdkConstants.GOVERNANCE)
public class UnusedElasticIpRule extends BaseRule {
origin: tmobile/pacbot

@PacmanRule(key = "check-for-onprem-scanned-by-qualys", desc = "checks for onprem scanned by qualys,if not found then its an issue", severity = PacmanSdkConstants.SEV_HIGH, category = PacmanSdkConstants.GOVERNANCE)
public class OnpremScannedByQualysRule extends BaseRule {
origin: tmobile/pacbot

@PacmanRule(key = "check-guard-duty-enabled-for-all-accounts", desc = "AWS Guard Duty service should be enabled on all regions of all AWS accounts", severity = PacmanSdkConstants.SEV_HIGH, category = PacmanSdkConstants.SECURITY)
public class CheckGuardDutyForAllAccountsRule extends BaseRule {
com.tmobile.pacman.commons.rulePacmanRule

Most used methods

  • <init>
  • category
  • key
  • severity

Popular in Java

  • Parsing JSON documents to java classes using gson
  • requestLocationUpdates (LocationManager)
  • runOnUiThread (Activity)
  • compareTo (BigDecimal)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now