New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dataflow: Add support for call context restrictions on sources/sinks. #6932
base: main
Are you sure you want to change the base?
Conversation
|
Is it correct to conclude that this PR makes it possible to chain together multiple configurations without losing call the context (i.e., by using |
Short answer: No. |
|
|
||
| /** A flow configuration feature for use in `Configuration::getAFeature()`. */ | ||
| class FlowFeature extends TFlowFeature { | ||
| abstract string toString(); |
| * Implies both of the above and additionally ensures that the entire flow | ||
| * path preserves the call context. | ||
| */ | ||
| FlowFeature getAFeature() { none() } |
I wonder if fieldFlowBranchLimit should also be made a feature (only trouble is, we would have to limit the possible values up-front).
| sc instanceof SummaryCtxNone or | ||
| cc instanceof CallContextNoCall |
| @@ -3613,7 +3663,8 @@ private predicate pathIntoCallable( | |||
| sc = TSummaryCtxSome(p, ap) | |||
| or | |||
| not exists(TSummaryCtxSome(p, ap)) and | |||
| sc = TSummaryCtxNone() | |||
| sc = TSummaryCtxNone() and | |||
| not config.getAFeature() instanceof FeatureEqualSourceSinkCallContext | |||
Would be nice with a comment about why this is only relevant for FeatureEqualSourceSinkCallContext.
This adds support for restricting the flow paths returned by the data flow library in 3 ways:
FeatureHasSourceCallContext:Assume that sources have some existing call context to disallow
conflicting return-flow directly following the source.
FeatureHasSinkCallContext:Assume that sinks have some existing call context to disallow
conflicting argument-to-parameter flow directly preceding the sink.
FeatureEqualSourceSinkCallContext:Implies both of the above and additionally ensures that the entire flow
path preserves the call context.
The text was updated successfully, but these errors were encountered: