File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 11import { error , getInput , info , setOutput } from '@actions/core'
2- import { existsSync , mkdirSync } from 'fs'
2+ import { copyFileSync , existsSync , mkdirSync } from 'fs'
33import * as path from 'path'
44import {
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 }
You can’t perform that action at this time.
0 commit comments