src: add --security-revert command line flag
authorJames M Snell <jasnell@gmail.com>
Thu, 4 Feb 2016 03:09:52 +0000 (19:09 -0800)
committerJames M Snell <jasnell@gmail.com>
Tue, 9 Feb 2016 16:42:15 +0000 (08:42 -0800)
commitda3750f981fc889f5785d8185d7ac1e8a55a32c2
tree9006221db63e53a126c07d23249675c4a1a913a2
parent1c4ea61981e60af8d1277cb7ed14865c44373af4
src: add --security-revert command line flag

The `--security-revert={cvenum}` command line flag is a special purpose
flag to be used only in stable or LTS branches when a breaking change
is required to address a security vulnerability. Whenever a vulnerability
requires a breaking change, and a CVE has been assigned, the flag can
be used to force Node to revert to the insecure behavior that was
implemented before the fix was applied.

Note that this flag is intended to be used only as a last resort in the
case a security update breaks existing code. When used, a security
warning will be printed to stderr when Node launches.

The `--security-revert={cvenum}` flag takes a single CVE number as an
argument. Multiple instances of the `--security-revert={cvenum}` flag
can be used on the command line to revert multiple changes.

Whenever a new `--security-revert={cvenum}` is enabled, it should be
documented in the release notes and in the API docs.

Master and the first release of a new major (e.g. v6.0) should not have
any reverts available.

Every time a new `--security-revert={cvenum}` is added, there should be
a semver-minor bump in the stable and LTS branch.

PR-URL: https://github.com/nodejs/node-private/pull/20
node.gyp
src/node.cc
src/node_revert.cc [new file with mode: 0644]
src/node_revert.h [new file with mode: 0644]