Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ build-protos: build-osv-protos build-api-protos
run-website:
cd gcp/website/frontend3 && npm install && npm run build
cd gcp/website/blog && hugo --buildFuture -d ../dist/static/blog
cd gcp/website && $(install-cmd) && GOOGLE_CLOUD_PROJECT=oss-vdb $(run-cmd) python main.py
cd gcp/website && $(install-cmd) && GOOGLE_CLOUD_PROJECT=oss-vdb OSV_VULNERABILITIES_BUCKET=osv-vulnerabilities $(run-cmd) python main.py

run-website-staging:
cd gcp/website/frontend3 && npm install && npm run build
cd gcp/website/blog && hugo --buildFuture -d ../dist/static/blog
cd gcp/website && $(install-cmd) && GOOGLE_CLOUD_PROJECT=oss-vdb-test $(run-cmd) python main.py
cd gcp/website && $(install-cmd) && GOOGLE_CLOUD_PROJECT=oss-vdb-test OSV_VULNERABILITIES_BUCKET=osv-test-vulnerabilities $(run-cmd) python main.py

run-website-emulator:
cd gcp/website/frontend3 && npm install && npm run build
Expand Down
14 changes: 14 additions & 0 deletions gcp/datastore/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,17 @@ indexes:
properties:
- name: name
- name: vuln_id

# Indexes for website /list search
- kind: ListedVulnerability
properties:
- name: ecosystems
- name: published
direction: desc

- kind: ListedVulnerability
properties:
- name: search_indices
- name: published
direction: desc

11 changes: 5 additions & 6 deletions gcp/website/frontend3/src/templates/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,13 @@ <h1 class="title">Vulnerabilities</h1>
</span>
<span role="cell" class="vuln-table-cell vuln-packages mdc-data-table__cell">
<ul class="packages">
{% set pkgs = vulnerability.affected | list_packages %}
{% for package in pkgs[:5] %}
{% for package in vulnerability.packages[:5] %}
<li>{{ package }}</li>
{% endfor %}
{% if pkgs|length > 5 %}
{% set remainingPkgCount = pkgs|length - 5 %}
{% if vulnerability.packages|length > 5 %}
{% set remainingPkgCount = vulnerability.packages|length - 5 %}
<li class="remaining-packages">... {{ remainingPkgCount }} more</li>
{% elif pkgs|length == 0 %}
{% elif vulnerability.packages|length == 0 %}
<li>Not specified</li>
{% endif %}
</ul>
Expand All @@ -120,7 +119,7 @@ <h1 class="title">Vulnerabilities</h1>
<span role="cell" class="vuln-table-cell vuln-attributes mdc-data-table__cell">
<ul class="tags">
<li>
{%- if vulnerability.isFixed -%}
{%- if vulnerability.is_fixed -%}
<span class="tag fix-available">Fix available</span>
{%- else -%}
<span class="tag fix-unavailable">No fix available</span>
Expand Down
Loading
Loading