Skip to content

Bump helmet from 7.0.0 to 8.0.0 #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github Mar 14, 2025

Bumps helmet from 7.0.0 to 8.0.0.

Changelog

Sourced from helmet's changelog.

8.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
  • 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

7.2.0 - 2024-09-28

Changed

  • Content-Security-Policy middleware now warns if a directive should have quotes but does not, such as self instead of 'self'. This will be an error in future versions. See #454

7.1.0 - 2023-11-07

Added

  • helmet.crossOriginEmbedderPolicy now supports the unsafe-none directive. See #477
Commits
  • 9a8e6d5 8.0.0
  • 6562cd7 CSP: speed up getDefaultDirectives
  • a8befb3 getDefaultDirectives should do a deep copy
  • 558ef2c HSTS: throw when misspelling "includeSubDomains" option
  • 73e7595 Content-Security-Policy: throw if directive value lacks necessary quotes
  • 76410e1 Content-Security-Policy can now use Object.hasOwn
  • 293bd18 Strict-Transport-Security: increase max-age to 1 year
  • 898cdc4 Require Node 18+
  • 7e2b069 7.2.0
  • 7bea915 Update changelog for 7.2.0 release
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Summary by Sourcery

Bump the helmet dependency from version 7.0.0 to 8.0.0.

Enhancements:

  • Increase the Strict-Transport-Security max-age to 365 days.
  • Update Content-Security-Policy middleware to throw an error if a directive should have quotes but does not.

@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Mar 14, 2025
Copy link

sourcery-ai bot commented Mar 14, 2025

Reviewer's Guide by Sourcery

This pull request bumps the helmet dependency from version 7.0.0 to version 8.0.0. This includes breaking changes such as an increased Strict-Transport-Security max-age, Content-Security-Policy middleware throwing errors for missing quotes, getDefaultDirectives returning a deep copy, Strict-Transport-Security throwing errors for misspelled options, and dropping support for Node 16 and 17.

Updated class diagram for Helmet

classDiagram
  class Helmet {
    <<interface>>
    +\__esModule: boolean
    +contentSecurityPolicy: function
    +crossOriginEmbedderPolicy: function
    +crossOriginOpenerPolicy: function
    +crossOriginResourcePolicy: function
    +dnsPrefetchControl: function
    +expectCt: function
    +frameguard: function
    +hidePoweredBy: function
    +hsts: function
    +ieNoOpen: function
    +noSniff: function
    +originAgentCluster: function
    +permittedCrossDomainPolicies: function
    +referrerPolicy: function
    +xssFilter: function
  }

  class Hsts {
    +maxAge: number
    +includeSubDomains: boolean
    +preload: boolean
  }

  Helmet .. Hsts : Uses
  note for Hsts "maxAge increased to 365 days\nincludeSubDomains now throws an error if misspelled"

  class ContentSecurityPolicy {
    +directives: Object
  }

  Helmet .. ContentSecurityPolicy : Uses
  note for ContentSecurityPolicy "Now throws an error if a directive should have quotes but does not\ngetDefaultDirectives now returns a deep copy"
Loading

File-Level Changes

Change Details Files
The pull request updates the helmet dependency from version 7.0.0 to version 8.0.0.
  • Updated helmet version from 7.0.0 to 8.0.0 in package.json.
  • Updated helmet version from 7.0.0 to 8.0.0 in package-lock.json.
package.json
package-lock.json
The Strict-Transport-Security max-age is now 365 days, up from 180.
  • Increased the Strict-Transport-Security max-age.
The Content-Security-Policy middleware now throws an error if a directive should have quotes but does not.
  • Updated Content-Security-Policy middleware to throw an error for missing quotes in directives.
The Content-Security-Policy's getDefaultDirectives now returns a deep copy.
  • Modified getDefaultDirectives to return a deep copy.
The Strict-Transport-Security now throws an error when 'includeSubDomains' option is misspelled.
  • Updated Strict-Transport-Security to throw an error for misspelled 'includeSubDomains' option.
Support for Node 16 and 17 has been dropped. Node 18+ is now required.
  • Dropped support for Node 16 and 17.
  • Node 18+ is now required.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have skipped reviewing this pull request. It seems to have been created by a bot (hey, dependabot[bot]!). We assume it knows what it's doing!

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/helmet-8.0.0 branch 2 times, most recently from d02fcfe to 6d0ff91 Compare March 14, 2025 02:47
Bumps [helmet](https://github.com/helmetjs/helmet) from 7.0.0 to 8.0.0.
- [Changelog](https://github.com/helmetjs/helmet/blob/main/CHANGELOG.md)
- [Commits](helmetjs/helmet@v7.0.0...v8.0.0)

---
updated-dependencies:
- dependency-name: helmet
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/helmet-8.0.0 branch from 6d0ff91 to 31c44ef Compare March 14, 2025 02:49
Copy link
Author

dependabot bot commented on behalf of github Mar 18, 2025

Superseded by #58.

@dependabot dependabot bot closed this Mar 18, 2025
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/helmet-8.0.0 branch March 18, 2025 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants