Repository navigation
feat: correlation engine - #40
Merged
Merged
Conversation
2 tasks done
This file contains hidden or 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
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.Suggestion cannot be applied right now. Please check back later.
Summary
The correlation engine of
docs/architecture.md§27, the differentiator the document calls out: a vulnerable dependency, an affected API, a reachable call and attacker-controlled data reaching it become one high-confidence finding.test: define correlation engine behavior), implementation follows.TaintKind.ADVISORY: the affected APIs of every advisory whose package is required in a vulnerable version are registered as sinks of this kind, throughModelTable.extended, which merges kinds when a symbol is already a sink. The shared taint engine, the interprocedural summaries and the refutation engine then apply unchanged.dependency/correlation.py:affected_symbols,advisory_sinksandcorrelate, a pure function turning the non-refutedADVISORYflows of a function intoexploitable-vulnerabilityfindings (critical; high confidence, medium for hotspots) with the advisory, the package, the API, the source label, the verdict evidence and, across functions or files, the function the flow went through and the sink line.engine.analyze_projectextends the model table with the advisory sinks and correlates every analysed function after the module plugins ran. A lone file has no dependency context and no correlation.ADVISORYkind, so the generic detectors stay silent on them; an API that is also a regular sink keeps its own kinds.Example:
pyyaml==5.3.1required,parseinconfig.pycallingyaml.load, and a Flask route passingrequest.args["doc"]toparseyields a criticalexploitable-vulnerabilityat the route's call line, throughapp.config.parse.Closes #39