bluewave-labs / checkmate

Checkmate is an open-source, self-hosted monitoring tool built with React.js, Node.js, and MongoDB, designed to track server uptime, response times, and incidents in real-time with beautiful visualizations. Get powerful insights and proactive alerts to keep your services running smoothly.
https://uptime-demo.bluewavelabs.ca/
GNU Affero General Public License v3.0
616 stars 68 forks source link

Update dependency helmet to v8 #1196

Closed renovate-bot closed 5 days ago

renovate-bot commented 6 days ago

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
helmet (source) ^7.1.0 -> ^8.0.0 age adoption passing confidence

Release Notes

helmetjs/helmet (helmet) ### [`v8.0.0`](https://redirect.github.com/helmetjs/helmet/blob/HEAD/CHANGELOG.md#800) [Compare Source](https://redirect.github.com/helmetjs/helmet/compare/v7.2.0...v8.0.0) ##### Changed - **Breaking:** `Strict-Transport-Security` now has a max-age of 365 days, up from 180 - **Breaking:** `Content-Security-Policy` middleware now throws an error if a directive should have quotes but does not, such as `self` instead of `'self'`. See [#​454](https://redirect.github.com/helmetjs/helmet/issues/454) - **Breaking:** `Content-Security-Policy`'s `getDefaultDirectives` now returns a deep copy. This only affects users who were mutating the result - **Breaking:** `Strict-Transport-Security` now throws an error when "includeSubDomains" option is misspelled. This was previously a warning ##### Removed - **Breaking:** Drop support for Node 16 and 17. Node 18+ is now required

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.



This PR was generated by Mend Renovate. View the repository job log.

coderabbitai[bot] commented 6 days ago

Walkthrough

The pull request involves an update to the package.json file for the server application, specifically upgrading the version of the helmet dependency from ^7.1.0 to ^8.0.0. No other changes to dependencies or scripts are included in this update.

Changes

File Change Summary
Server/package.json Updated helmet dependency from ^7.1.0 to ^8.0.0

Possibly related PRs


📜 Recent review details **Configuration used: .coderabbit.yaml** **Review profile: CHILL**
📥 Commits Reviewing files that changed from the base of the PR and between bf79dde96093f9e6cc6db9ae3d226f4d434de46e and 072ff96b7c5e02d8286e3ece1fa8f2ddf0b16c7c.
⛔ Files ignored due to path filters (1) * `Server/package-lock.json` is excluded by `!**/package-lock.json`
📒 Files selected for processing (1) * `Server/package.json` (1 hunks)
🔇 Additional comments (3)
Server/package.json (3) `23-23`: **Knees weak, arms heavy: Let's check the dependency tree! 🌲** We should verify that this major version bump doesn't conflict with other security middleware. Consider adding security testing to verify the new header configurations: 1. Add HSTS preload testing 2. Validate CSP directives 3. Implement security headers monitoring
✅ Verification successful **Yo, this security setup's clean like mom's spaghetti! 🍝** The helmet upgrade to v8 is safe to proceed, eh! The implementation is straightforward with default configs, and there's no conflict with other middleware. The setup shows: - Basic helmet() with default settings - Clean middleware order: cors -> express.json -> helmet - Standard auth header handling in JWT/admin verification The security middleware stack is properly layered like a lasagna, with no overlapping header configurations that could cause conflicts.
🏁 Scripts executed The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Check for potential conflicts in security middleware rg -l "cors|express-rate-limit|csurf" --type js # Look for custom security middleware rg -l "security|protection|headers" --type js --glob '!node_modules' ``` Length of output: 1030 --- Script: ```shell #!/bin/bash # Let's check how helmet is actually used in the codebase rg "helmet" -B 2 -A 2 Server/index.js # And peek at the current security middleware setup cat Server/index.js | grep -A 10 "const app = express()" # Check for any custom security headers rg "headers" -B 2 -A 2 Server/middleware/ ``` Length of output: 1906
--- `23-23`: _:warning: Potential issue_ **Mom's spaghetti warning: Breaking changes in security headers! 🍜** The upgrade includes significant changes to Content-Security-Policy and HSTS headers. We need to verify our middleware configuration! Key breaking changes to address: 1. HSTS max-age increased to 365 days 2. CSP will throw on malformed directives 3. getDefaultDirectives now returns deep copy Would you like me to help create a migration guide for these changes? --- `23-23`: _:warning: Potential issue_ **Yo dawg, we need to verify Node.js compatibility! 🍝** This upgrade to helmet v8 drops support for Node.js 16 and 17, requiring Node 18+. Let's make sure we're not gonna have a bad time! Add Node.js version constraint to prevent deployment issues: ```diff { "name": "server", + "engines": { + "node": ">=18" + }, ```
✅ Verification successful **Yo dawg, we're good to go with helmet v8! 🍝** Looking at the dependencies, we've got several packages already requiring Node.js 18+, including: - `mocha` (^18.12.0) - `express` (^18.17.0) - Some other cool cats in the mix The server's already running on modern Node.js, so this helmet upgrade is just following the flow. No need to add explicit Node.js version constraints - we're already locked in by our other dependencies!
🏁 Scripts executed The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Check for Node.js version constraints if [ -f "package.json" ]; then echo "Checking package.json for Node.js version..." grep -i "engines" package.json || echo "No engines field found!" fi # Look for .nvmrc or similar version files fd -e nvmrc -e node-version ``` Length of output: 55 --- Script: ```shell #!/bin/bash # Let's check the Server directory specifically for package.json cat Server/package.json # Also check for any deployment configs that might specify Node version fd -e yaml -e yml | xargs grep -l "node" # And let's see what other files might give us Node version hints rg -i "node.*version|engines" --type yaml --type json ``` Length of output: 26481 --- Script: ```shell #!/bin/bash # Let's check what Node.js version our dependencies need rg '"node":\s*"[^"]*"' Server/package-lock.json # And let's see what modern features we're using that might need Node 18 rg -l "\.fetch|\.structuredClone|\.findLast|\.findLastIndex" Server/ ``` Length of output: 8264

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): > ‼️ **IMPORTANT** > Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged. - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (Invoked using PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### Documentation and Community - Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.