The API client can retrieve a project configuration object from a given project. A project configuration object needs to be submitted as a method argument when running a scan or when configuring a project.
The project configuration object is of class CliScanArgs / ProjectConfiguration, and it includes:
- .PrjSettings: An instance of class ProjectSettings, which includes the following fields:
- .ProjectName: Full path on CxSAST server to project (string, beginning with "CxServer\"). You can find this path in the CxSAST web interface. When being submitted as an argument in the Scan method, if the project doesn't already exist, CxSAST will create a new one.
- .PresetID: ID# of query preset to be used. You can find query preset IDs in the CxSAST database, in the dbo.Presets table.
- .ScanConfigurationID: ID# of character encoding used in code project files. You can find encoding IDsin the CxSAST database, in the dbo.configurations table; or, the API client can get available encoding options.
- .SrcCodeSettings: An instance of class SourceCodeSettings, which includes the following fields:
- .SourceOrigin: One of the following (Source Pulling is not supported for API clients):
- .PackagedCode: An instance of class LocalCodeContainer, for local scans. Includes the following fields:
- .FileName: Path to ZIP archive of code project (string, for a Local scan).
- .ZippedFile: Byte array containing the contents of the code project. See example.
- .ScheduleSettings.Schedule: When to scan. Ignored when being submitted as an argument in the Scan method.
- .IsPrivateScan: Whether the scan results should be private, that is, only for the current user (boolean).
- .IsIncremental: Whether the scan should be only of new and modified files since the last previous scan (boolean).