Skip to content
vetkitChecksChangelogDocumentation

vetkit.php.code-injection.dynamic-class-or-method

A class to instantiate or a method to call is chosen by request input (unsafe reflection). Attackers can reach classes and methods that were never meant to be exposed.

Last updated:

Suite: Security

php

A class to instantiate or a method to call is chosen by request input (unsafe reflection). Attackers can reach classes and methods that were never meant to be exposed.

Category: SECURITY · Engine rule severity: WARNING

How to fix it

Resolve the class or method name through an explicit allow-list (match / array lookup) before using it.

References

Source: packages/engine/rules/sast/php.yml.

Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.