Whoops! Looks like there has been an oversight and we are missing a page for this issue.
122 |Let us know the title of the issue, and we make sure to add it to the encyclopedia.
`, 123 | }, 124 | }; 125 | 126 | function articleById(articles: any, id: string) { 127 | function partToText(part) { 128 | if (!part || !part.sections) { 129 | return ""; 130 | } 131 | return part.sections 132 | .map((section) => `${section.text || ""}${formatCode(section?.code?.json)}`) 133 | .join(""); 134 | } 135 | 136 | const article = articles[id] || fallbackArticle; 137 | 138 | return [ 139 | article ? article.description.text : "", 140 | partToText(article.example), 141 | partToText(article.exploit), 142 | partToText(article.remediation), 143 | ].join(""); 144 | } 145 | 146 | function formatCode(code: string | undefined): string { 147 | if(code === undefined) { 148 | return ""; 149 | } 150 | return `${code}
`;
151 | }
152 |
153 | export async function produceSarif(summary: FileAuditMap): Promise