-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Parse
.all_static_fields
in model files
Summary: # Context In some cases, users might want to know which specific field or attribute of the sink on an argument accessed. If the whole argument was marked as a sink, then there is no way to know whether a specific field was accessed. If a specific field is marked as a sink using `ParameterPath[_.foo]`, we provide that field in the taint output as `leaf:argument[foo]`. However, one would have to mark all fields with `ParameterPath[]` manually if they want to track all fields. Note that using `ParameterPath[_.all()]` does not solve that problem, the sink is on a special catch-all field `*`, hence the resulting taint will have `leaf:argument[*]`. # Solution In the following diffs, we will introduce a new access path `_.all_static_fields()` which adds sinks on all statically-known fields, inferred from the type annotation. Note that this solution will be quite computationally expensive since it will introduce a different sink for each field. This diff implements parsing the new access path. Reviewed By: tianhan0 Differential Revision: D47097963 fbshipit-source-id: 7710ec532e831a7cbaf1b76bb4ca0834d125aee6
- Loading branch information
1 parent
53627dd
commit 1d75dfa
Showing
5 changed files
with
186 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters