
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
graphql-validate-directive
Advanced tools
This is a directive validation library for GraphQL. Inspired by validate-directive.
Different with graphql-constraint-directive. It do validate on resolve field instead of creating new scaler.
yarn add graphql-validate-directive
or
npm i -S graphql-validate-directive
Use in the project.
import {
validateDirective,
GraphQLValidateDirectiveTypeDefs,
} from 'graphql-validate-directive'
import { makeExecutableSchema } from '@graphql-tools/schema'
const schema = makeExecutableSchema({
typeDefs: [
// ... your type definitions
GraphQLValidateDirectiveTypeDefs,
],
resolvers: {
// ...
},
})
validateDirective()(schema)
Use in schema.
# used on input field
input PostInput {
title: String! @validate(minLength: 1, maxLength: 1000)
content: String! @validate(minLength: 1, maxLength: 1000)
# used on array
tags: [String!]
@validate(minItems: 1, maxItems: 10, minLength: 1, maxLength: 100)
}
type Mutation {
createPost(input: PostInput!): Post
# used on argument
createMessage(
content: String! @validate(minLength: 1, maxLength: 200)
): Message
}
MIT Licensed.
FAQs
A GraphQL directive for input validation
We found that graphql-validate-directive demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
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.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.