I hereby claim:
- I am camsjams on github.
- I am camsjams (https://keybase.io/camsjams) on keybase.
- I have a public key whose fingerprint is 3685 0AB3 F8D9 E29C FEDF 83C2 E312 4546 D37A 5C39
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Migrate [swagger-express-mw] / and underlying [swagger-node-runner] to [express-openapi]
There have been a number of high and critical vulnerabilities caused by the npm package.
I myself have been hunting through ways to figure out how to solve these problems, as the package maintainers seem to have abandonded this library (there was even an NPM fork which still seems to have issues with bagpipes
- see [swagger-node-runner year old PR]). I have created a basic guide to help others out, so that I am not just another DenverCoder9 (https://xkcd.com/979/)
[npm audit] and [snyk] scans find issues like:
#! /bin/bash | |
# Description: Call this from your CircleCi config after your deploys have been completed | |
# | |
# Set the following variables: | |
# ENVIRONMENT - the name of the environment the deploy went to, ex: "dev", "staging", "production" | |
# CHANNEL - the slack channel you want to post to | |
# WEBHOOK - the slack webhook url you created | |
# PROJECT_NAME - this defaults to looking in a package.json for the "name", customize to your liking and language | |
ENVIRONMENT="test" |
#! /bin/bash | |
# Description: Call this from your CircleCi config after your deploys have been completed | |
# | |
# Set the following variables: | |
# ENVIRONMENT - the name of the environment the deploy went to, ex: "dev", "staging", "production" | |
# CHANNEL - the slack channel you want to post to | |
# WEBHOOK - the slack webhook url you created | |
# PACKAGE_VERSION - this defaults to looking in a package.json for the "version", customize to your liking and language | |
# PROJECT_NAME - this defaults to looking in a package.json for the "name", customize to your liking and language |
const DUPLICATION_LIMIT = 100; | |
const FILE_SPAN_LIMIT = 2; | |
module.exports = function() { | |
/** | |
* @see node_modules/jscpd/src/report.coffee | |
*/ | |
if (this.map.numberOfDuplication > DUPLICATION_LIMIT || this.map.numberOfFiles > FILE_SPAN_LIMIT) { | |
console.error('Copy Paste detection found too many files over threshold.\n'); | |
console.error(this.stdReporter()); |
var startTime; | |
function start() { | |
startTime = new Date().getTime(); | |
} | |
function stop() { | |
var endTime = new Date().getTime(), | |
diff = (endTime - startTime); | |
console.log('\nTime taken: ' + format(diff) + '\n'); |