Skip to content

Commit 9be950c

Browse files
committed
Add more documentation to allowImplicitRead in SensitiveExposureHeuristicSource.ql
1 parent 0291022 commit 9be950c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

javascript/frameworks/cap/src/sensitive-exposure/SensitiveExposureHeuristicSource.ql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ module SensitiveLogExposureConfig implements DataFlow::ConfigSig {
2727

2828
predicate isBarrier(DataFlow::Node sink) { sink instanceof CleartextLogging::Barrier }
2929

30+
/**
31+
* This predicate is an intentional cartesian product of any sink node and any content that represents a property.
32+
* Normally Cartesian products are bad but in this case it is what we want, to capture all properties of objects that make their way to sinks.
33+
*/
3034
predicate allowImplicitRead(DataFlow::Node node, DataFlow::ContentSet contents) {
3135
// Assume all properties of a logged object are themselves logged.
3236
contents = DataFlow::ContentSet::anyProperty() and

0 commit comments

Comments
 (0)