Core Steps are CPGQL Steps which can be combined with any other Step.
Joern offers four Core Steps,
We will look at each one while analyzing a simple program named
map Core Step is a Step which transforms objects in a traversal with an expression. Its expression takes one argument, a variable representing the item the
map Core Step is suffixing, and can return any other type.
For example, say that you'd like to return the value of the CODE property, together with the value of the TYPE_FULL_NAME property of all LITERAL nodes in
X42's Code Property Graph:
sideEffect is a step that executes a function on each node of the traversal it suffixes, without modifying
the original traversal.
dedup is a step that removes duplicates from the traversal it suffixes.
For example, say you'd like to query
X42's Code Property Graph for the AST parent nodes of all CALL nodes, and print out their CODE property:
Because of the structure of the resulting AST, the query returns a duplicate result. To remove it, add
dedup to the query: