Skip to content

Commit 5ba91d4

Browse files
committed
code-scanning-path argument missed
1 parent 2084e3d commit 5ba91d4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { error, getInput, info, setOutput } from '@actions/core'
2-
import { existsSync, mkdirSync } from 'fs'
2+
import { copyFileSync, existsSync, mkdirSync } from 'fs'
33
import * as path from 'path'
44
import {
55
downloadArtifact,
@@ -38,6 +38,13 @@ async function runAnalysis() {
3838
if (existsSync(scaSarifFile)) {
3939
info(`Found SCA SARIF file to upload: ${scaSarifFile}`)
4040
toUpload.push(scaSarifFile)
41+
42+
// Copy SARIF to code-scanning-path for backward compatibility
43+
const codeScanningPath = getInput('code-scanning-path')
44+
if (codeScanningPath) {
45+
info(`Copying SARIF to code-scanning-path: ${codeScanningPath}`)
46+
copyFileSync(scaSarifFile, codeScanningPath)
47+
}
4148
} else {
4249
info(`SCA SARIF file not found at: ${scaSarifFile}`)
4350
}

0 commit comments

Comments
 (0)