Skip to content

Remove the Snyk vulnerabilities widget#211

Merged
MattIPv4 merged 1 commit into
cdnjs:masterfrom
juuni26:fix/snyk-vulns-graceful-degradation
Jun 5, 2026
Merged

Remove the Snyk vulnerabilities widget#211
MattIPv4 merged 1 commit into
cdnjs:masterfrom
juuni26:fix/snyk-vulns-graceful-degradation

Conversation

@juuni26
Copy link
Copy Markdown
Contributor

@juuni26 juuni26 commented Jun 5, 2026

Remove the Snyk vulnerabilities widget. The Snyk widget service (snyk-widget.herokuapp.com) has been returning errors for all libraries for around a year (#170), with no plan to restore the data source, so the shield never renders and its dead request can hang the library page when reached via the API-page search (#210). This removes the integration entirely rather than working around a service that no longer responds.

Type of Change

  • Routes/Pages: pages/libraries/_library/index.vue, stopped passing the now-unused version prop to LibraryHero.
  • Components: components/library/library_hero.vue, removed the vulnerabilities shield, its getVulns/ShieldAlt imports, the version prop, and the data/watch/created that fetched vulnerabilities.
  • Utilities: util/get_vulns.js, deleted.
  • Something else: data/config.js, removed the snykApi and snykKey exports.

What issue does this relate to?

Resolves #210. Resolves #170.

What should this PR do?

  • Remove the Snyk vulnerabilities shield from the library hero.
  • Delete the get_vulns utility.
  • Remove the snykApi and snykKey exports from config.
  • Remove the now-unused version prop wiring on LibraryHero.
  • Leave unrelated code untouched (ShieldAlt is still used in library_asset_buttons.vue; node-fetch and baseApi are still used by other utilities).

What are the acceptance criteria?

  • No request is made to snyk-widget.herokuapp.com from any library page.
  • No dead references remain to get_vulns, snykApi, snykKey, or the vulns state.
  • npm test (ESLint + sass-lint) passes.
  • The library hero renders correctly without the shield (stars, GitHub, package, licenses, homepage, tags all unaffected).

Testing performed

  • npm test (ESLint + sass-lint) passes.
  • Production build (nuxt build) compiles both the client and server bundles successfully, and proceeds through image/font optimization and sitemap generation with no errors.
  • Repo-wide search confirms no remaining references to snyk, get_vulns, getVulns, or vulns in source.
  • Built and served the site locally (npm run build then npm run start) and loaded /libraries/vue: the hero renders correctly (stars, GitHub, package, licenses, homepage, tags), no vulnerabilities shield, and no request is made to snyk-widget.herokuapp.com.

https://www.loom.com/share/c050ceac0a184693862dc7fef56d99e2

Copy link
Copy Markdown
Member

@MattIPv4 MattIPv4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀 Thanks for this. Given it has been broken for a year or so now (#170), I think we're probably better off just removing it completely?

@juuni26
Copy link
Copy Markdown
Contributor Author

juuni26 commented Jun 5, 2026

@MattIPv4 i think so, if there is no plan to restore the data source, removing it entirely is cleaner. i would happy to do the removal in this PR

@MattIPv4
Copy link
Copy Markdown
Member

MattIPv4 commented Jun 5, 2026

👍 Go for it

The Snyk widget service (snyk-widget.herokuapp.com) has been returning errors
for all libraries for around a year (see cdnjs#170), with no plan to restore the data
source. Remove it entirely: the get_vulns util, the shield in library_hero, and
the snyk config, so its dead requests can no longer hang or clutter library pages.
@juuni26 juuni26 force-pushed the fix/snyk-vulns-graceful-degradation branch from 7b32d15 to 7c23321 Compare June 5, 2026 14:35
@juuni26 juuni26 changed the title Handle Snyk widget failures gracefully Remove the Snyk vulnerabilities widget Jun 5, 2026
@juuni26
Copy link
Copy Markdown
Contributor Author

juuni26 commented Jun 5, 2026

@MattIPv4 i have updated the PR, please let me know if all goods. thanks!

@MattIPv4 MattIPv4 merged commit 4bad7b9 into cdnjs:master Jun 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Snyk request hangs library pages when accessed via the API page Snyk integration returning 400 on some libraries

2 participants