Skip to content
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

[dataflowengineoss] composable semantics #4974

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xavierpinho
Copy link
Contributor

  • Allows one to compose arbitrary Semantics at runtime, cf. the newly introduced Semantics.after, with NoSemantics as the identity.
  • Identifies NilSemantics, which under the current engine seems to work as "negative semantics", removing any potential flows that would otherwise be created. I can't say I have it fully covered yet, but fwiw that's my interpretation at the moment.
  • Introduces NoCrossTaintSemantics, which can be built both extensionally/intensionally, allowing one to, for instance, specify that an entire external library should have this kind of semantics.

pysrc2cpg was the frontend I used for testing them, but only because that's the frontend I was playing with. There's no other reason for not testing with other frontends.

@xavierpinho xavierpinho added the dataflow engine Relates to dataflowengineoss label Sep 27, 2024
Copy link
Collaborator

@DavidBakerEffendi DavidBakerEffendi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identifies NilSemantics, which under the current engine seems to work as "negative semantics", removing any potential flows that would otherwise be created. I can't say I have it fully covered yet, but fwiw that's my interpretation at the moment.

The current engine assumes that, if a semantic flow entry is present, any combination of arg flows not explicitly stated is "killed". So I believe this is the correct interpretation, and a good distinction against NoSemantics. If semantics/CALL edges are not present, then all flows are assumed present for that call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dataflow engine Relates to dataflowengineoss
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants