Skip to content

Commit

Permalink
feat(sources): add more human_links to production (#2844)
Browse files Browse the repository at this point in the history
This commit partially replicates the changes from
#2822 to production, adding
additional human_links for records for Rocky Linux (but not yet SuSE),
to improve signposting around the desired user journey for data feedback
going directly to the source.

It also modifies the frontend to not link out for `openSUSE`-prefixed
records, because the approach taken in #2822 doesn't seem to work.

Part of #2191
  • Loading branch information
andrewpollock authored Nov 12, 2024
1 parent d58c1f6 commit df5e0ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gcp/appengine/frontend3/src/templates/vulnerability.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h1 class="title">
<a class="vulnerability-improvement-link" href="{{ vulnerability.human_source_link }}/improve">
Suggest an improvement
</a>
{% elif vulnerability.human_source_link -%}
{% elif vulnerability.human_source_link and not vulnerability.id.startswith("openSUSE-") -%}
<div class="vulnerability-improvement-link">
<a href="https://google.github.io/osv.dev/faq/#ive-found-something-wrong-with-the-data" target="_blank" rel="noopener noreferrer" title="Follow the Source link below and use its record feedback reporting mechanism">
See a problem?
Expand All @@ -42,7 +42,7 @@ <h1 class="title">
<dt>Import Source</dt>
<dd><a href="{{ vulnerability.source_link }}" target="_blank" rel="noopener noreferrer">{{
vulnerability.source }}</a></dd>

<dt>JSON Data</dt>
<dd><a href="https://{{ api_url }}/v1/vulns/{{ vulnerability.id }}" target="_blank" rel="noopener noreferrer">
https://{{ api_url }}/v1/vulns/{{ vulnerability.id }}</a>
Expand Down Expand Up @@ -379,4 +379,4 @@ <h3 class="mdc-layout-grid__cell--span-3">
});
});
</script>
{% endblock -%}
{% endblock -%}
2 changes: 2 additions & 0 deletions source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@
bucket: 'resf-osv-data'
db_prefix: ['RLSA-']
ignore_git: False
human_link: 'https://errata.rockylinux.org/{{ BUG_ID }}'
link: 'https://storage.googleapis.com/resf-osv-data/'
editable: False

Expand All @@ -292,6 +293,7 @@
bucket: 'resf-osv-data'
db_prefix: ['RXSA-']
ignore_git: False
human_link: 'https://errata.rockylinux.org/{{ BUG_ID }}'
link: 'https://storage.googleapis.com/resf-osv-data/'
editable: False

Expand Down

0 comments on commit df5e0ed

Please sign in to comment.