Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Implements the Apollo Federation Subgraph Spec, allowing an ElasticGraph application to be plugged into an Apollo-powered GraphQL server as a subgraph.
Note: this library only supports the v2 Federation specification.
First, add elasticgraph-apollo
to your Gemfile
:
gem "elasticgraph-apollo"
Finally, update your ElasticGraph schema artifact rake tasks in your Rakefile
so that ElasticGraph::GraphQL::Apollo::SchemaDefinition::APIExtension
is
passed as one of the extension_modules
:
require "elastic_graph/schema_definition/rake_tasks"
require "elastic_graph/apollo/schema_definition/api_extension"
ElasticGraph::SchemaDefinition::RakeTasks.new(
schema_element_name_form: :snake_case,
index_document_sizes: true,
path_to_schema: "config/schema.rb",
schema_artifacts_directory: artifacts_dir,
extension_modules: [ElasticGraph::Apollo::SchemaDefinition::APIExtension]
)
That's it!
This library supports multiple versions of Apollo federation. As of Jan. 2024, it supports:
By default, the newest version is targeted. If you need an older version (e.g. because your organization is running an older Apollo version), you can configure it in your schema definition with:
schema.target_apollo_federation_version "2.3"
This project uses https://github.com/apollographql/apollo-federation-subgraph-compatibility to verify compatibility with Apollo. Things to note:
elasticgraph-apollo/script/test_compatibility
to run the compatibility tests (the CI build runs this).elasticgraph-apollo/script/boot_eg_apollo_implementation
to boot the ElasticGraph compatibility test implementation (can be useful for debugging test_compatibility
failures).docker
, node
, and npm
).Use Docker Compose V2
flag in Docker Desktop (under "Preferences -> General"). Without that checked, I got errors like this:ERROR: for apollo-federation-subgraph-compatibility_router_1 Cannot start service router: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/host_mnt/Users/myron/Development/sq-elasticgraph-ruby/elasticgraph-apollo/vendor/apollo-federation-subgraph-compatibility/supergraph.graphql" to rootfs at "/etc/config/supergraph.graphql" caused: mount through procfd: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
FAQs
Unknown package
We found that elasticgraph-apollo demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.