Add Security Best Practices guide to documentation #3575
Closed
+125
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds a comprehensive Security Best Practices guide to the node-postgres documentation, covering common security pitfalls and how to prevent them.
Contributing Guidelines Compliance
Per the README Contributing section:
What's Added
New file:
docs/pages/guides/security.mdTopics Covered:
Each section includes:
Static Analysis Tools Section
The guide also recommends eslint-plugin-pg as a static analysis tool to catch these issues at development time.
Disclosure: I am the author of eslint-plugin-pg. The recommendation is disclosed transparently and the tool is genuinely useful for node-postgres users.
Why This Matters
Security is not currently covered in the node-postgres documentation. This guide helps developers avoid common mistakes that lead to:
Preview
The guide follows the existing documentation style and integrates with the current navigation structure.