From d2c52297ae370ed7d83cb2cd59aec7171beceba2 Mon Sep 17 00:00:00 2001 From: Erik Bershel <110455084+erik-bershel@users.noreply.github.com> Date: Thu, 11 Aug 2022 16:46:59 +0200 Subject: [PATCH] [macOS] Added CodeQL (#6059) * Go update to version 1.19 * Revert "Go update to version 1.19" This reverts commit ec418d789fc24ec3597d5c5d8cd1f98fea9ee7b4. * Update of Go packages. Version 1.19.0 added. * Revert "Update of Go packages. Version 1.19.0 added." This reverts commit cc970ae8296ac7c608ce2c0c29f60131cd4f9678. * [macOS] Added CodeQL to macOS 11 and 12. Co-authored-by: Erik Bershel <110455084+re-gent@users.noreply.github.com> --- images/macos/software-report/SoftwareReport.Common.psm1 | 5 +++++ images/macos/software-report/SoftwareReport.Generator.ps1 | 3 ++- images/macos/tests/Common.Tests.ps1 | 6 ++++++ images/macos/toolsets/toolset-11.json | 3 ++- images/macos/toolsets/toolset-12.json | 3 ++- 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/images/macos/software-report/SoftwareReport.Common.psm1 b/images/macos/software-report/SoftwareReport.Common.psm1 index 56d68f6e1..a13e91b7b 100644 --- a/images/macos/software-report/SoftwareReport.Common.psm1 +++ b/images/macos/software-report/SoftwareReport.Common.psm1 @@ -584,4 +584,9 @@ function Build-GraalVMTable { "Version" = $version "Environment variables" = $envVariables } +} + +function Get-CodeQLVersion { + $codeqlVersion = Run-Command "codeql version --quiet" + return "$codeqlVersion" } \ No newline at end of file diff --git a/images/macos/software-report/SoftwareReport.Generator.ps1 b/images/macos/software-report/SoftwareReport.Generator.ps1 index 199635d4f..9533fe3ec 100644 --- a/images/macos/software-report/SoftwareReport.Generator.ps1 +++ b/images/macos/software-report/SoftwareReport.Generator.ps1 @@ -159,7 +159,8 @@ $toolsList = @( (Get-AzureDevopsVersion), (Get-AWSCLIVersion), (Get-AWSSAMCLIVersion), - (Get-AWSSessionManagerCLIVersion) + (Get-AWSSessionManagerCLIVersion), + (Get-CodeQLVersion) ) if ($os.IsLessThanMonterey) { diff --git a/images/macos/tests/Common.Tests.ps1 b/images/macos/tests/Common.Tests.ps1 index 7e78b182d..6c3f02edd 100644 --- a/images/macos/tests/Common.Tests.ps1 +++ b/images/macos/tests/Common.Tests.ps1 @@ -137,4 +137,10 @@ Describe "VirtualBox" -Skip:($os.IsBigSur) { It "Check kext kernel modules" { kextstat | Out-String | Should -Match "org.virtualbox.kext" } +} + +Describe "codeql" { + It "codeql" { + "codeql version" | Should -ReturnZeroExitCode + } } \ No newline at end of file diff --git a/images/macos/toolsets/toolset-11.json b/images/macos/toolsets/toolset-11.json index 51e7f8d61..682fcc8b9 100644 --- a/images/macos/toolsets/toolset-11.json +++ b/images/macos/toolsets/toolset-11.json @@ -228,7 +228,8 @@ "imagemagick" ], "cask_packages": [ - "julia" + "julia", + "codeql" ] }, "gcc": { diff --git a/images/macos/toolsets/toolset-12.json b/images/macos/toolsets/toolset-12.json index 96a5e6988..4fa94d711 100644 --- a/images/macos/toolsets/toolset-12.json +++ b/images/macos/toolsets/toolset-12.json @@ -178,7 +178,8 @@ "cask_packages": [ "julia", "vagrant", - "virtualbox" + "virtualbox", + "codeql" ] }, "gcc": {