Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency on semver.herokuapp.com #1015

Closed
edmorley opened this issue Jun 13, 2022 · 2 comments · Fixed by #1037
Closed

Remove dependency on semver.herokuapp.com #1015

edmorley opened this issue Jun 13, 2022 · 2 comments · Fixed by #1037
Assignees

Comments

@edmorley
Copy link
Member

edmorley commented Jun 13, 2022

The buildpack currently makes a request to semver.herokuapp.com here:

if [ "${npm_version:0:1}" -lt "2" ]; then
latest_npm="$(curl --silent --get --retry 5 --retry-max-time 15 https://semver.herokuapp.com/npm/stable)"
warning "This version of npm ($npm_version) has several known issues - consider upgrading to the latest release ($latest_npm)" "https://devcenter.heroku.com/articles/nodejs-support#specifying-an-npm-version"
mcount 'warnings.npm.old'
fi

There are a few issues with this:

  1. The semver.io site is deprecated and will be sunset in the future (GUS-W-9803092)
  2. We should not be relying onherokuapp.com domains in production, since they give reduced flexibility (eg in case of needing to migrate to another app/service etc) and increase the risk of takeover, should the platform app be sunset and the old name not reserved for future use (this step is in the sunset playbook, but still)

It seems the simplest fix would be to make the warning recommend removing the NPM specifier from package.json entirely, thereby relying on the buildpack/Node default - or else to link to the NPM versions page or similar.

cc @joshwlewis @colincasey

@statementsapp

This comment was marked as off-topic.

@edmorley

This comment was marked as off-topic.

@edmorley edmorley self-assigned this Oct 3, 2022
edmorley added a commit that referenced this issue Oct 3, 2022
Since:
- The app is deprecated and due to be switched off shortly.
- The buildpack should have as few dependencies on
   external resources as possible (particularly those not
   productionised or behind CDN).
- We especially should not have dependencies on
  `herokuapp.com` domains, given the reduced
  flexibility and risk of subdomain takeover.

Fixes #1015.
GUS-W-11843580.
edmorley added a commit that referenced this issue Oct 3, 2022
Since:
- The app is deprecated and due to be switched off shortly.
- The buildpack should have as few dependencies on
   external resources as possible (particularly those not
   productionised or behind CDN).
- We especially should not have dependencies on
  `herokuapp.com` domains, given the reduced
  flexibility and risk of subdomain takeover.

Fixes #1015.
GUS-W-11843580.
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 a pull request may close this issue.

2 participants