From dacf8b08d4a0f211dfdea1193723e31deadca7da Mon Sep 17 00:00:00 2001 From: Violet Hansen Date: Sat, 26 Oct 2024 10:23:07 +0300 Subject: [PATCH] Run VT action on pull request close Run VT action on pull request close --- .github/Workflowstuff/VirusTotal.ps1 | 4 ++-- .github/workflows/Build AppControl Manager MSIX Package.yml | 2 +- .github/workflows/VirusTotal.yml | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/Workflowstuff/VirusTotal.ps1 b/.github/Workflowstuff/VirusTotal.ps1 index b5067440d..a1319b202 100644 --- a/.github/Workflowstuff/VirusTotal.ps1 +++ b/.github/Workflowstuff/VirusTotal.ps1 @@ -1,7 +1,7 @@ $ErrorActionPreference = 'Stop' # Function to upload file to VirusTotal -function Upload-FileToVirusTotal { +function Invoke-VTFileUpload { param ( [System.String]$FilePath, [System.String]$ApiKey @@ -70,7 +70,7 @@ function Get-VirusTotalReport { $Headers.Add('x-apikey', $ApiKey) # Upload the file to virus total - $AnalysisData = Upload-FileToVirusTotal -filePath $FilePath -apiKey $ApiKey + $AnalysisData = Invoke-VTFileUpload -filePath $FilePath -apiKey $ApiKey # Fetch the report from VirusTotal do { diff --git a/.github/workflows/Build AppControl Manager MSIX Package.yml b/.github/workflows/Build AppControl Manager MSIX Package.yml index aac2320aa..722f4a470 100644 --- a/.github/workflows/Build AppControl Manager MSIX Package.yml +++ b/.github/workflows/Build AppControl Manager MSIX Package.yml @@ -68,7 +68,7 @@ jobs: # Write the MSIXPath to GITHUB_ENV to set it as an environment variable for the entire workflow Add-Content -Path $env:GITHUB_ENV -Value "MSIX_PATH=$MSIXPath" - - name: Generate Artifact Attestation + - name: Generating Artifact Attestation uses: actions/attest-build-provenance@v1 with: subject-path: ${{ env.MSIX_PATH }} diff --git a/.github/workflows/VirusTotal.yml b/.github/workflows/VirusTotal.yml index 8f3169a34..3a05e120d 100644 --- a/.github/workflows/VirusTotal.yml +++ b/.github/workflows/VirusTotal.yml @@ -2,6 +2,9 @@ name: Repository And Package Scan on Virus Total on: workflow_dispatch: release: # to trigger on releases + pull_request: + types: + - closed # When a pull request is closed. Merging also results in closing the pull request. jobs: run-script: