mirror of
https://github.com/hohn/sarif-cli.git
synced 2025-12-16 09:13:04 +01:00
20 lines
315 B
Bash
Executable File
20 lines
315 B
Bash
Executable File
#!/bin/sh
|
|
# Add the versionControlProvenance key to a SARIF file
|
|
# usage: $0 file
|
|
uri=vcp-no-uri
|
|
revid=vcp-no-revid
|
|
jq ' {"$schema" : ."$schema",
|
|
"version" : .version,
|
|
"runs" : [ .runs | .[]
|
|
| ( .versionControlProvenance |=
|
|
[
|
|
{
|
|
"repositoryUri": "'$uri'",
|
|
"revisionId": "'$revid'"
|
|
}
|
|
]
|
|
) ]
|
|
}
|
|
' $1
|
|
|