-
Notifications
You must be signed in to change notification settings - Fork 660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Taint analysis: allow marking properties as taint sources? #10896
Comments
Hey @Ocramius, can you reproduce the issue on https://psalm.dev? These will be used as phpunit tests when implementing the feature or fixing this bug. |
Seems like this is achievable via custom taint sources: psalm/docs/security_analysis/custom_taint_sources.md Lines 19 to 74 in 7d6c88e
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've snooped around taint analysis, which I found to be useful in very legacy projects that heavily on superglobals like
$_GET
,$_SESSION
, etc.In more recent / modern projects:
Id<T> -> object<T>
API (think Doctrine ORM), where record/entity objects hold user datapublic readonly
fieldsThe current taint analysis only operates with taint sources being function-alike nodes:
psalm/tests/TaintTest.php
Line 792 in 7d6c88e
psalm/src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeDocblockParser.php
Line 237 in 7d6c88e
I'm wondering if it makes sense to allow object properties to be marked as taint sources.
The text was updated successfully, but these errors were encountered: