Repository navigation
feat: refutation evidence - #45
Merged
Merged
Conversation
6 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 three points left open on #32, the proof engine of
docs/architecture.md§24, plus the plugin extension point for evidence.test: define numeric, validator and authorization evidence), implementation follows.abstract/ranges.py: an interval domain over the SSA form. A value gets an interval when it is proven numeric (numeric constants, arithmetic on numbers,int(),len(),abs()and friends); comparisons refine both sides on the branch they take, chained comparisons andand/orincluded; loops converge by widening. Intervals are per block, so the refutation engine reads them at the sink.numeric value within [0, 60]). That dependence-cut check now applies to every proof, sox + str(int(x))stays a vulnerability.Validatormodel: a callable whose truth proves its declared argument, resolved through the call graph symbols sore.fullmatch(p, x)andre.compile(p).fullmatch(x)both work. Shipped for the standard library.AuthorizationGuardmodel: a decorator or a dominating condition that restricts who reaches the sink. A flow behind one is a hotspot with the evidencebehind authorization (login) by decoratororat line N; a refutation still wins. Shipped forflask_loginand Django's auth decorators, so alogin_requiredroute with an injection is reported at medium confidence.RefutationPlugintype of the roadmap is realised as these two models: any plugin contributes evidence throughPlugin.models, the same way it contributes sources and sinks, and the engine stays the only code that reads the IR.Closes #32