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

add security release column to index #9

Closed
wants to merge 1 commit into from

Conversation

richardlau
Copy link
Member

Parse the release notes for a release to determine if it is a security
release.

Refs: nodejs/Release#437
Refs: nodejs/node#27612 (comment)

This is an alternative to #8 and can be applied retroactively if the
index is rebuilt. The first line of the release notes should contain
This is a security release. which does appear to be the
convention for the recent security releases AFAICT.

Parse the release notes for a release to determine if it is a security
release.

Refs: nodejs/Release#437
@richardlau
Copy link
Member Author

For reference, here's what I get when run locally for 12, 10 and 8:

-bash-4.2$ ls ~/sandbox/test
index.json     latest-dubnium  latest-v4.x  npm               v10.10.0  v10.14.2  v10.2.1  v10.7.0  v8.0.0   v8.11.2  v8.13.0  v8.16.0  v8.6.0  v8.9.2
index.tab      latest-v0.10.x  latest-v5.x  npm-versions.txt  v10.11.0  v10.15.0  v10.3.0  v10.8.0  v8.1.0   v8.11.3  v8.1.4   v8.2.0   v8.7.0  v8.9.3
latest         latest-v0.12.x  latest-v6.x  patch             v10.12.0  v10.15.1  v10.4.0  v10.9.0  v8.10.0  v8.11.4  v8.14.0  v8.2.1   v8.8.0  v8.9.4
latest-argon   latest-v10.x    latest-v7.x  robots.txt        v10.13.0  v10.15.2  v10.4.1  v12.0.0  v8.1.1   v8.1.2   v8.14.1  v8.3.0   v8.8.1
latest-boron   latest-v11.x    latest-v8.x  v10.0.0           v10.14.0  v10.15.3  v10.5.0  v12.1.0  v8.11.0  v8.12.0  v8.15.0  v8.4.0   v8.9.0
latest-carbon  latest-v12.x    latest-v9.x  v10.1.0           v10.14.1  v10.2.0   v10.6.0  v12.2.0  v8.11.1  v8.1.3   v8.15.1  v8.5.0   v8.9.1
-bash-4.2$ grep '"security":true' ~/sandbox/test/index.json
{"version":"v10.15.2","date":"2019-02-28","files":["aix-ppc64","headers","linux-arm64","linux-armv6l","linux-armv7l","linux-ppc64le","linux-s390x","linux-x64","osx-x64-pkg","osx-x64-tar","src","sunos-x64","win-x64-7z","win-x64-exe","win-x64-msi","win-x64-zip","win-x86-7z","win-x86-exe","win-x86-msi","win-x86-zip"],"npm":"6.4.1","v8":"6.8.275.32","uv":"1.23.2","zlib":"1.2.11","openssl":"1.1.0j","modules":"64","lts":"Dubnium","security":true},
{"version":"v10.14.0","date":"2018-11-28","files":["aix-ppc64","headers","linux-arm64","linux-armv6l","linux-armv7l","linux-ppc64le","linux-s390x","linux-x64","osx-x64-pkg","osx-x64-tar","src","sunos-x64","win-x64-7z","win-x64-exe","win-x64-msi","win-x64-zip","win-x86-7z","win-x86-exe","win-x86-msi","win-x86-zip"],"npm":"6.4.1","v8":"6.8.275.32","uv":"1.23.2","zlib":"1.2.11","openssl":"1.1.0j","modules":"64","lts":"Dubnium","security":true},
{"version":"v8.15.1","date":"2019-03-01","files":["aix-ppc64","headers","linux-arm64","linux-armv6l","linux-armv7l","linux-ppc64le","linux-s390x","linux-x64","linux-x86","osx-x64-pkg","osx-x64-tar","src","sunos-x64","sunos-x86","win-x64-7z","win-x64-exe","win-x64-msi","win-x64-zip","win-x86-7z","win-x86-exe","win-x86-msi","win-x86-zip"],"npm":"6.4.1","v8":"6.2.414.75","uv":"1.23.2","zlib":"1.2.11","openssl":"1.0.2r","modules":"57","lts":"Carbon","security":true},
{"version":"v8.14.0","date":"2018-11-28","files":["aix-ppc64","headers","linux-arm64","linux-armv6l","linux-armv7l","linux-ppc64le","linux-s390x","linux-x64","linux-x86","osx-x64-pkg","osx-x64-tar","src","sunos-x64","sunos-x86","win-x64-7z","win-x64-exe","win-x64-msi","win-x64-zip","win-x86-7z","win-x86-exe","win-x86-msi","win-x86-zip"],"npm":"6.4.1","v8":"6.2.414.72","uv":"1.23.2","zlib":"1.2.11","openssl":"1.0.2q","modules":"57","lts":"Carbon","security":true},
{"version":"v8.11.4","date":"2018-08-16","files":["aix-ppc64","headers","linux-arm64","linux-armv6l","linux-armv7l","linux-ppc64le","linux-s390x","linux-x64","linux-x86","osx-x64-pkg","osx-x64-tar","src","sunos-x64","sunos-x86","win-x64-7z","win-x64-exe","win-x64-msi","win-x64-zip","win-x86-7z","win-x86-exe","win-x86-msi","win-x86-zip"],"npm":"5.6.0","v8":"6.2.414.54","uv":"1.19.1","zlib":"1.2.11","openssl":"1.0.2p","modules":"57","lts":"Carbon","security":true},
{"version":"v8.11.0","date":"2018-03-28","files":["aix-ppc64","headers","linux-arm64","linux-armv6l","linux-armv7l","linux-ppc64le","linux-s390x","linux-x64","linux-x86","osx-x64-pkg","osx-x64-tar","src","sunos-x64","sunos-x86","win-x64-7z","win-x64-exe","win-x64-msi","win-x64-zip","win-x86-7z","win-x86-exe","win-x86-msi","win-x86-zip"],"npm":"5.6.0","v8":"6.2.414.50","uv":"1.19.1","zlib":"1.2.11","openssl":"1.0.2o","modules":"57","lts":"Carbon","security":true},
{"version":"v8.9.3","date":"2017-12-08","files":["aix-ppc64","headers","linux-arm64","linux-armv6l","linux-armv7l","linux-ppc64le","linux-s390x","linux-x64","linux-x86","osx-x64-pkg","osx-x64-tar","src","sunos-x64","sunos-x86","win-x64-7z","win-x64-exe","win-x64-msi","win-x64-zip","win-x86-7z","win-x86-exe","win-x86-msi","win-x86-zip"],"npm":"5.5.1","v8":"6.1.534.48","uv":"1.15.0","zlib":"1.2.11","openssl":"1.0.2n","modules":"57","lts":"Carbon","security":true},
{"version":"v8.1.4","date":"2017-07-11","files":["aix-ppc64","headers","linux-arm64","linux-armv6l","linux-armv7l","linux-ppc64le","linux-s390x","linux-x64","linux-x86","osx-x64-pkg","osx-x64-tar","src","sunos-x64","sunos-x86","win-x64-7z","win-x64-exe","win-x64-msi","win-x64-zip","win-x86-7z","win-x86-exe","win-x86-msi","win-x86-zip"],"npm":"5.0.3","v8":"5.8.283.41","uv":"1.12.0","zlib":"1.2.11","openssl":"1.0.2l","modules":"57","lts":false,"security":true},
-bash-4.2$

@sam-github
Copy link

LGTM

richardlau added a commit to richardlau/node-1 that referenced this pull request May 10, 2019
The release commit message for security releases have conventionally
started with the phrase `This is a security release.`. Codify this
as part of the release process so that the distribution indexer can
use this to detect and mark releases as security releases.

Fixes: nodejs/Release#437
Refs: nodejs#27612 (comment)
Refs: nodejs/nodejs-dist-indexer#9
@rvagg
Copy link
Member

rvagg commented May 11, 2019

Nice work @richardlau, tests and all. I'm in transit for the next couple of days but will have a play & review with this as soon as I can.

@ljharb
Copy link
Member

ljharb commented May 11, 2019

Can someone verify that these changes won’t break nvm’s parsing of the index.tab?

@richardlau
Copy link
Member Author

Can someone verify that these changes won’t break nvm’s parsing of the index.tab?

If it helps, the additional column is added last (after the lts column), e.g.:

-bash-4.2$ cat ~/sandbox/test/index.tab
version date    files   npm     v8      uv      zlib    openssl modules lts     security
v12.2.0 2019-05-07      aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,sunos-x64,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip     6.9.0   7.4.288.21      1.28.0  1.2.11  1.1.1b  72      -       -
v12.1.0 2019-04-29      aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,sunos-x64,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip     6.9.0   7.4.288.21      1.28.0  1.2.11  1.1.1b  72      -       -
v12.0.0 2019-04-23      aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,sunos-x64,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip     6.9.0   7.4.288.21      1.28.0  1.2.11  1.1.1b  72      -       -
v10.15.3        2019-03-05      aix-ppc64,headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,sunos-x64,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip        6.4.1   6.8.275.32      1.23.2  1.2.11  1.1.0j  64    Dubnium  -
v10.15.2        2019-02-28      aix-ppc64,headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,sunos-x64,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip        6.4.1   6.8.275.32      1.23.2  1.2.11  1.1.0j  64    Dubnium  true
...

@ljharb
Copy link
Member

ljharb commented May 11, 2019

Theoretically that should be fine; nvm's just using awk to split, but it'd be ideal to have a test in this repo that runs the latest nvm.sh against a sample index.tab, to ensure it won't break in the future :-)

Trott pushed a commit to Trott/io.js that referenced this pull request May 13, 2019
The release commit message for security releases have conventionally
started with the phrase `This is a security release.`. Codify this
as part of the release process so that the distribution indexer can
use this to detect and mark releases as security releases.

Fixes: nodejs/Release#437
Refs: nodejs#27612 (comment)
Refs: nodejs/nodejs-dist-indexer#9

PR-URL: nodejs#27643
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit to nodejs/node that referenced this pull request May 14, 2019
The release commit message for security releases have conventionally
started with the phrase `This is a security release.`. Codify this
as part of the release process so that the distribution indexer can
use this to detect and mark releases as security releases.

Fixes: nodejs/Release#437
Refs: #27612 (comment)
Refs: nodejs/nodejs-dist-indexer#9

PR-URL: #27643
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@rvagg
Copy link
Member

rvagg commented May 29, 2019

good to go, nice narrowing down with the dual regex @richardlau. I'm going to add this to it when I merge and then push it live and see what happens.

diff --git a/package.json b/package.json
index 9c0e901..7190c33 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,7 @@
     "semver": "~5.5.1"
   },
   "scripts": {
-    "test": "node ls-types.js && node transform-filename.js && node decode-ref.js"
+    "test": "node ls-types.js && node transform-filename.js && node decode-ref.js && node is-security-release.js"
   },
   "bin": {
     "nodejs-dist-indexer": "./dist-indexer.js",

@rvagg
Copy link
Member

rvagg commented May 29, 2019

ok, live at https://nodejs.org/download/release/index.tab and https://nodejs.org/download/release/index.json, I'd apprecaite some sanity checking that the true's are correct if someone has the time.
The "security" field will show up for other dist types (nightly, rc, test) on their next drops.

@rvagg rvagg closed this May 29, 2019
@richardlau
Copy link
Member Author

ok, live at https://nodejs.org/download/release/index.tab and https://nodejs.org/download/release/index.json, I'd apprecaite some sanity checking that the true's are correct if someone has the time.
The "security" field will show up for other dist types (nightly, rc, test) on their next drops.

-bash-4.2$ awk '$11 == "true" {print $1}' index.tab
v11.10.1
v11.3.0
v10.15.2
v10.14.0
v9.10.0
v8.15.1
v8.14.0
v8.11.4
v8.11.0
v8.9.3
v8.1.4
v7.10.1
v6.17.0
v6.15.0
v6.14.4
v6.14.0
v6.12.2
v6.11.5
v6.11.1
v6.7.0
v4.9.0
v4.8.7
v4.8.5
v4.8.4
v4.6.1
v4.6.0
v0.12.17
v0.12.16
v0.12.15
v0.10.48
v0.10.47
v0.10.46
-bash-4.2$

I've checked all of these (via the Changelog link on https://nodejs.org/en/download/releases/) and there are no false positives.

@rvagg
Copy link
Member

rvagg commented May 31, 2019

"This is a security release" should go into the release instructions now as a requirement now

@richardlau
Copy link
Member Author

"This is a security release" should go into the release instructions now as a requirement now

Already done in nodejs/node#27643.

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.

4 participants