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

ATM: Implement the current endpoint filters as EndpointCharacteristics #11281

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

tiferet
Copy link
Contributor

@tiferet tiferet commented Nov 16, 2022

📢 This PR is a bit bigger, so commit-by-commit review might be easier. I've tried to make the commit comments as informative as possible.

Main changes

  • Implement both the standard and the type-specific endpoint filters as EndpointCharacteristics.
  • Move the definitions of isEffectiveSink and getAReasonSinkExcluded to the base class, as they can now be implemented generically for all sink types.
  • Changing the definition of getAReasonSinkExcluded is 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

  • KPI timing experiment: github/codeql-dca-main#8634
  • ☑️ The local runtime of endpoint_large_scale/ExtractEndpointDataTraining remains like it was after the last PR: About 5s.

Closes github/ml-ql-adaptive-threat-modeling#2100

Possibly also closes github/ml-ql-adaptive-threat-modeling#2101?

@github-actions github-actions bot added the ATM label Nov 16, 2022
@owen-mc owen-mc changed the title Implement the current endpoint filters as EndpointCharacteristics ATM: Implement the current endpoint filters as EndpointCharacteristics Nov 16, 2022
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".
…` to the base class.

They can now be implemented generically for all sink types.
tiferet added 5 commits Nov 16, 2022
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).
@tiferet tiferet marked this pull request as ready for review Nov 16, 2022
@tiferet tiferet requested a review from a team as a code owner Nov 16, 2022
@tiferet tiferet requested review from kaeluka and removed request for a team Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant