-
Notifications
You must be signed in to change notification settings - Fork 53
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
[RFR] Tainting #54
[RFR] Tainting #54
Conversation
@seferov i can not manage to reproduce the issue of the |
@adrienlucas thank you for the PR! |
7784aad
to
96ef9b7
Compare
hey @seferov this is now ready to be reviewed and merged :) i got to refactor the the |
@adrienlucas thanks for the update. The reason for the failure is that InputBag is introduced in Symfony 5.1.0 /~https://github.com/symfony/http-foundation/blob/master/CHANGELOG.md#510. Thus InputBag stubs doesn't have any affect for lower versions. |
Thank you @seferov ! I can swear I had tested it with So I introduced a "dependency check" step and now it's "ok" everywhere ! |
b45c08a
to
64a1ae9
Compare
Adding taint sources :
Symfony\Component\HttpFoundation\InputBag::get
andSymfony\Component\HttpFoundation\InputBag::all
(reachable viaSymfony\Component\HttpFoundation\Request::$request
,Symfony\Component\HttpFoundation\Request::$query
, andSymfony\Component\HttpFoundation\Request::$cookies
)Symfony\Component\HttpFoundation\HeaderBag::__toString
andSymfony\Component\HttpFoundation\HeaderBag::get
(reachable via bySymfony\Component\HttpFoundation\Request::$headers
) but only when the argument isuser-agent
in the second case.Symfony\Component\HttpFoundation\HeaderBag::__toString
(reachable via bySymfony\Component\HttpFoundation\Request::$headers
).Open questions (i will try to answer them myself, but if someone want to give advices) :
should we add a taint source for doctrine inserts/updates ? what about selects ?(see Add taint sinks on the DBAL Connection psalm-plugin-doctrine#61)should we try to add twig render as taint source ? if so, i'm not sure to know how to taint it..(see [RFR] Tainting twig #61)are there other component to consider ? filesystem, process maybe..to be continuedwe should try to also havenot a source, but maybe have the stub generator automatically add aParameterBag::filter
as source, but i'm not sure of how to proceed (only with an annotation or with an handler)..flow
ortaint
annotation to it (and all other similar cases)