Powershell script to delete a project in CxSAST and all it's related data.
Previous to delete a project, the script finds all the scans, delete every scan in CxSAST and removes the stored source code (in the files system) for every removed scan. After that, the project itself is removed from CxSAST.
.\DeleteProject.ps1 -CxServer "http://localhost:80" -CxUser "user" -CxPass "password" -projectName "CxSAST project name" [-CxSourceRoot "C:\CxSrc"] [-CxDelSrcDir] [-ContinueOnDelSrcDirError] [-DryRun] [-logFilename "mylogfile.txt"] [-CxDebug]
URL of your CxSAST instance (e.g. "http://localhost:80" )
CxSAST username (with permissions to manage scans and projects)
Password of CxSAST user
Root directory of scans's source code (defaults to D:\CxSrc)
By default, the script WILL NOT delete the scans
source code directory.
If set, scans' source code directory will be removed.
By default, the script will stop in case of an error deleting the scan surce code directory.
If set, the script will continue processing the scans of the project (deleting every scan in CxSAST and removing the source code from the filesystem)
If set, print the out the actions to do, but do not execute them.
Defaults to DeleteProject.log
If set, verbose debug. Defaults to info.