Skip to content

Configure App.config

Nathan Leach edited this page Mar 2, 2020 · 13 revisions

An example XML configuration file is shown below. The configuration element contains sub-elements that contain the configuration attributes. These sections are described below:

  • configSection: This is a .Net internal configuration that should not be modified.
  • CxConnection: The server connection configuration.
  • CxCredentials: Credentials used when connecting the the web api.
  • CxAnalyticsService: Controls how the program executes.
  • CxLogOutput: Configuration for the Logging Output component.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="CxCredentials" type="CxAnalytix.Configuration.CxCredentials, Configuration" />
    <section name="CxConnection" type="CxAnalytix.Configuration.CxConnection, Configuration" />
    <section name="CxAnalyticsService" type="CxAnalytix.Configuration.CxAnalyticsService, Configuration" />
    <section name="CxLogOutput" type="CxAnalytix.Out.Log4NetOutput.LogOutputConfig, Log4NetOutput" />
  </configSections>

  <!-- Common config parameters -->
  <CxConnection URL="http://localhost"
                mnoURL="http://localhost:8080"
                TimeoutSeconds="600" ValidateCertificates="true" />
  <CxCredentials Username="foo" Password ="bar" Token="" />
  <CxAnalyticsService ConcurrentThreads="2" StateDataStoragePath=".\"
                      ProcessPeriodMinutes="120"
                      OutputFactoryClassPath="CxAnalytix.Out.Log4NetOutput.LoggerOutFactory, Log4NetOutput"
                      SASTScanSummaryRecordName="RECORD_SAST_Scan_Summary"
                      SASTScanDetailRecordName="RECORD_SAST_Scan_Detail"
                      SCAScanSummaryRecordName="RECORD_SCA_Scan_Summary"
                      SCAScanDetailRecordName="RECORD_SCA_Scan_Detail"
                      ProjectInfoRecordName="RECORD_Project_Info"
                      PolicyViolationsRecordName="RECORD_Policy_Violations"
                      />

  
  <!-- Specific output method configuration parameters -->
  <CxLogOutput DataRetentionDays="14" OutputRoot="logs\">
    <PurgeSpecs>
      <spec MatchSpec="*.log.*" />
    </PurgeSpecs>
  </CxLogOutput>


</configuration>