Commit 314b019a40

314b019a403089fe441b2a42bd775756eee3abb1

parent: dc69c3e3e4

Verified · cmc ci/build: success ci/quality: success ci/test: success

cmc <hello@cleberg.net> · 2026-11-25 07:40 UTC

web: fold dismissed code-scan and dependency items in repo settings

Layout: unified · split

internal/web/templates/settings.html +12 −8
@@ -209,9 +209,11 @@
209</tr> 209</tr>
210{{end}}</table></div> 210{{end}}</table></div>
211{{else if .Security.LastResults}}<p class="none">The last scan found nothing open.</p>{{end}} 211{{else if .Security.LastResults}}<p class="none">The last scan found nothing open.</p>{{end}}
212{{if .Security.Dismissed}}<h3>Dismissed</h3><div class="tablewrap"><table class="keys"> 212{{if .Security.Dismissed}}<details class="editbox"><summary>Dismissed ({{len .Security.Dismissed}})</summary>
213<tr class="cols"><th scope="col">location</th><th scope="col">rule</th><th scope="col">reason</th><th scope="col"><span class="vh">reopen</span></th></tr> 213<p><input type="search" class="tablefilter" placeholder="Filter dismissed findings…" aria-label="Filter dismissed findings" data-filter-table="sec-dismissed"></p>
214{{range .Security.Dismissed}}<tr> 214<div class="tablewrap"><table class="keys" id="sec-dismissed">
215<thead><tr class="cols"><th scope="col">location</th><th scope="col">rule</th><th scope="col">reason</th><th scope="col"><span class="vh">reopen</span></th></tr></thead>
216<tbody>{{range .Security.Dismissed}}<tr>
215 <td class="mono">{{.Path}}:{{.Line}}</td> 217 <td class="mono">{{.Path}}:{{.Line}}</td>
216 <td class="mono">{{.Rule}}</td> 218 <td class="mono">{{.Rule}}</td>
217 <td>{{.Reason}}{{if .DismissedBy}} <span class="meta">by {{.DismissedBy}}</span>{{end}}</td> 219 <td>{{.Reason}}{{if .DismissedBy}} <span class="meta">by {{.DismissedBy}}</span>{{end}}</td>
@@ -221,7 +223,7 @@
221 <button type="submit">Reopen</button> 223 <button type="submit">Reopen</button>
222 </form></td> 224 </form></td>
223</tr> 225</tr>
224{{end}}</table></div>{{end}} 226{{end}}</tbody></table></div></details>{{end}}
225{{end}} 227{{end}}
226<form method="post" action="{{$base}}" class="setform"> 228<form method="post" action="{{$base}}" class="setform">
227 <input type="hidden" name="field" value="security-ignore"> 229 <input type="hidden" name="field" value="security-ignore">
@@ -335,9 +337,11 @@
335{{end}}</table></div> 337{{end}}</table></div>
336{{else if .Deps.LastCheck}}<p class="none">No open advisories.</p>{{end}} 338{{else if .Deps.LastCheck}}<p class="none">No open advisories.</p>{{end}}
337{{if .Deps.NotImported}}<p class="meta">Not imported by any Go file here, so not reported:{{range .Deps.NotImported}} <a href="https://osv.dev/vulnerability/{{.ID}}">{{.ID}}</a> ({{.Name}}){{end}}. Imports through another module are not seen.</p>{{end}} 339{{if .Deps.NotImported}}<p class="meta">Not imported by any Go file here, so not reported:{{range .Deps.NotImported}} <a href="https://osv.dev/vulnerability/{{.ID}}">{{.ID}}</a> ({{.Name}}){{end}}. Imports through another module are not seen.</p>{{end}}
338{{if .Deps.Dismissed}}<h3>Dismissed advisories</h3><div class="tablewrap"><table class="keys"> 340{{if .Deps.Dismissed}}<details class="editbox"><summary>Dismissed advisories ({{len .Deps.Dismissed}})</summary>
339<tr class="cols"><th scope="col">dependency</th><th scope="col">advisory</th><th scope="col">reason</th><th scope="col"><span class="vh">reopen</span></th></tr> 341<p><input type="search" class="tablefilter" placeholder="Filter dismissed advisories…" aria-label="Filter dismissed advisories" data-filter-table="deps-dismissed"></p>
340{{range .Deps.Dismissed}}<tr> 342<div class="tablewrap"><table class="keys" id="deps-dismissed">
343<thead><tr class="cols"><th scope="col">dependency</th><th scope="col">advisory</th><th scope="col">reason</th><th scope="col"><span class="vh">reopen</span></th></tr></thead>
344<tbody>{{range .Deps.Dismissed}}<tr>
341 <td class="mono">{{.Ecosystem}} {{.Name}}</td> 345 <td class="mono">{{.Ecosystem}} {{.Name}}</td>
342 <td class="mono"><a href="https://osv.dev/vulnerability/{{.ID}}">{{.ID}}</a></td> 346 <td class="mono"><a href="https://osv.dev/vulnerability/{{.ID}}">{{.ID}}</a></td>
343 <td>{{.Reason}}{{if .By}} <span class="meta">by {{.By}}</span>{{end}}</td> 347 <td>{{.Reason}}{{if .By}} <span class="meta">by {{.By}}</span>{{end}}</td>
@@ -347,7 +351,7 @@
347 <button type="submit">Reopen</button> 351 <button type="submit">Reopen</button>
348 </form></td> 352 </form></td>
349</tr> 353</tr>
350{{end}}</table></div>{{end}} 354{{end}}</tbody></table></div></details>{{end}}
351{{end}} 355{{end}}
352</section> 356</section>
353 357