|
6 | 6 | PageInfo currentPage = SiteMap.Pages.FirstOrDefault(x => x.RelativePath == "/blog/package-vulnerability-detection-in-dotnet")!; |
7 | 7 | } |
8 | 8 |
|
| 9 | +<style> |
| 10 | + /* Add your custom styles here */ |
| 11 | +.small-table { |
| 12 | + font-size: 0.85rem; /* Smaller font size */ |
| 13 | + width: 80%; /* Reduce table width */ |
| 14 | + margin: auto; /* Center the table */ |
| 15 | +} |
| 16 | +</style> |
| 17 | + |
9 | 18 | <BlogContainer> |
10 | 19 | <Header |
11 | 20 | Title="@currentPage.Header" |
@@ -168,40 +177,42 @@ dotnet list package --vulnerable |
168 | 177 |
|
169 | 178 | <Section Heading="Enforcing build failure for vulnerabilities" Level="5"> |
170 | 179 | <p>Now, warning are good but they can be ignored/missed allowing vulnerabilities to creep into the production code. To prevent this, there is another msbuild property <code>WarningsAsErrors</code> that can help by treating specified warnings codes as errors resulting in build failure. Refer the below table to such warning codes</p> |
171 | | - <table class="table table-bordered"> |
172 | | - <thead class="thead-dark"> |
173 | | - <tr> |
174 | | - <th>Warning Code</th> |
175 | | - <th>Reason</th> |
176 | | - </tr> |
177 | | - </thead> |
178 | | - <tbody> |
179 | | - <tr> |
180 | | - <td>NU1900</td> |
181 | | - <td>Error communicating with package source, while getting vulnerability information.</td> |
182 | | - </tr> |
183 | | - <tr> |
184 | | - <td>NU1901</td> |
185 | | - <td>Package with low severity detected</td> |
186 | | - </tr> |
187 | | - <tr> |
188 | | - <td>NU1902</td> |
189 | | - <td>Package with moderate severity detected</td> |
190 | | - </tr> |
191 | | - <tr> |
192 | | - <td>NU1903</td> |
193 | | - <td>Package with high severity detected</td> |
194 | | - </tr> |
195 | | - <tr> |
196 | | - <td>NU1904</td> |
197 | | - <td>Package with critical severity detected</td> |
198 | | - </tr> |
199 | | - <tr> |
200 | | - <td>NU1905</td> |
201 | | - <td>An audit source does not provide a vulnerability database</td> |
202 | | - </tr> |
203 | | - </tbody> |
204 | | - </table> |
| 180 | + <div class="small-table"> |
| 181 | + <table class="table table-bordered"> |
| 182 | + <thead class="thead-dark"> |
| 183 | + <tr> |
| 184 | + <th>Warning Code</th> |
| 185 | + <th>Reason</th> |
| 186 | + </tr> |
| 187 | + </thead> |
| 188 | + <tbody> |
| 189 | + <tr> |
| 190 | + <td>NU1900</td> |
| 191 | + <td>Error communicating with package source, while getting vulnerability information.</td> |
| 192 | + </tr> |
| 193 | + <tr> |
| 194 | + <td>NU1901</td> |
| 195 | + <td>Package with low severity detected</td> |
| 196 | + </tr> |
| 197 | + <tr> |
| 198 | + <td>NU1902</td> |
| 199 | + <td>Package with moderate severity detected</td> |
| 200 | + </tr> |
| 201 | + <tr> |
| 202 | + <td>NU1903</td> |
| 203 | + <td>Package with high severity detected</td> |
| 204 | + </tr> |
| 205 | + <tr> |
| 206 | + <td>NU1904</td> |
| 207 | + <td>Package with critical severity detected</td> |
| 208 | + </tr> |
| 209 | + <tr> |
| 210 | + <td>NU1905</td> |
| 211 | + <td>An audit source does not provide a vulnerability database</td> |
| 212 | + </tr> |
| 213 | + </tbody> |
| 214 | + </table> |
| 215 | + </div> |
205 | 216 |
|
206 | 217 | <p>Lets set critical warning as error for our audit by setting <code>WarningsAsErrors</code> To <b>true</b> and try to <code>build / restore</code> </p> |
207 | 218 |
|
|
0 commit comments