File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,8 +79,9 @@ if [ "$BASE_PATH" != "" ]; then
7979 if [[ " $BASE_PATH " != * / ]]; then
8080 BASE_PATH=" $BASE_PATH /"
8181 fi
82- # using sourcepath does not work for sarif
83- # CMD="$CMD -sourcepath ${BASE_PATH}"
82+ # using sourcepath does not work for GitHub's sarif parser
83+ # but keeping there just in case
84+ CMD=" $CMD -sourcepath ${BASE_PATH} "
8485fi
8586
8687if [ " $ARGUMENTS " != " " ]; then
@@ -100,7 +101,7 @@ eval ${CMD}
100101if [ " $OUTPUT_TYPE " == " sarif" ] && [ " $BASE_PATH " != " " ]; then
101102 # prepend the pyhsical path
102103 echo " Transform sarif file to include the physical path"
103- jq -c " (.runs[].results[].locations[].physicalLocation.artifactLocation.uri) |=\" $BASE_PATH \" +." resultspre.sarif > " $OUTPUT "
104+ cat resultspre.sarif | jq -c " (.runs[].results[].locations[].physicalLocation.artifactLocation.uri) |=\" $BASE_PATH \" +." > " $OUTPUT "
104105 cat $OUTPUT
105106fi
106107
You can’t perform that action at this time.
0 commit comments