advanced-security / component-detection-dependency-submission-action

MIT License
8 stars 4 forks source link

Add Windows support ( closes #19) #20

Closed felickz closed 1 year ago

felickz commented 1 year ago

If windows, download .exe from component-detection and write to .exe path.

Tested locally on windows and in repo.

Details ``` Running component-detection D:\a\Automapper.Sample\Automapper.Sample\component-detection.exe scan --SourceDirectory . --ManifestFile ./output.json [04:53:01 INF] Log file: C:\Users\runneradmin\AppData\Local\Temp\GovCompDisc_Log_20230505045301477_1[8](https://github.com/octodemo/Automapper.Sample/actions/runs/4890059633/jobs/8729136500#step:6:9)32.log [04:53:01 INF] Run correlation id: 1a0be8a[9](https://github.com/octodemo/Automapper.Sample/actions/runs/4890059633/jobs/8729136500#step:6:10)-2e9f-4f69-84b0-eb1aadee7c16 [04:53:01 INF] Finding components... [04:53:01 INF] Starting enumeration of D:\a\Automapper.Sample\Automapper.Sample [04:53:01 INF] Enumerated 53 files and 15 directories in 00:00:00.0231367 [04:53:01 INF] No instructions received to scan docker images. [04:53:18 INF] [04:53:18 INF] _______________________________________________________________________________________________________________________________________ [04:53:18 INF] |Component Detector Id |Detection Time |# Components Found |# Explicitly Referenced | [04:53:18 INF] |______________________________|______________________________|______________________________|________________________________________| [04:53:18 INF] |CocoaPods |0.083 seconds |0 |0 | [04:53:18 INF] |______________________________|______________________________|______________________________|________________________________________| [04:53:18 INF] |Go |0.081 seconds |0 |0 | [04:53:18 INF] |______________________________|______________________________|______________________________|________________________________________| [04:53:18 INF] |Gradle |0.072 seconds |0 |0 | [04:53:18 INF] |______________________________|______________________________|______________________________|________________________________________| [04:53:18 INF] |Ivy (Beta) |17 seconds |0 |0 | [04:53:18 INF] |______________________________|______________________________|______________________________|________________________________________| [04:53:18 INF] |Linux |0.075 seconds |0 |0 | [04:53:18 INF] |______________________________|______________________________|______________________________|________________________________________| [04:53:18 INF] |MvnCli |17 seconds |0 |0 | [04:53:18 INF] |______________________________|______________________________|______________________________|________________________________________| [04:53:18 INF] |Npm |0.[11](https://github.com/octodemo/Automapper.Sample/actions/runs/4890059633/jobs/8729136500#step:6:12) seconds |0 |0 | [04:53:18 INF] |______________________________|______________________________|______________________________|________________________________________| [04:53:18 INF] |NpmLockfile3 (Beta) |0.11 seconds |0 |0 | [04:53:18 INF] |______________________________|______________________________|______________________________|________________________________________| [04:53:18 INF] |NpmWithRoots |0.11 seconds |0 |0 | [04:53:18 INF] |______________________________|______________________________|______________________________|________________________________________| [04:53:18 INF] |NuGet |0.11 seconds |0 |0 | [04:53:18 INF] |______________________________|______________________________|______________________________|________________________________________| [04:53:18 INF] |NuGetPackagesConfig |0.11 seconds |0 |0 | [04:53:18 INF] |______________________________|______________________________|______________________________|________________________________________| [04:53:18 INF] |NuGetProjectCentric |0.34 seconds |3 |1 | [04:53:18 INF] |______________________________|______________________________|______________________________|________________________________________| [04:53:18 INF] |Pip |4.2 seconds |0 |0 | [04:53:18 INF] |______________________________|______________________________|______________________________|________________________________________| [04:53:18 INF] |Pnpm |3.3 seconds |0 |0 | [04:53:18 INF] |______________________________|______________________________|______________________________|________________________________________| [04:53:18 INF] |Poetry (Beta) |3.3 seconds |0 |0 | [04:53:18 INF] |______________________________|______________________________|______________________________|________________________________________| [04:53:18 INF] |Ruby |3.3 seconds |0 |0 | [04:53:18 INF] |______________________________|______________________________|______________________________|________________________________________| [04:53:18 INF] |RustCrateDetector |3.3 seconds |0 |0 | [04:53:18 INF] |______________________________|______________________________|______________________________|________________________________________| [04:53:18 INF] |Vcpkg (Beta) |3.3 seconds |0 |0 | [04:53:18 INF] |______________________________|______________________________|______________________________|________________________________________| [04:53:18 INF] |Yarn |0.081 seconds |0 |0 | [04:53:18 INF] |______________________________|______________________________|______________________________|________________________________________| [04:53:18 INF] |Total |17 seconds |3 |1 | [04:53:18 INF] |______________________________|______________________________|______________________________|________________________________________| [04:53:18 INF] [04:53:18 INF] Detection time: [16](https://github.com/octodemo/Automapper.Sample/actions/runs/4890059633/jobs/8729136500#step:6:17).9842365 seconds. [04:53:[18](https://github.com/octodemo/Automapper.Sample/actions/runs/4890059633/jobs/8729136500#step:6:19) INF] Scan Manifest file: D:\a\Automapper.Sample\Automapper.Sample\output.json Execution finished, status: 0. Getting manifests from results Notice: Submitting snapshot... Notice: { "detector": { "name": "Component Detection", "version": "0.0.1", "url": "https://github.com/advanced-security/component-detection-dependency-submission-action" }, "version": 0, "job": { "correlator": "dependency-submission", "id": "4890059633" }, "sha": "6a02fcf48d6820fb509f073d7d841aa6fbd59644", "ref": "refs/heads/master", "scanned": "2023-05-05T04:53:18.873Z", "manifests": { "/ProCodeGuide.Samples.Automapper/ProCodeGuide.Samples.Automapper.csproj": { "resolved": { "pkg:nuget/Microsoft.Extensions.DependencyInjection.Abstractions@2.0.0": { "package_url": "pkg:nuget/Microsoft.Extensions.DependencyInjection.Abstractions@2.0.0", "relationship": "indirect", "scope": "runtime", "dependencies": [] }, "pkg:nuget/AutoMapper.Extensions.Microsoft.DependencyInjection@7.0.0": { "package_url": "pkg:nuget/AutoMapper.Extensions.Microsoft.DependencyInjection@7.0.0", "relationship": "indirect", "scope": "runtime", "dependencies": [ "pkg:nuget/Microsoft.Extensions.DependencyInjection.Abstractions@2.0.0", "pkg:nuget/AutoMapper.Extensions.Microsoft.DependencyInjection@7.0.0", "pkg:nuget/AutoMapper@9.0.0" ] }, "pkg:nuget/AutoMapper@9.0.0": { "package_url": "pkg:nuget/AutoMapper@9.0.0", "relationship": "indirect", "scope": "runtime", "dependencies": [] } }, "name": "/ProCodeGuide.Samples.Automapper/ProCodeGuide.Samples.Automapper.csproj", "file": { "source_location": "/ProCodeGuide.Samples.Automapper/ProCodeGuide.Samples.Automapper.csproj" } } } } Notice: Snapshot successfully created at 2023-05-05T04:53:[19](https://github.com/octodemo/Automapper.Sample/actions/runs/4890059633/jobs/8729136500#step:6:20).[21](https://github.com/octodemo/Automapper.Sample/actions/runs/4890059633/jobs/8729136500#step:6:22)1Z ```

CC codeowners @lseppala @courtneycl

felickz commented 1 year ago

OK fixed line ending issue... had submitted from my windows test machine and did not like the diff check :)

felickz commented 1 year ago

@lseppala might we push a new 0.0.2 release here? or potentially also maintain a v0 release as well?

lseppala commented 1 year ago

@felickz v0.0.2 release published.

As for a floating v0 release: I'm going to be putting a few more processes in place to help maintain this (and other) dependency submission Actions. I'll hold off for now.