Skip to content

Commit

Permalink
fix: pysec was broken.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Dec 4, 2023
1 parent 2729935 commit 86572d9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion vulnerabilitylookup/feeders/pysec.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def update(self) -> bool:
a = alias.lower()
p.sadd(f"{vuln_id}:link", a)
p.sadd(f'{a}:link', vuln_id)
p.set(path.stem, json.dumps(vuln, default=json_serial))
p.set(vuln_id, json.dumps(vuln, default=json_serial))

if len(pysecids) > 1000:
# Avoid a massive execute on first import
Expand Down
13 changes: 9 additions & 4 deletions website/web/templates/recent.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<h1>Most recent vulnerabilities by source</h1>
<h6>The vulnerabilities are sorted by update time (recent ot old)</h6>
<ul class="nav nav-tabs" id="vulnSourcesTab" role="tablist">
{% for source in recent.keys() %}
{% for source in recent.keys() if source in ['github', 'cvelistv5', 'pysec'] %}
<li class="nav-item" role="presentation">
<button class="nav-link {% if source == "nvd" %}active{%endif%}" id="{{source}}-tab"
<button class="nav-link {% if source == "cvelistv5" %}active{%endif%}" id="{{source}}-tab"
data-bs-toggle="tab"
data-bs-target="#{{source}}-tab-pane"
type="button" role="tab"
Expand All @@ -31,11 +31,11 @@ <h6>The vulnerabilities are sorted by update time (recent ot old)</h6>
{%endfor%}
</ul>
<div class="tab-content" id="vulnSourcesTabContent">
{% for source, vulns in recent.items() %}
{% for source, vulns in recent.items() if source in ['github', 'cvelistv5', 'pysec'] %}
<div class="tab-pane fade show {% if source == 'cvelistv5' %} active {%endif%}"
id="{{source}}-tab-pane" role="tabpanel" aria-labelledby="{{source}}-tab" tabindex="0">
<table class="table">
{% if source in ['cvelistv5', 'github'] %}
{% if source in ['cvelistv5', 'github', 'pysec'] %}
<thead>
<tr>
<th scope="col">Vulnerability ID</th>
Expand Down Expand Up @@ -65,6 +65,11 @@ <h6>The vulnerabilities are sorted by update time (recent ot old)</h6>
</th>
<td>{{vuln['details']}}</td>
</tr>
{%elif source == "pysec" %}
<tr>
<th scope="row">{{vuln['id']}}</th>
<td>{{vuln['details']}}</td>
</tr>
{%else%}
<tr>
<td colspan="1">
Expand Down

0 comments on commit 86572d9

Please sign in to comment.