Remove legacy AttackTracer repo content
Some checks failed
OfficeCom Sentinel Client / build-client (push) Has been cancelled

This commit is contained in:
OfficeCom Codex
2026-07-17 00:55:16 +02:00
parent 85e394f647
commit b5e06b885a
57 changed files with 98 additions and 3602 deletions

View File

@@ -0,0 +1,41 @@
namespace OCSentinelCli.Commands;
internal static class ScanAndUploadCommand
{
public static int Execute(string[] args)
{
string outputPath = @"C:\ProgramData\OCSentinel\reports\latest.json";
bool hasOutput = false;
for (int i = 0; i < args.Length; i++)
{
if (string.Equals(args[i], "--output", StringComparison.OrdinalIgnoreCase) && i + 1 < args.Length)
{
outputPath = args[i + 1];
hasOutput = true;
break;
}
}
List<string> scanArgs = [.. args];
if (!hasOutput)
{
scanArgs.Add("--output");
scanArgs.Add(outputPath);
}
int scanExitCode = ScanCommand.Execute([.. scanArgs]);
if (scanExitCode != 0)
{
return scanExitCode;
}
var uploadArgs = new List<string>
{
"--report",
outputPath
};
return UploadCommand.Execute([.. uploadArgs]);
}
}