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

Support for filtering the slices #4

Closed
5 of 9 tasks
prabhu opened this issue May 30, 2023 · 3 comments
Closed
5 of 9 tasks

Support for filtering the slices #4

prabhu opened this issue May 30, 2023 · 3 comments
Assignees

Comments

@prabhu
Copy link
Contributor

prabhu commented May 30, 2023

We need a way of customizing the slicing operation to limit the data that gets written to the slices json.

Usages slices

  • Accept method filters to filter methods such as constructors, getters or setters method etc based on pattern
  • Accept parameter filters to filter based on parameter types
  • Accept annotation filters to filter methods based on annotations

DataFlow slices

  • Limit dataflows to only those that begin from an internal method
  • Limit dataflows to only those that end with an external method
  • Options to accept patterns for sources
  • Options to accept patterns for sinks

Common

  • Accept a yaml configuration to pass the parameters for the filtering operations
  • Add safeguards to prevent arbitrary remote code execution and exfiltration via queries
@DavidBakerEffendi
Copy link
Collaborator

I've ticked what this PR would address: joernio/joern#2928

Filtering on sources is a bit tricky, since the data-flow slicing is backward slicing, i.e. starts from a sink and goes backwards a set number of times. Depending on how far back it goes, it may never reach a source, so we can't always assume the last node in the backward slice is the source.

@prabhu
Copy link
Contributor Author

prabhu commented Jun 24, 2023

@DavidBakerEffendi, Could we consider forward slicing (beginning from a source) as a future enhancement? We might encounter applications with only a few sources so that performance gains could be possible.

@prabhu
Copy link
Contributor Author

prabhu commented Jul 13, 2023

This ticket could be considered as done since we have more than enough filters for v1.0.0 release.

@prabhu prabhu closed this as completed Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants