trailofbits

Verifed by r2c
Trail of Bits
Author
unknown
Download Count*

Written by the Trail of Bits security experts. See https://github.com/trailofbits/semgrep-rules for more.

Run Locally

Rules (78)

profile photo of trailofbitstrailofbits

The Apollo GraphQL uses the 'schemaDirectives' option. This works in ApolloServer v2, but does nothing in version >=3. Depending on what the directives are used for, this can expose authenticated endpoints, disable rate limiting, and more. See the references on how to create custom directives in v3 and v4.

profile photo of trailofbitstrailofbits

Calling `gc` suggests to the JVM that the garbage collector should be run, and memory should be reclaimed. This is only a suggestion, and there is no guarantee that anything will happen. Relying on this behavior for correctness or memory management is an anti-pattern.

profile photo of trailofbitstrailofbits

Found usage of msgpack-numpy unpacking, which relies on pickle to deserialize numpy arrays containing objects. Functions reliant on pickle can result in arbitrary code execution. Consider switching to a safer serialization method.

profile photo of trailofbitstrailofbits

Pandas eval() and query() may be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources.

profile photo of trailofbitstrailofbits

Keras' load_model function may result in arbitrary code execution: - It can load vulnerable pickled models - It can load an hdf5 model that contains a lambda layer with arbitrary code that will be executed every time the model is used (loading, training, eval) Note: Keras loading with the built-in file format should be safe as long as checks are not disabled.