nestjs-graphql-best-practice
nestjs-graphql-best-practice copied to clipboard
[Security] Bump apollo-server-cache-memcached from 0.6.7 to 3.0.3
Bumps apollo-server-cache-memcached from 0.6.7 to 3.0.3. This update includes a security fix.
Vulnerabilities fixed
Sourced from The GitHub Security Advisory Database.
Introspection in schema validation in Apollo Server We encourage all users of Apollo Server to read this advisory in its entirety to understand the impact. The Resolution section contains details on patched versions.
Impact
If
subscriptions: falseis passed to theApolloServerconstructor options, there is no impact. If implementors were not expecting validation rules to be enforced on the WebSocket subscriptions transport and are unconcerned about introspection being enabled on the WebSocket subscriptions transport (or were not expecting that), then this advisory is not applicable. Ifintrospection: trueis passed to theApolloServerconstructor options, the impact is limited to user-provided validation rules (i.e., usingvalidationRules) since there would be no expectation that introspection was disabled.The enforcement of user-provided validation rules on the HTTP transport is working as intended and is unaffected by this advisory. Similarly, disabling introspection on the HTTP transport is working as intended and is unaffected by this advisory.
> Note: Unless
subscriptions: falseis explicitly passed to the constructor parameters ofnew ApolloServer({ ... }), subscriptions are enabled by default, whether or not there is aSubscriptiontype present in the schema. As an alternative to upgrading to a patched version, see the Workarounds section below to disable subscriptions if it is not necessary.In cases where
subscriptions: falseis not explicitly set, the subscription server is impacted since validation rules which are enforced on the main request pipeline within Apollo Server were not being passed to theSubscriptionServer.createinvocation (seen here, prior to the patch).The omitted validation rules for the subscription server include any
validationRulespassed by implementors to theApolloServerconstructor which were expected to be enforced on the subscriptions WebSocket endpoint. Additionally, because an internalNoIntrospectionvalidation rule is used to disable introspection, it would have been possible to introspect a server on the WebSocket endpoint that theSubscriptionServercreates even though it was not possible on other transports (e.g. HTTP).The severity of risk depends on whether sensitive information is being stored in the schema itself. The contents of schema descriptions, or secrets which might be revealed by the names of types or field names within those types, will determine the risk to individual implementors.
Affected packages
The bug existed in
apollo-server-coreversions prior to version 2.14.2, however, this means all integration packages (e.g.,apollo-server-express, etc.) prior to version 2.14.2 which depend onapollo-server-corefor their subscriptions support are affected. This includes theapollo-serverpackage that automatically provides an Express server.
... (truncated)
Affected versions: < 2.14.2
Changelog
Sourced from apollo-server-cache-memcached's changelog.
CHANGELOG
The version headers in this history reflect the versions of Apollo Server itself. Versions of other packages (e.g., those which are not actual HTTP integrations; packages not prefixed with "
apollo-server", or just supporting packages) may use different versions.🆕 Please Note!: 🆕 The
@apollo/federationand@apollo/gatewaypackages now live in theapollographql/federationrepository.vNEXT
- Nothing yet! Stay tuned!
v3.1.1
apollo-server-env: UpdateHeaders.values()type to match whatnode-fetchactually does and what the Fetch spec says it should be, and what@types/node-fetchfinally gets correct. [PR #5537](apollographql/apollo-server#5537)v3.1.0
apollo-server-core: If a client does not provide a value or provides null for a variable declared to be non-null, this is now reported as an error with anextensions.codeofBAD_USER_INPUTrather thanINTERNAL_SERVER_ERROR. (This is similar to a change we made in v2.23.0 for variables that are sent as the wrong type.) [PR #5508](apollographql/apollo-server#5508) [Issue #5353](apollographql/apollo-server#5353)apollo-server-core/apollo-server-plugin-base: Add support forschemaDidLoadOrUpdateevent hooks, to be specified by theserverWillStartevent hook. Plugins listening for this event will receive the API schema (and core schema for gateways) when the server's schema is initially loaded and when the server's schema is updated. For more information about this plugin event, see the plugin event reference documentation. [PR #5187](apollographql/apollo-server#5187)apollo-server-core: Add support for schema reporting when using Apollo Gateway. At the time of this package's release, Apollo Studio does not yet support schema reporting from gateways, so you should not use this feature yet for gateways (unless instructed otherwise by Apollo staff or by the Studio docs). If you do enable schema reporting for a gateway, the version of@apollo/gatewaymust be at least0.35.0, or elsestart()will error. [PR #5187](apollographql/apollo-server#5187)apollo-server-core: Support gateways without executors, to help with mocking gateways. Note that if you have a customGatewayInterfaceimplementation, Apollo Server will now honor theexecutorreturned fromloadand will ignore theexecutormethod on the gateway itself. See the PR for details. [PR #5539](apollographql/apollo-server#5539)apollo-server-plugin-response-cache,apollo-server-plugin-operation-registry: Change how the default export from the package is set up to fix errors with some build tools. [PR #5542](apollographql/apollo-server#5542)v3.0.2
apollo-server-types: TypeScript typings forinfo.cacheControlare now added toGraphQLResolveInfoas part ofapollo-server-typesrather than a nested file inapollo-server-core, and the field now has a named type,ResolveInfoCacheControl. [PR #5512](apollographql/apollo-server#5512)apollo-server-micro: Like the other framework integrations, only serve landing pages from the GraphQL path (/graphqlby default, configurable via thepathoption tocreateHandler). [PR #5516](apollographql/apollo-server#5516)apollo-server-env: Remove polyfills ofObject.values,Object.entries, andutil.promisifywhich were only required for Node 6 support. RemoveValueOrPromiseandWithRequiredTypeScript types that are also provided byapollo-server-types. [PR #5515](apollographql/apollo-server#5515)v3.0.1
apollo-server-core: The defaultmaxAge(which defaults to 0) for a field should only be applied if no dynamic cache control hint is set. Specifically, if you call the (new in 3.0.0) functioninfo.cacheControl.cacheHint.restrict({ maxAge: 60 }), it should setmaxAgeto 60 even if the default max age is lower. (This bug fix is the behavior that was intended for 3.0.0, and primarily affects the behavior of functions added in Apollo Server 3. This does mean that checkinginfo.cacheControl.cacheHintnow only shows explicitly-setmaxAgeand not the default, but this seems like it will be helpful since it lets you differentiate between the two similar circumstances.) [PR #5492](apollographql/apollo-server#5492)apollo-server-lambda: Fix TypeScript types forcontextfunction. (In 3.0.0, the TS types for thecontextfunction were accidentally inherited fromapollo-server-expressinstead of using the correct Lambda-specific types). [PR #5481](apollographql/apollo-server#5481)apollo-server-lambda,apollo-server-cloud-functions: Make the default URL path for handling GraphQL be/(ie, handle all requests). This is similar to how these packages work in Apollo Server 2. After this change,apollo-serverand the serverless integrations have a default URL path of/(or ignore the path entirely, in the case ofapollo-server-azure-functions), and the framework integrations have a default URL path of/graphql. This is a backwards-incompatible change from 3.0.1 but minimizes the changes from Apollo Server 2 (and this AS3 change was not intended or documented). [PR #5497](apollographql/apollo-server#5497) [Issue #5462](apollographql/apollo-server#5462)v3.0.0
BREAKING CHANGES
Apollo Server 3 contains quite a few breaking changes. Read our migration guide for more details on how to update your app.
Bumped dependencies
The minimum versions of these dependencies have been bumped to provide an improved foundation for the development of future features.
- Dropped support for Node.js v6, v8 and v10. Apollo Server 3.x is being compiled to ES2020, which maps to Node.js 12+.
- Note also that we only test Apollo Server on even-numbered versions of Node.js, and we only aim to support Node.js versions that are under long-term support from the Node.js Foundation.
- Dropped support for versions of the
graphqllibrary prior to15.3.0.
... (truncated)
Commits
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 rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)@dependabot use these labelswill set the current labels as the default for future PRs for this repo and language@dependabot use these reviewerswill set the current reviewers as the default for future PRs for this repo and language@dependabot use these assigneeswill set the current assignees as the default for future PRs for this repo and language@dependabot use this milestonewill set the current milestone as the default for future PRs for this repo and language@dependabot badge mewill comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot dashboard:
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)