Skip to content

Commit

Permalink
[taint] Add Java test to demonstrate that checking for value history …
Browse files Browse the repository at this point in the history
…is necessary

Summary: Add Java test to demonstrate that checking for value history is necessary

Reviewed By: dulmarod

Differential Revision:
D50227082

Privacy Context Container: L1122176

fbshipit-source-id: 70ae5933c705586cb58b4d45279a3f9d32654207
  • Loading branch information
geralt-encore authored and facebook-github-bot committed Oct 13, 2023
1 parent 552113e commit ba6ac64
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions infer/tests/codetoanalyze/java/pulse/taint/Basics.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,4 +241,12 @@ Object inferUniversalSanitizer() {
void FP_returnedFromSanitizedTaintedToSinkOk() {
InferTaint.inferSensitiveSink(inferUniversalSanitizer());
}

void taintOnUnrelatedBoolOk(boolean notTaintedFlag) {
boolean taintedFlag = (boolean) InferTaint.inferSecretSource();
boolean uberFlag = notTaintedFlag || taintedFlag;
if (!uberFlag) {
InferTaint.inferSensitiveSink(notTaintedFlag);
}
}
}

0 comments on commit ba6ac64

Please sign in to comment.