Skip to content

docs: add lint-time security checks section to security best practices - #2491

Open
methila-2056 wants to merge 1 commit into
expressjs:mainfrom
methila-2056:docs/lint-time-security-checks
Open

docs: add lint-time security checks section to security best practices#2491
methila-2056 wants to merge 1 commit into
expressjs:mainfrom
methila-2056:docs/lint-time-security-checks

Conversation

@methila-2056

Copy link
Copy Markdown

Description

Adds a short "Lint your code for security issues" section to the Production Best Practices: Security page, placed after the dependency-scanning section so the page flows from "check your dependencies" → "check your own code".

The section:

  • explains that dependency scanning does not cover the app's own source code
  • lists concrete insecure patterns catchable at lint time (hardcoded secrets, unsafe redirects, missing cookie flags, injection-prone string building), cross-linked to the existing open-redirect and cookie-security sections
  • stays tool-neutral per the discussion in Suggestion: mention lint-time security checks on the security best practices page #2471 — it mentions ESLint as the common base and notes plugins exist, without endorsing any specific plugin
  • recommends running these checks in CI, and clarifies static analysis complements rather than replaces runtime protections like Helmet

Motivation

Resolves #2471. Most Express apps already run ESLint, so adding security rules is usually a one-dependency change; the page previously covered runtime protections and npm audit/Snyk but not this layer.

Testing

  • Prettier check passes on the modified file
  • CSpell passes (0 issues)
  • Anchor added to the page TOC

Adds a short section on static analysis to the Production Best Practices:
Security page. It complements the existing runtime protections and
dependency scanning advice by covering lint-time detection of insecure
patterns (hardcoded secrets, unsafe redirects, missing cookie flags,
injection-prone string building).

Resolves expressjs#2471

Signed-off-by: METHILA M <260591810+methila-2056@users.noreply.github.com>
@methila-2056
methila-2056 requested a review from a team as a code owner August 26, 2026 09:23
@netlify

netlify Bot commented Aug 26, 2026

Copy link
Copy Markdown

Deploy Preview for expressjscom-preview ready!

Name Link
🔨 Latest commit 6d30aca
🔍 Latest deploy log https://app.netlify.com/projects/expressjscom-preview/deploys/6a8eb0848754620008242d74
😎 Deploy Preview https://deploy-preview-2491--expressjscom-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 99 (🟢 up 2 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

Suggestion: mention lint-time security checks on the security best practices page

1 participant