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
ATM: Implement the current endpoint filters as EndpointCharacteristics #11281
Open
tiferet
wants to merge
13
commits into
main
Choose a base branch
from
tiferet/endpoint-filters
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+489
−50,291
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
...experimental/adaptivethreatmodeling/modelbuilding/extraction/ExtractEndpointDataTraining.qll
Fixed
Show fixed
Hide fixed
Also disambiguate three filters from three different sink types that all have the same name, "not a direct argument to a likely external library call or a heuristic sink".
...l/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/EndpointCharacteristics.qll
Fixed
Show fixed
Hide fixed
...l/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/EndpointCharacteristics.qll
Fixed
Show fixed
Hide fixed
...l/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/EndpointCharacteristics.qll
Fixed
Show fixed
Hide fixed
...l/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/EndpointCharacteristics.qll
Fixed
Show fixed
Hide fixed
…` to the base class. They can now be implemented generically for all sink types.
...ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/ATMConfig.qll
Fixed
Show fixed
Hide fixed
...ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/ATMConfig.qll
Fixed
Show fixed
Hide fixed
This is needed because we changed the names of three endpoint filters that were all called "not a direct argument to a likely external library call or a heuristic sink" in order to disambiguate them (fc56c5a).
…tFeatures` overrides it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Main changes
EndpointCharacteristics.isEffectiveSinkandgetAReasonSinkExcludedto the base class, as they can now be implemented generically for all sink types.getAReasonSinkExcludedis how we'd adjust which endpoints we score at inference time. For now I've implemented it to replicate the logic in the old code, so that results remain unaffected. I've tracked possible experiments to improve this selection in github/ml-ql-adaptive-threat-modeling#2126.A few notes
Note that this PR still sticks to the principle of not breaking any tests, except that I had to disambiguate three filters from three different sink types that all had the same name (fc56c5a), and that required a tiny update to
FilteredTruePositives.expected(0fd013f).Also note that the training data is unaffected because (for now) I've given all EndpointFilterCharacteristics medium confidence, whereas only high-confidence characteristics contribute to training set selection. AIUI, the reason endpoint filters weren't used to select negative training samples in the old code was precisely this: their accuracy is high enough that we don't want to waste inference time scoring these endpoints, but not high enough that we can reliably use them as negative training samples. It's worth having someone with the needed expertise (Stephan?😉 ) go through them eventually to consider whether any should be promoted to high confidence. I tracked this possible experiment in github/ml-ql-adaptive-threat-modeling#2126.
Timing checks
endpoint_large_scale/ExtractEndpointDataTrainingremains like it was after the last PR: About 5s.Closes github/ml-ql-adaptive-threat-modeling#2100
Possibly also
closesgithub/ml-ql-adaptive-threat-modeling#2101?