
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
[](https://npmjs.org/cruddl) [](https://github.com/AEB-labs/cruddl/actions?query=branch%3Amain) [ to generate one tailored query for each GraphQL request.
npm install --save cruddl
Install ArangoDB and create a new database.
import { ArangoDBAdapter } from 'cruddl';
const db = new ArangoDBAdapter({
databaseName: 'databaseName',
url: 'http://root:@localhost:8529',
user: 'root',
password: '',
});
If you just want to explore the features, you can also use an in-memory database implementation - but don't use this for anything else.
import { InMemoryAdapter } from 'cruddl';
const db = new InMemoryAdapter();
Define your data model and create a project:
import { Project } from 'cruddl';
const project = new Project({
sources: [
{
name: 'schema.graphqls',
body: `
type Movie @rootEntity {
title: String
actors: Actor @relation
}
type Actor @rootEntity {
name: String
movies: Movie @relation(inverseOf: "actors")
}`,
},
{
name: 'permission-profiles.json',
body: JSON.stringify({
permissionProfiles: {
default: {
permissions: [
{
roles: ['users'],
access: 'readWrite',
},
],
},
},
}),
},
],
getExecutionOptions: ({ context }) => ({ authContext: { authRoles: ['users'] } }),
getOperationIdentifier: ({ context }) => context as object, // each operation is executed with an unique context object
});
Then, create the GraphQL schema and serve it:
import { ApolloServer } from 'apollo-server';
const schema = project.createSchema(db);
db.updateSchema(project.getModel()); // create missing collections
const server = new ApolloServer({
schema,
context: ({ req }) => req, // pass request as context so we have a unique context object for each operation
});
server.listen(4000, () => console.log('Server is running on http://localhost:4000/'));
See the modelling guide and the api documentation for details.
The core of cruddl perfectly works in a browser (e.g., using webpack), and this can be useful to
generate a mock GraphQL schema on the fly or to validate a cruddl project. However, the ArangoDB
adapter only works with node imports like path
. Unless you configure webpack to provide mock
modules for them, you will get an error when you import cruddl
in a webpack environment. To solve
this, you can import the core symbols from cruddl/core
and the InMemoryAdapter
from
cruddl/inmemory
.
For consistency, tests shall be run against a single arangodb node:
When done, stop the instance with npm run stop_arangodb
cruddl currently supports the following versions of ArangoDB:
ArangoDB 3.8 is still included in the CI tests, but no longer supported officially, and the CI tests will be removed in a future minor or patch release.
Starting with ArangoDB 3.12, the default locale for new databases has been changed from en_US
to
en_US_POSIX
. cruddl does not support en_US_POSIX
at the moment. If you don't have a locale
configured on your operating system (LANG
is not set), you need to change the locale to en_US
.
You can either configure the locale on the operating system, or use the --default-language=en_US
option. Do not use --icu-language
, as this will change the behavior in a different way, which is
also currently not supported by cruddl.
FAQs
[](https://npmjs.org/cruddl) [](https://github.com/AEB-labs/cruddl/actions?query=branch%3Amain) [![Package Quality](https://npm.pa
The npm package cruddl receives a total of 193 weekly downloads. As such, cruddl popularity was classified as not popular.
We found that cruddl 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.