forked from joernio/joern
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Joern latest23 dec #163
Open
khemrajrathore
wants to merge
248
commits into
master
Choose a base branch
from
joernLatest23Dec
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
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.
Open
Joern latest23 dec #163
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
* [ruby] Added filter to remove file with empty contents on AstCreator side * [ruby] lowered log to info, changed expression * formatting
Symbols/identifiers used as based class where not taken into account for the implicit import creation.
* [ruby] Fix assignment parser test * [ruby] Move assigment parser test to correct subset
* [ruby] Fixed regex parser tests * [ruby] Fixed last parser tests * [ruby] Use pattern matching and string interpolation for building initMethod span * fmt * remove comment
Although the parser rule for picking up pseudo-variables seems fine, it may sometimes choose to represent it as a local variable. This fixes this and adds the related tests.
As Ruby may consider `<<` as either shifting left (if LHS is a number) or as an append (if LHS is an array), one cannot statically approximate the operation. We thus consider this as a call named `<<`.
The implicit require calls that are generated after the AST creation had an older/out-dated format and lead to identifiers not being linked via REF edges. Changed require to `require_relative`
* [ruby] Fixed incorrect class/module name, added NamespaceDeclaration node type for classes/modules defined straight in a namespace * [ruby] Added Namespace block to diffgraph, updated class test * [ruby] update module test * revert changes * [ruby] Added file as parent node of namespace block generated in class/module decl in namespace * [ruby] review changes * [ruby] Remove unused fucntions * [ruby] removed unused import
* [ruby] Constructor Lowering Fix * Fixed constructor lowering structure as per joernio#4822 * Tested and fixed issue in parenthesis-less `new` member calls (could use a better long-term fix in the parser) * Testing and handling an expression base of constructor * Fixed some imports * Using `code(node)`
* [python] Include Pipfile[.lock] * scalafmt
`self` parameters within the scope of methods reverts back to initial surrounding type information, and keeps `ANY` otherwise, e.g. `<main>` methods.
* Reverted implicit requires to use `require` instead of `require_relative` * Removed requirement for `ImplicitRequirePass` to need `programSummary` argument * Moved import processing to post-processing
Following the other frontends, migrates the non-deprecated post-processing passes to `x2cpg`
* [ruby] initial commit * [ruby] Added test for locals * [ruby] cleanup * [ruby] removed check for methodFullName on scope * [ruby] removed check for methodFullName on scope * [ruby] rename function
* [ruby] Changed methodFullName on callNode for Initialize to DynamicUnknown instead of Any * [ruby] test fixes * [ruby] fixed failing type recovery tests * remove println
Fixed an issue where classes defined in namespaces had different fullNames for the class and singleton instance defined in the namespace. Also resolved an issue where methods defined in class defined in a namespace was not being defined under the new `TypeDecl`
* Modified `raise` calls to be control structures of type `THROW` * If a literal argument is given, this is then explicitly represented as a `StandardError.new`
…xpression` (joernio#4860) * [ruby] Updated rescue expressions to use TRY/CATCH/ELSE/FINALLY controlStructureNodes * [ruby] fixed failing control structure test
* Handles various access modifiers private/public/protected * Also considers file-level methods are private and initialize methods cannot be anything other than private * Accounts for nested types where their modifiers are separate from surrounding type
* [ruby] Lowered ||= and &&= assignment operators to required if statements * [ruby] remove empty params in scaladocs
Some calls such as `select` may be commonly shadowed by auto-loaded calls, thus, on an example basis, we will continue to comment out similar calls.
* [ruby] Added operatorExpression to commandArgument * [ruby] removed operatorExpression, added only ternaryExpression to command
…ernio#5172) The implicit `require` call node creation is now deferred until the AST parent is presented.
* [c2cpg] Fixed logging via CCorePlugin This PR adds a stripped-down version of the original `org.eclipse.cdt.core.CCorePlugin` shadowing it and providing only the functionality to get it running without all the Eclipse OSGI context. Sadly, some parser internal components (e.g., the ambiguity resolving) log via this class. Without a proper OSGI instantiation (which we do not have/want in Joern) we are running into all kind of exceptions due to non-initialized entities (e.g., the said logging utils). Discovered during testing c2cpg on https://github.com/chromium/chromium where we have a lot of ambiguous nodes during parsing that can't be resolved and are logged causing the said exceptions. * [c2cpg] Fixed logging via CCorePlugin Adapted from joernio#5175 This PR adds a stripped-down version of the original `org.eclipse.cdt.core.CCorePlugin` and providing only the functionality to get it running without all the Eclipse OSGI context. To avoid classpath issues we removes the original class when we repulish the jar... Sadly, some parser internal components (e.g., the ambiguity resolving) log via this class. Without a proper OSGI instantiation (which we do not have/want in Joern) we are running into all kind of exceptions due to non-initialized entities (e.g., the said logging utils). Discovered during testing c2cpg on https://github.com/chromium/chromium where we have a lot of ambiguous nodes during parsing that can't be resolved and are logged causing the said exceptions. * upgrade eclipse cdt (release pending) * works now apparently --------- Co-authored-by: Max Leuthäuser <1417198+max-leuthaeuser@users.noreply.github.com>
* upgrade deps; scala 3.5.2 * latest repl-pp * scalaVersion in schemaExtender * latest latest repl
1) Storage of found files in now in an Array (constant append). A Set was never actually needed. 2) Filtering and skipping of files/folders happens now directly during the traversal instead of at the very end. 3) Proper scaladoc
* Multiple assignments may be given as arguments to calls and such, thus they are now handled under `astForExpression` as a block containing the multiple assignments * BackRef's from regexs are handled as `self.$&` * Lowered the warning level for non-method nodes as access modifier arguments
File.extension does some additional checks before returning the actual extension (isRegularFile and exists). We do not need these checks as the files we operate on are returned by a file visitor traversing said files. This shaves off plenty of time when traversing large directories.
To be consistent with latest cmake and CDT (eclipse-cdt/cdt#422).
…oernio#5187) * [c#] take into account global using directives * update typesInScope instead of findGlobalTypes
…5189) * Fixed a bug where singleton methods defined on types unresolvable in scope were assigned themselves as AST parents * Fixed a bug where bracket invocations on unresolvable types were interpreted as index accesses without an index
* [c#] support for top-level statements * Generated `Program` class uses the current filename to avoid potential name clashes * clean-up unused imports
This reverts commit 624a864.
This reverts commit dd53acd.
…oernio#4680)" This reverts commit 195f015.
…ouring (joernio#4680)"" This reverts commit 0fd92ea.
…)"" This reverts commit af53280.
fix - inheritsFrom in kotlin, when generics are used
add ast-gen in ruby
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.
No description provided.