A sample Express application with all sorts of security functionality built in.
npm install
gen-cert.sh
: On windows the-subj
part needs double "//"-es, but in *nix-based systems it has to be a single "/"!npm start
Site should be available at https://localhost:3000
- plugin:node/recommended
- plugin:security/recommended
Proper log messages with Morgan.
Never expose system information in responses. Utilize custom error response: server/top-level-error-handler.js
Express Rate Limit
Never use keys/secure information in project sources. Utilize dotenv.
helmet.referrerPolicy()
helmet.contentSecurityPolicy()
helmet.featurePolicy()
- https://git.io/security
- https://github.com/goldbergyoni/nodebestpractices
- https://helmetjs.github.io
MIT