Skip to content

Commit 3f9641a

Browse files
author
Ajay kumar
committed
[Blog] [Ajay]: Fix vulnerability codes table
1 parent 732af77 commit 3f9641a

File tree

1 file changed

+45
-34
lines changed
  • TestArena/Blog/Security/Vulnerabilities/detection-in-dotnet

1 file changed

+45
-34
lines changed

TestArena/Blog/Security/Vulnerabilities/detection-in-dotnet/Index.razor

Lines changed: 45 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@
66
PageInfo currentPage = SiteMap.Pages.FirstOrDefault(x => x.RelativePath == "/blog/package-vulnerability-detection-in-dotnet")!;
77
}
88

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+
918
<BlogContainer>
1019
<Header
1120
Title="@currentPage.Header"
@@ -168,40 +177,42 @@ dotnet list package --vulnerable
168177

169178
<Section Heading="Enforcing build failure for vulnerabilities" Level="5">
170179
<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>
205216

206217
<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>
207218

0 commit comments

Comments
 (0)