All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.danielsomerfield.cvecheck.gradle.CVECheckExtensionBootstrap.groovy Maven / Gradle / Ivy

There is a newer version: 0.6.2-100
Show newest version
package com.danielsomerfield.cvecheck.gradle

import com.danielsomerfield.cvecheck.gradle.handlers.buildRules.*
import com.danielsomerfield.util.Maybe

class CVECheckExtensionBootstrap {

  def CVECheckExtension extension() {
    return new CVECheckExtension(buildRuleBuilder(), defaultBuildRules())
  }

  def List defaultBuildRules() {
    [
        new CVSSIndividualThresholdBuildRule(new BuildRuleConfiguration(Maybe.some(5))),
        new CVSSOverallThresholdBuildRule(new BuildRuleConfiguration(Maybe.some(10)))
    ]
  }

  def BuildRuleBuilder buildRuleBuilder() {
    new CVEBuildRuleBuilder(buildRuleMapping())
  }

  def Map> buildRuleMapping() {
    [
        "cvss-overall-threshold"   : CVSSOverallThresholdBuildRule.class,
        "cvss-individual-threshold": CVSSOverallThresholdBuildRule.class
    ]
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy