classExternalInput
final class ExternalInput
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
The places a value can enter the program from outside it.
A gap the analyzer can trace back to one of these is the difference between a query that is merely dynamic and one an attacker can steer.
Methods§
public function isVariable(string $name): boolWhether reading that variable reads something from outside the program.
Parameters
$name | string |
Returns
boolTest cases 1
Called from 2
Calls 1
- class-const ExternalInput::VARIABLES() line 46
public function isFunction(string $name): boolWhether calling that function reads something from outside the program.
Parameters
$name | string |
Returns
boolTest cases 1
Called from 1
Calls 3
- class-const ExternalInput::FUNCTIONS() line 54
- function-call
strtolowerline 54 - function-call
ltrimline 54
public function isStream(string $target): boolWhether reading that file reads the request body.
Parameters
$target | string |
Returns
boolTest cases 1
Calls 1
- function-call
str_starts_withline 62
Private surface 2§
Implementation details, listed for orientation only.
private const VARIABLES = ['_GET' => true, '_POST' => true, '_REQUEST' => true, '_COOKIE' => true, '_SERV…private const FUNCTIONS = ['getenv' => true, 'filter_input' => true, 'filter_input_array' => true, 'readl…Test cases 87§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 3
Other tests reaching this symbol 84
CatalogCommandTestcallsCallEvaluatorTest::testApplyEffectsKeepsKnownByValueArgumentsAndOpensReferencescallsCallEvaluatorTest::testApplySinkHandsBackAHandleNamingThePreparingCallcallsCallEvaluatorTest::testApplySinkHandsBackWhatEachKindOfDatabaseCallHandsBackcallsCallEvaluatorTest::testArgumentsIsCalledWithTheCallItselfcallsCallEvaluatorTest::testCallKeyOfTellsOneCallApartFromEveryOthercallsCallEvaluatorTest::testDispatchReadsTheImplementationsTheSourceDeclarescallsCallEvaluatorTest::testEvaluateAppliesOnlyPossibleCallWritescallsCallEvaluatorTest::testEvaluateFunctionGivesUpOnAFunctionWhoseNameIsNotWrittencallsCallEvaluatorTest::testEvaluateFunctionHandsBackWhatADatabaseCallHandsBackcallsCallEvaluatorTest::testEvaluateFunctionNamesTheExternalInputItReadscallsCallEvaluatorTest::testEvaluateInstantiationNamesTheClassItCreatescallsCallEvaluatorTest::testEvaluateMethodFollowsAMethodDeclaredWithoutABodycallsCallEvaluatorTest::testEvaluateMethodFollowsIntoAClassNoExtensionModelscallsCallEvaluatorTest::testEvaluateMethodFollowsIntoAModelledClassOnlyFromItsOwnBodycallsCallEvaluatorTest::testEvaluateMethodGivesUpOnAMethodWhoseNameIsNotWrittencallsCallEvaluatorTest::testEvaluateOfAFirstClassCallableIsAClosurecallsCallEvaluatorTest::testEvaluateRetainsReferenceWritesForAModeledNamespacedFunctioncallsCallEvaluatorTest::testEvaluateStaticGivesUpWhenTheClassOrTheNameIsNotWrittencallsCallEvaluatorTest::testEvaluateStaticHandsBackWhatADatabaseCallHandsBackcallsCallEvaluatorTest::testEvaluateStaticResolvesTheSelfKeywordsToTheEnclosingClasscallsCallEvaluatorTest::testFollowWithoutReturnsToReadNamesTheCalleecallsCallEvaluatorTest::testFunctionNameUsesRegisteredNamespaceBeforeGlobalFallbackcallsCallEvaluatorTest::testInvalidateEscapesOpensAliasedObjectStatecallsCallEvaluatorTest::testIsOwnReceiverTellsACallOnItselfApartFromOneOnSomethingElsecallsCallEvaluatorTest::testSiteKeyOfNamesTheCallAndTheDatabaseCallcallsCallEvaluatorTest::testTheCallMethodsAreReachedDirectlycallsCalleeReturnsTestcallsCallersTestcallsDeriverTestcallsEntryBinderTestcallsFreeNamesTestcallsCallbackEffectsTestcallsObjectEffectsTestcallsPropertyWritesTestcallsAssignmentStepsTestcallsBackwardSlicerTestcallsLoopPassesTestcallsSliceExecutorTestcallsReferenceEffectsTestcallsWriteEffectsTestcallsExpressionEvaluatorTestcallsInterpreterTestcallsModelQueriesTestcallsReferenceEvaluatorTest::testAssignElementIgnoresATargetItCannotNamecallsReferenceEvaluatorTest::testAssignElementKeepsWhetherTheArrayIsKnownInFullcallsReferenceEvaluatorTest::testAssignElementMarksTheArrayANestedWriteGoesIntoAsIncompletecallsReferenceEvaluatorTest::testAssignLeavesATargetItDoesNotTrackAlonecallsReferenceEvaluatorTest::testAssignListDescendsIntoANestedListcallsReferenceEvaluatorTest::testAssignListLeavesAGapCarryingTheOriginOfAValueThatIsNotAKnownArraycallsReferenceEvaluatorTest::testAssignListLeavesAGapForAnElementTheArrayDoesNotHoldcallsReferenceEvaluatorTest::testAssignListReadsAKeyedTargetByItsKeycallsReferenceEvaluatorTest::testAssignListWritesEachElementIntoTheTargetAtItsPositioncallsReferenceEvaluatorTest::testEvaluateOnlyAnswersForReferencescallsReferenceEvaluatorTest::testEvaluateReadsAnInstantiationAStaticPropertyAndAClosurecallsReferenceEvaluatorTest::testLoseTrackLeavesAnythingThatIsNotATrackedArrayAlonecallsReferenceEvaluatorTest::testLoseTrackMarksAnArrayHeldByAPropertyOfThisAsIncompletecallsReferenceEvaluatorTest::testLoseTrackMarksTheArrayANestedWriteGoesIntoAsIncompletecallsReferenceEvaluatorTest::testOriginOfIsTheOriginOfTheFirstGapUnlessAnyGapIsExternalInputcallsReferenceEvaluatorTest::testOriginOfReportsExternalInputWhenAnyTermCarriesItcallsReferenceEvaluatorTest::testReadArrayIsCalledWithTheExpressionItselfcallsReferenceEvaluatorTest::testReadArrayKeepsTheElementsWrittenAfterAnUnpackingcallsReferenceEvaluatorTest::testReadArrayKnowsALiteralWithoutUnpackingInFullcallsReferenceEvaluatorTest::testReadElementIsCalledWithTheExpressionItselfcallsReferenceEvaluatorTest::testReadEnumPropertyIgnoresAClassTheSourceDoesNotDeclarecallsReferenceEvaluatorTest::testReadEnumPropertyOnlyAnswersForAnEnumcallsReferenceEvaluatorTest::testReadEnumPropertyReadsTheCaseTheValueIscallsReferenceEvaluatorTest::testReadInstanceGivesUpOnAnExpressionClasscallsReferenceEvaluatorTest::testReadInstanceResolvesStaticToTheEnclosingClasscallsReferenceEvaluatorTest::testReadPropertyIsCalledWithTheExpressionItselfcallsReferenceEvaluatorTest::testReadPropertyPrefersWhatTheBodyAssignedEarliercallsReferenceEvaluatorTest::testReadPropertyQuotesAPropertyItCannotNamecallsReferenceEvaluatorTest::testReadPropertyQuotesAStaticPropertyWhoseClassItCannotNamecallsReferenceEvaluatorTest::testReadVariableGivesUpOnAVariableVariablecallsReferenceEvaluatorTest::testReadVariableNamesTheExternalInputItReadscallsReferenceEvaluatorTest::testReadVariablePreservesProvenanceAndDomainFlagsWhileNamingOpaqueValuescallsReferenceEvaluatorTest::testReadVariableResolvesThisToTheEnclosingClasscallsReferenceEvaluatorTest::testTrackedNameNamesAVariableOrAPropertyOfThiscallsBuilderQueriesTestcallsCallbackModelTestcallsCallModelTestcallsAnalyzerTestcallsJsonReporterTestcallsTextReporterTestcalls
Relations§
Instantiated in 2
Method calls 3
- method-call SqlCatalog\Core\Analysis\CallEvaluator::evaluateFunction() packages/sql-catalog/src/Core/Analysis/CallEvaluator.php:335
- method-call SqlCatalog\Core\Analysis\Derivation\FreeNames::variable() packages/sql-catalog/src/Core/Analysis/Derivation/FreeNames.php:211
- method-call SqlCatalog\Core\Analysis\ReferenceEvaluator::readVariable() packages/sql-catalog/src/Core/Analysis/ReferenceEvaluator.php:99
Type declarations 6
- type SqlCatalog\Core\Analysis\CallEvaluator packages/sql-catalog/src/Core/Analysis/CallEvaluator.php:45
- type SqlCatalog\Core\Analysis\CallEvaluator packages/sql-catalog/src/Core/Analysis/CallEvaluator.php:60
- type SqlCatalog\Core\Analysis\Derivation\FreeNames packages/sql-catalog/src/Core/Analysis/Derivation/FreeNames.php:39
- type SqlCatalog\Core\Analysis\Derivation\FreeNames packages/sql-catalog/src/Core/Analysis/Derivation/FreeNames.php:53
- type SqlCatalog\Core\Analysis\ReferenceEvaluator packages/sql-catalog/src/Core/Analysis/ReferenceEvaluator.php:29
- type SqlCatalog\Core\Analysis\ReferenceEvaluator packages/sql-catalog/src/Core/Analysis/ReferenceEvaluator.php:40