-
Notifications
You must be signed in to change notification settings - Fork 18
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
Replacing OverflowDB with CPG in-memory Graph #226
Conversation
This is the start of the removal of OverflowDB. I will do this gradually and trying not to brake too many things at once. The first step is to move the Evaluator into a LegacyEvaluator and start with a new Evaluator class. This is slightly blocked with support for CPG 4.0 (see #184), because otherwise we cannot add new features to the CPG graph if we need them. Closes #218
69fac13
to
b26e501
Compare
The first test in |
The initial pass is done. @fwendland how should we proceed? Directly remove all the legacy files? I really do not want to keep them too long, they were primarily my reference in building the new evaluator. |
Builtin `_now()` returns the current time at execution as seconds since epoch -- 1970-01-01T00:00:00Z. Builtin `_year()` takes an integer argument, interprets it as seconds since epoch and returns the current year. `_now()` and `_year()` can be used in conjunction to create time dependent rules. For instance, one can write rules that are valid for a predetermined number of years. Afterwards, these rules are considered obsolete. To implement zero parameter builtins, `Builtin` was retrofitted with a flag to indicate whether it has parameters.
src/main/java/de/fraunhofer/aisec/analysis/markevaluation/OrderNFAEvaluator.java
Outdated
Show resolved
Hide resolved
src/main/java/de/fraunhofer/aisec/analysis/markevaluation/Evaluator.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Kudos, SonarCloud Quality Gate passed! |
Co-authored-by: Wendland, Florian <florian.wendland@aisec.fraunhofer.de>
This PR removes OverflowDB and Gremlin. This is slightly blocked with support for CPG 4.0 (see #184), because otherwise we cannot add new features to the CPG graph, should we need them. That is why this is currently based on a specific CPG commit (using JitPack) that already has the following PRs merged in:
definedBefore
inCallResolver
cpg#458Node::id
tovar
cpg#459HasInitializer
interface for fields and variable declarations cpg#460This PR deprecates the CLI Jython-based console, because it was unmaintained for a while and the
cpg-console
of thecpg
project might be a good replacement for it; or rather we could extend thecpg-console
, but I want to keep this as a separate PR.Closes #218
Blocked by: