-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[taint] Fix taint policy
exclude_in
doc + add tests
Summary: Previously, the documentation said that `exclude_in` should be specified for each taint flow. In fact, when specified there it has no effect (and no warning is produced from config parsing). `exclude_in` property should be specified one level up for the whole taint policy. Reviewed By: geralt-encore Differential Revision: D50887109 fbshipit-source-id: ed3b3e4967325f17bf7f126b1401933ccaa0fb2a
- Loading branch information
1 parent
995d540
commit 6ad90ca
Showing
6 changed files
with
42 additions
and
10 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) Facebook, Inc. and its affiliates. | ||
// | ||
// This source code is licensed under the MIT license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
|
||
namespace Exclusions; | ||
|
||
class Source { | ||
public static function get(): int { | ||
return 42; | ||
} | ||
} | ||
|
||
class Sink { | ||
public static function consume(mixed $arg): void {} | ||
} | ||
|
||
class Flows { | ||
public static function excludedFlowOk(): void { | ||
Sink::consume(Source::get()); | ||
} | ||
} | ||
|