Example #1
0
def test_override():
    build_break_rules = config.get("build_break_rules").copy()
    golang_cmd = config.get("scan_tools_args_map").get("go")
    assert list(golang_cmd.keys()) == ["source-go", "staticcheck"]
    test_data_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "data")
    config.set("SAST_SCAN_SRC_DIR", test_data_dir)
    config.reload()
    # Test if we are able to override the whole dict
    new_rules = config.get("build_break_rules")
    assert build_break_rules != new_rules
    # Test if we are able to override a command
    golang_cmd = config.get("scan_tools_args_map").get("go")
    assert golang_cmd[0] == "echo"
    assert config.get("scan_type") == "credscan,java"
Example #2
0
 def value(self, config, section="MEOS"):
     config.set(section, self.confSection + "Color",
                self.ColorButton.color.name())
     config.set(section, self.confSection + "lineWidth",
                self.Grosor.value())
     config.set(section, self.confSection + "lineStyle",
                self.Linea.currentValue())
     config.set(section, self.confSection + "marker",
                self.Marca.currentValue())
     return config
Example #3
0
def start(
    host='http://localhost',
    port=9000,
    uuid=None,
    secret=None,
    username=None,
    password=None,
    organization=None,
    token=None,
    **kwargs):
  config.set(host=host, port=port)
  if uuid and secret:
    credentials.set_device_credentials(uuid, secret)
  elif username and password and organization:
    credentials.set_user_credentials(username, password, organization)
  elif token:
    credentials.set_token(token)
  socket.start(host, port, credentials.get_token())
Example #4
0
 def default(cls, config, confSection, section="MEOS"):
     config.set(section, confSection + "Color", "#000000")
     config.set(section, confSection + "lineWidth", "0.5")
     config.set(section, confSection + "lineStyle", "-")
     config.set(section, confSection + "marker", "None")
     return config
Example #5
0
 def default(cls, config, confSection, section="MEOS"):
     config.set(section, confSection + "Color", "#000000")
     config.set(section, confSection + "lineWidth", "0.5")
     config.set(section, confSection + "lineStyle", "-")
     config.set(section, confSection + "marker", "None")
     return config
Example #6
0
 def value(self, config, section="MEOS"):
     config.set(section, self.confSection + "Color", self.ColorButton.color.name())
     config.set(section, self.confSection + "lineWidth", str(self.Grosor.value()))
     config.set(section, self.confSection + "lineStyle", self.Linea.currentValue())
     config.set(section, self.confSection + "marker", self.Marca.currentValue())
     return config