@security-alert/sarif-to-markdown
Version:
Convert Sarif format to body text
60 lines (59 loc) • 1.32 kB
TypeScript
import type { Log } from "sarif";
export type sarifFormatterOptions = {
/**
* Title of content
*/
title?: string;
/**
* https://github.com
*/
githubHost?: string;
/**
* GitHub Owner
*/
owner: string;
/**
* GitHub Repo
*/
repo: string;
/**
* Branch name:
* e.g.) dev
*/
branch: string;
/**
* Base path
*/
sourceRoot: string;
/**
* Details of the rules in the comment or not, this might make the comment too big for Github
*/
details?: boolean;
/**
* Should the markdown include suppressed findings, defaults to true
*/
suppressedResults?: boolean;
/**
* Should the markdown include rule details or tool details at all
*/
simple?: boolean;
/**
* Which severities should be included ?
*/
severities?: readonly string[];
/**
* Which severities should throw an error ?
*/
failOn?: any;
};
type sarifToMarkdownResult = {
title?: string;
body: string;
/**
* If the body has not results, `hasMessages` will be `false`
*/
hasMessages: boolean;
shouldFail: boolean;
};
export declare const sarifToMarkdown: (options: sarifFormatterOptions) => (sarifLog: Log) => sarifToMarkdownResult[];
export {};