Tags: xsec-lab/pyre-check
Tags
Disallow accessing ambiguous abstract domain parts in a product domain Summary: Since D33037819 (facebook@5480bf6), we use `Features.BreadcrumbSet.t` at multiple locations in the taint representation. This means it is now ambiguous to use parts of `Features.BreadcrumbSet` (such as `.Self`, `.Element`) from the top level since it can refer to multiple sets (the local breadcrumbs or the propagated ones). To prevent future bugs, let's disallow using an abstract domain part if it is ambiguous. Note that this can only happen in the product domain, when computing the routing from parts to slots. Reviewed By: dkgi Differential Revision: D33488346 fbshipit-source-id: d418f5bb10fdee9648eeea3834c8ca56944bd2ce
Preserve `taint/` subdirectory structure when building `pyre-check` w… …heel Summary: Our open source builds have been broken for a long time, because the taint.config in the `taint` data folder shipped with our wheel has just been empty. It seems like the root cause was that all of our taint from various folders such as `taint/core_privacy_security`, `taint/common` was being copied into the wheel under `pyre_check/taint` rather than keeping the subdirectory structure, meaning that the empty taint.config under `common/` is being written to the `pyre_check/taint` folder in the wheel, overwriting the `core_privacy_security/taint.config` file at times, because files from both subfolders are being copied to the same destination location in the wheel. Since we need to release a new open source package due to recent GitHub issues asking about features we have long implemented (but have not pushed out), let's fix the script so we can make non-broken builds again. Reviewed By: 0xedward Differential Revision: D33247107 fbshipit-source-id: 67288937d4e640092c9b650af9f77184a08d5f27
Make parent file / directory tests robust to existing files Summary: I created files `/tmp/a` and `/tmp/b` when working on some ocaml tests yesterday, because I wanted to diff some json output. This broke my unit tests! It turns out that the existing `find_parent_directory_containing_*` logic is not possible to test robustly in the current form - it does a recursive search of all parents of a temp directory, but we have no control at all on the contents of directories outside of the ones we control. So, I tweaked code to - allow us to optionally truncate the search at some path - make two levels of directories in the tests - stop search after checking the outer level Reviewed By: grievejia Differential Revision: D31800614 fbshipit-source-id: 6e20e8074699f9ac13ea7e8ad3a0dc3b093d8877
Line-level coverage information match file-level statistics (1/3) Summary: ### Context We already surface file-level coverage information, this is collected by AnnotationCountCollector in statistics_collector. We are now interested in providing finer-grained coverage information that is line-level, this is collected by CoverageCollector in coverage_collector. The existing implementation of CoverageCollector was a placeholder one with a trivial implementation. This stack of diff is intended to bring the line-level coverage information match the file-level statistics that we collect. ### This diff As a first step towards it, collect information in CoverageCollector in a fashion similar to AnnotationCountCollector, but more granularly. So instead of counting, we are actually collecting the items that we were counting in AnnotationCountCollection. For testing, we verify that the lengths of the items we are collecting are the same as would have been with AnnotationCountCollector. ### Stack-to-be The diffs in the stack that will follow will do the following: 1. Change the `covered_lines` and `uncovered_lines` be based on globals, attributes, parameters, etc. 2. Refactor CoverageCollector and AnnotationCountCollector, so that we have base class AnnotationCollector and share more code. We intentionally do not do this first, so as not affect statistics jobs. Reviewed By: grievejia Differential Revision: D30622246 fbshipit-source-id: 05479efe0eb2867959cb7d39e6f6606127abe9c4
Clean up another c qualifier error Summary: Filenames are `const char *`, not `char *` and the `statfs` interface respects this; we should as well. Reviewed By: grievejia Differential Revision: D28464007 fbshipit-source-id: 10cbe9875d9f036a075a7b0ca09834170555a431
PreviousNext