File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,12 +17,12 @@ echo ""
1717echo " | Severity | Rule | File | Message |"
1818echo " |----------|------|------|---------|"
1919
20- jq -r --arg repo " $GITHUB_REPOSITORY " --arg branch " $GITHUB_BRANCH " ' .results[] | {
20+ jq -r --arg repo " $GITHUB_REPOSITORY " --arg sha " $GITHUB_SHA " ' .results[] | {
2121 sev: .extra.severity,
2222 rule: (.check_id | split(".")[-1]),
2323 path: .path,
2424 line: .start.line,
25- msg: (.extra.message | gsub("\n"; " ") | ltrimstr(" ") | rtrimstr(" "))
25+ msg: (.extra.message | gsub("\n"; " ") | ltrimstr(" ") | rtrimstr(" ") | gsub("\\|"; "\\|") | gsub("`"; "\\`") )
2626} | {
2727 icon: (if .sev == "CRITICAL" then "🔴"
2828 elif .sev == "HIGH" then "🟠"
@@ -35,4 +35,4 @@ jq -r --arg repo "$GITHUB_REPOSITORY" --arg branch "$GITHUB_BRANCH" '.results[]
3535 path: .path,
3636 line: .line,
3737 msg: .msg
38- } | "| \(.icon) \(.sev) | `\(.rule)` | [`\(.path):\(.line)`](https://github.com/\($repo)/blob/\($branch )/\(.path)#L\(.line)) | \(.msg) |"' " $INPUT_FILE "
38+ } | "| \(.icon) \(.sev) | `\(.rule)` | [`\(.path):\(.line)`](https://github.com/\($repo)/blob/\($sha )/\(.path)#L\(.line)) | \(.msg) |"' " $INPUT_FILE "
You can’t perform that action at this time.
0 commit comments