Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds an entry point for the sbom-tool use the ScanCommand class. #936

Merged
merged 5 commits into from Dec 19, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,19 @@
return 0;
}

/// <summary>
/// Method to provide a way to execute the scan command and obtain the ScanResult object.
/// </summary>
/// <param name="settings">ScanSettings object specifying the parameters for the scan execution.</param>
/// <returns>A ScanResult object.</returns>
public async Task<ScanResult> ExecuteScanCommandAsync(ScanSettings settings)
{
this.fileWritingService.Init(settings.Output);
var result = await this.scanExecutionService.ExecuteScanAsync(settings);
this.WriteComponentManifest(settings, result);
return result;
}

Check warning on line 59 in src/Microsoft.ComponentDetection.Orchestrator/Commands/ScanCommand.cs

View check run for this annotation

Codecov / codecov/patch

src/Microsoft.ComponentDetection.Orchestrator/Commands/ScanCommand.cs#L54-L59

Added lines #L54 - L59 were not covered by tests

private void WriteComponentManifest(ScanSettings settings, ScanResult scanResult)
{
FileInfo userRequestedManifestPath = null;
Expand Down
Loading