We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2084e3d commit 5ba91d4Copy full SHA for 5ba91d4
1 file changed
src/index.ts
@@ -1,5 +1,5 @@
1
import { error, getInput, info, setOutput } from '@actions/core'
2
-import { existsSync, mkdirSync } from 'fs'
+import { copyFileSync, existsSync, mkdirSync } from 'fs'
3
import * as path from 'path'
4
import {
5
downloadArtifact,
@@ -38,6 +38,13 @@ async function runAnalysis() {
38
if (existsSync(scaSarifFile)) {
39
info(`Found SCA SARIF file to upload: ${scaSarifFile}`)
40
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
+ }
48
} else {
49
info(`SCA SARIF file not found at: ${scaSarifFile}`)
50
}
0 commit comments