<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Overview on Joern Documentation</title><link>https://docs.joern.io/</link><description>Recent content in Overview on Joern Documentation</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://docs.joern.io/index.xml" rel="self" type="application/rss+xml"/><item><title>X2CPG</title><link>https://docs.joern.io/frontends/x2cpg/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/frontends/x2cpg/</guid><description>Frontend Args # The frontend arguments for x2cpg is shared across all frontends for Joern. See the individual Frontend pages for frontend-specific args.
Arg Description Type Example input-dir Directory containing all source files to be used with Joern String &amp;quot;/some/path/to/folder&amp;quot; output Name of the file where output is written to String --output &amp;quot;output.txt&amp;quot; exclude File names to be excluded during CPG generation (path must be relative to input-dir or an absolute path).</description></item><item><title>Contributing to Joern</title><link>https://docs.joern.io/developer-guide/contribution-guidelines/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/developer-guide/contribution-guidelines/</guid><description>Thank you for taking time to contribute to Joern! Here are a few guidelines to ensure your pull request will get merged as soon as possible.
Creating a Pull Request # Try to make use of the templates as far as possible, however they may not suit all needs. The minimum we would like to see is:
A title that briefly describes the change and purpose of the PR, preferably with the affected module in square brackets, e.</description></item><item><title>Java</title><link>https://docs.joern.io/frontends/java/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/frontends/java/</guid><description>Frontend CLI Args # The following arguments are specific to the javasrc2cpg frontend.
Arg Description Type Example Hidden inference-jar-paths Paths to extra jars used only for type information List&amp;lt;String&amp;gt; --inference-jar-paths &amp;quot;/path/ex1.jar, /path/ex2.jar&amp;quot; false fetch-dependences Attempts to fetch dependencies jars for extra type information - --fetch-dependencies false delombok-java-home Optional override to set java home used to run Delombok. Recommended to use Java 17 for best results String --delombok-java-home /path/to/home false delombok-mode Specifies how Delombok should be executed no-delombok | default | types-only | run-delombok --delombok-mode no-delombok false enable-type-recovery Enable generic type recovery.</description></item><item><title>Installation</title><link>https://docs.joern.io/installation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/installation/</guid><description>Prerequisites # JDK 19 (get here for example: https://openjdk.java.net/install/ ); newer JDK versions might work, but have not been properly tested Installing Pre-Built Binaries # Pre-built binaries of the joern-cli are available at:
https://github.com/joernio/joern/releases/
To install the latest release, simply execute the following
mkdir joern &amp;amp;&amp;amp; cd joern # optional curl -L &amp;#34;https://github.com/joernio/joern/releases/latest/download/joern-install.sh&amp;#34; -o joern-install.sh chmod u+x joern-install.sh ./joern-install.sh --interactive and follow the installer instructions. By default, joern will be installed at ~/bin/joern.</description></item><item><title>JavaScript</title><link>https://docs.joern.io/frontends/javascript/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/frontends/javascript/</guid><description>Frontend Args # The following arguments are specific to the jssrc2cpg frontend.
Arg Description Type Example Hidden no-tsTypes Disable generation of types via TypeScript - --no-tsTypes true no-dummyTypes Disables the generation of dummy types during type propagation - --no-dummyTypes true type-prop-iterations Maximum iterations of type propagation Integer --type-prop-iterations 2 true Calls # The section below shows how different call ASTs are modelled in JavaScript.
class Foo { bar(param1, param2, param3) { // do something } baz(param1, param2, param3) { bar(&amp;#34;1&amp;#34;, 2, &amp;#34;3&amp;#34;) } } The structure of the call AST:</description></item><item><title>Learning Scala</title><link>https://docs.joern.io/developer-guide/learning-scala/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/developer-guide/learning-scala/</guid><description>Joern is built on Scala 3, and is not built with interoperability with other languages in mind. This means that you will need to learn Scala one way or another. A great resource is the Scala 3 Book.
The rest of this page outlines Scala best practices, and how we try to follow them in the development of Joern.
TLDR # Pay close attention to the following sections on collection classes and their performance characteristics:</description></item><item><title>Quickstart</title><link>https://docs.joern.io/quickstart/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/quickstart/</guid><description>Joern is a powerful command-line tool designed for static code analysis. It can assist you in detecting and fixing security vulnerabilities in programs with large amounts of code, even those that are difficult to identify with fuzzing. Joern also comes with an interactive shell and automation features based on Code Property Graphs.
This article provides an introduction to the fundamentals of using Joern. You will learn how to create and modify Code Property Graphs, query them, and use organizational commands.</description></item><item><title>Code Property Graph</title><link>https://docs.joern.io/code-property-graph/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/code-property-graph/</guid><description>The code property graph is a data structure designed to mine large codebases for instances of programming patterns. These patterns are formulated in a domain-specific language (DSL) based on Scala. It serves as a single intermediate program representation across all languages supported by Joern and its commercial brother Ocular.
Property graphs are a generic abstraction supported by many contemporary graph databases such as Neo4j, OrientDB, and JanusGraph. In fact, older versions of Joern made use of general purpose graph databases as a storage backend and the graph query language Gremlin.</description></item><item><title>Python</title><link>https://docs.joern.io/frontends/python/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/frontends/python/</guid><description>Frontend CLI Args # The following arguments are specific to the pysrc2cpg frontend.
Arg Description Type Example Hidden venvDir Virtual environment directory. If not absolute it is interpreted relative to input-dir String --venvDir &amp;quot;/some/path/venv/&amp;quot; true venvDirs Virtual environment directories. If not absolute it is interpreted relative to input-dir List&amp;lt;String&amp;gt; --venvDirs &amp;quot;/some/path/venv1/, /some/path/venv2&amp;quot; false ignoreVenvDir Specifies whether venv-dir is ignored. Default to true - --ignoreVenvDir false ignore-paths Ignores specified paths from analysis.</description></item><item><title>Setting Up Your IDE</title><link>https://docs.joern.io/developer-guide/ide-setup/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/developer-guide/ide-setup/</guid><description>IntelliJ IDEA # Download IntelliJ Community Install and run it Install the Scala Plugin - just search and install from within IntelliJ. Important: open sbt in your local joern repository, run compile and keep it open - this will allow us to use the BSP build in the next step Back to IntelliJ: open project: select your local joern clone: select to open as BSP Project (i.e. not sbt project!</description></item><item><title>Creating a Custom Static Analysis with Joern</title><link>https://docs.joern.io/developer-guide/custom-tool/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/developer-guide/custom-tool/</guid><description>So you want to develop tools with Joern? Let&amp;rsquo;s get started!
Simple Standalone Application Template # standalone-ext is the core template for developing Joern-based tooling. Here are some tasks you can perform using this template to suite your needs:
Update to latest Joern versions? Run ./updateDependencies.sh Extend the CPG schema for custom nodes/edges/properties? See CpgExtSchema Want to create a CLI tool? See Main Want to create a REPL? See ReplMain Want to add custom query steps?</description></item><item><title>Traversal Basics</title><link>https://docs.joern.io/traversal-basics/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/traversal-basics/</guid><description>Joern helps you discover security vulnerabilities by executing graph traversals on the Code Property Graph. A traversal is formulated as an Joern Query, or query for short. In this article, you will learn about the different components that make up queries.
The Anatomy of a Joern Query # A query consists of the following components:
A Root Object, which is the reference to the Code Property Graph being queried Zero or more Node-Type Steps, which are atomic traversals to all nodes of a given type Zero or more Filter Steps, Map Steps or Repeat Steps Zero or more Property Directives, which reference the properties of nodes in a traversal Zero or more Execution Directives, which execute a traversal and return results in a specific format Zero or more Augmentation Directives, which extend a Code Property Graph with new nodes, properties, or edges Finally, components 2-7 can be combined into Complex Steps in the same way basic expressions of a programming language can be combined into complex expressions.</description></item><item><title>Syntax-Tree Queries</title><link>https://docs.joern.io/c-syntaxtree/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/c-syntaxtree/</guid><description>In this article, we introduce readers to syntax-tree queries and show how they can be used as a computationally cheap approach for identifying code that handles attacker-controlled input or follows known bad practices. On the one hand, this article provides a practical introduction to mining code for patterns in its abstract syntax trees via a fluent query language. On the other hand, we discuss the limitations of syntax-tree queries at length.</description></item><item><title>Workspace</title><link>https://docs.joern.io/organizing-projects/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/organizing-projects/</guid><description>When working with Joern, a common set of commands is focused around organizing files generated during analyses. This walk-through provides a detailed description of these commands.
The Workspace # The Workspace is a directory on your file system in which all files generated during analyses are saved. Every Joern installation has exactly one Workspace and it provides access to it with the workspace command. Type workspace in your Joern Shell now and press ENTER to evaluate:</description></item><item><title>Interactive Shell</title><link>https://docs.joern.io/shell/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/shell/</guid><description>Joern provides an interactive shell for code analysis, much like an operating system shell. We base this shell on scala-repl-pp which is an extension of the stock Scala repl. In summary, the shell offers the following major features:
Tab-completion GNU readline support for line editing Pipe operators (#&amp;gt;, #&amp;gt;&amp;gt;, #| etc) Results browsing with a pager Add dependencies with maven coordinates Server mode Structured output rendering including product labels and type information Launching the Interactive Shell # The shell can be started by issuing the following command:</description></item><item><title>Interpreter</title><link>https://docs.joern.io/interpreter/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/interpreter/</guid><description>The Joern shell can be used as a script interpreter, that is, in non-interactive mode.
Basic Usage # Joern can be used in non-interactive mode. You would execute commands and operations via a script that you specify as an argument instead of manually typing them after the Joern prompt. Joern runs the commands in your script and exits when done.
For example, let&amp;rsquo;s say you have a file named test.sc with the following contents:</description></item><item><title>Exporting Graphs</title><link>https://docs.joern.io/export/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/export/</guid><description>Joern is used in academic research as a source for intermediate graph representations of code, particularly in machine learning and vulnerability discovery applications [e.g., 1,2,3,4,5]. To support this use-case, Joern provides both plotting capabilities in the interactive console as well as the joern-export command line utility.
In summary, Joern can create the following graph representations for C/C++ code:
Abstract Syntax Trees (AST) Control Flow Graphs (CFG) Control Dependence Graphs (CDG) Data Dependence Graphs (DDG) Program Dependence graphs (PDG) Code Property Graphs (CPG14) Entire graph, i.</description></item><item><title>Joern Scan</title><link>https://docs.joern.io/scan/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/scan/</guid><description>This article is a brief introduction to Joern Scan, a code scanner built on top of Joern. Joern Scan helps you detect security issues inside programs and can help guide your vulnerability discovery and variant analysis processes. Whether you&amp;rsquo;re looking for the usage of insecure functions like strcpy, instances of use-after-free, or are trying to find methods with a high number of conditionals for a closer inspection, this tool is for you.</description></item><item><title>CPG Slicing</title><link>https://docs.joern.io/cpg-slicing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/cpg-slicing/</guid><description>Note: Class path issues related to Circe are known to rear its head on Java versions later than 17.
joern-slice is the entrypoint for Joern&amp;rsquo;s CPG slicing mechanism and specifies ways to extract useful subsets of information from the CPG. Two modes are available:
Data-flow: This is a pretty standard backwards data-flow slicing command that starts at call arguments and slices backwards to create a graph of slices. Usages: This targets locals and parameters and traces what calls they make and in which calls they are used.</description></item><item><title>Server</title><link>https://docs.joern.io/server/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/server/</guid><description>The interpreter can also be accessed via an HTTP API. Its primary jobs are to (a) provide an interface to allow querying Code Property Graphs from non-JVM-based programming languages, and (b) enabling clients with limited computational resources to outsource CPG construction and querying to a server machine.
The server can be spawned as follows:
joern --server Or, with HTTP endpoints protected by basic authentication:
joern --server --server-auth-username username --server-auth-password password The hostname and port can also be specified:</description></item><item><title>Developing Plugins</title><link>https://docs.joern.io/extensions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/extensions/</guid><description>Joern can be enhanced via plugins. Plugins can&amp;hellip;
&amp;hellip; access the code property graph using the query language and create new nodes, edges and properties via the DiffGraph API. &amp;hellip; interface with arbitrary Java libraries to e.g., access the filesystem or network, or data analysis capabilities. &amp;hellip; add new node and edge types to the schema, or extend definitions of existing node and edge types In the simplest case, plugins add queries to Joern, as for example the query-database plugin does.</description></item><item><title>Common Issues</title><link>https://docs.joern.io/common-issues/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/common-issues/</guid><description>This article is a collection of issues which come up frequently.
Dataflows are not found # Dataflow queries which do not give a result are usually caused by a forgotten call to run.ossdataflow.
NOTE: As of Joern v1.1.299, it is no longer necessary to call run.ossdataflow explicitly. This is done as an automatic step during CPG creation.
No suitable CPG generator found for: &amp;lt;source_path&amp;gt; # There are 3 possible explanations for this error:</description></item><item><title>Glossary</title><link>https://docs.joern.io/glossary/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/glossary/</guid><description>Augmentation # An Augmentation is an operation by which a Code Property Graph is extended with nodes, properties and edges.
Augmentation Directive # CPGQL Augmentation Directives are Directives which extend a Code Property Graph with nodes, properties and edges.
Call Site # Location in a Program Structure where a function or subroutine is called.
Code Property Graph # Data structure designed for vulnerability discovery. A directed, edge-labeled, attributed multigraph, or property graph for short.</description></item><item><title>Custom Data-Flow Semantics</title><link>https://docs.joern.io/dataflow-semantics/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/dataflow-semantics/</guid><description>Motivation # In order to precisely model a program&amp;rsquo;s behaviour we would require a whole-program analysis. This premise is largely sound, but to compute the whole execution environment includes modelling third-party dependencies and native operations directly on the operating system.
This is expensive and non-trivial in practice, and Joern contains mechanisms to perform program analysis well. One such solution is being able to define semantics for methods where their definitions are not modelled in the analysis.</description></item><item><title>Upgrade Guide</title><link>https://docs.joern.io/upgrade-guides/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/upgrade-guides/</guid><description>1.1.1: OverflowDb Traversals # This release introduces a major rearchitecture of the cpg query language (CPGQL). Most changes happened under the hood, however there are a few changes that are user facing. The migration should be straightforward, and in any case we&amp;rsquo;re here to help.
Background: CPGQL was previously based on the Gremlin graph traversal language (accessible via .raw), and is now based on OverflowDb Traversal. The main drivers behind this change are: better performance, less complexity and fewer dependencies.</description></item><item><title>Augmentation Directives</title><link>https://docs.joern.io/cpgql/augmentation-directives/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/cpgql/augmentation-directives/</guid><description>Augmentation Directives are CPGQL Directives which extend a Code Property Graph with nodes, properties and edges.
Take the following simple program named X42:
#include &amp;lt;stdio.h&amp;gt; #include &amp;lt;stdlib.h&amp;gt; #include &amp;lt;string.h&amp;gt; int main(int argc, char *argv[]) { if (argc &amp;gt; 1 &amp;amp;&amp;amp; strcmp(argv[1], &amp;#34;42&amp;#34;) == 0) { fprintf(stderr, &amp;#34;It depends!\n&amp;#34;); exit(42); } printf(&amp;#34;What is the meaning of life?\n&amp;#34;); exit(0); } newTagNode # newTagNode is an Augmentation Directive that adds tags with user-defined keys to the nodes that are part of the traversal they&amp;rsquo;re suffixing.</description></item><item><title>Calls</title><link>https://docs.joern.io/cpgql/calls/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/cpgql/calls/</guid><description>This is a collection of traversal steps that are associated with call-sites in a graph and the relationships with methods. These allow us to identify and list all the call-sites, their incoming and outgoing edges, methods linked to those call sites, methods that call those call-sites etc. The call traversals can be combined with other steps such as filters to pinpoint specific cases during analysis. For example, it is possible to quickly identify how many times a given method has been called or if it is called recursively.</description></item><item><title>Complex Steps</title><link>https://docs.joern.io/cpgql/complex-steps/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/cpgql/complex-steps/</guid><description>Complex Steps are CPGQL Steps which combine the functionality of one or more Node-Type Steps, Repeat Steps, Filter Steps, Core Steps or Execution Directives. They are represented by one or more Directives and can be of three types: Generic Complex Steps, Call Graph Steps or Dataflow Complex Steps.
Generic Complex Steps # dump # dump is a Complex Step which executes the traversal and returns the value of the CODE property of the nodes it suffixes with syntax-highlighting.</description></item><item><title>Control-Flow Steps</title><link>https://docs.joern.io/cpgql/control-flow-steps/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/cpgql/control-flow-steps/</guid><description>Control-Flow Steps are Complex Steps that represent control-flow graph traversals.
We will look at each one using our sample program X42:
#include &amp;lt;stdio.h&amp;gt; #include &amp;lt;stdlib.h&amp;gt; #include &amp;lt;string.h&amp;gt; int main(int argc, char *argv[]) { if (argc &amp;gt; 1 &amp;amp;&amp;amp; strcmp(argv[1], &amp;#34;42&amp;#34;) == 0) { fprintf(stderr, &amp;#34;It depends!\n&amp;#34;); exit(42); } printf(&amp;#34;What is the meaning of life?\n&amp;#34;); exit(0); } controls # controls is a Control-Flow Step that determines all nodes which the preceding node controls.</description></item><item><title>Core Steps</title><link>https://docs.joern.io/cpgql/core-steps/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/cpgql/core-steps/</guid><description>Core Steps are CPGQL Steps which can be combined with any other Step. Joern offers four Core Steps, map, sideEffect, dedup and clone.
We will look at each one while analyzing a simple program named X42:
#include &amp;lt;stdio.h&amp;gt; #include &amp;lt;stdlib.h&amp;gt; #include &amp;lt;string.h&amp;gt; int main(int argc, char *argv[]) { if (argc &amp;gt; 1 &amp;amp;&amp;amp; strcmp(argv[1], &amp;#34;42&amp;#34;) == 0) { fprintf(stderr, &amp;#34;It depends!\n&amp;#34;); exit(42); } printf(&amp;#34;What is the meaning of life?\n&amp;#34;); exit(0); } map # The map Core Step is a Step which transforms objects in a traversal with an expression.</description></item><item><title>Custom Defined Steps</title><link>https://docs.joern.io/cpgql/custom-defined-steps/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/cpgql/custom-defined-steps/</guid><description>You can define your own custom steps and seamlessly make them of the CPG query language, using Scala&amp;rsquo;s enrich my library pattern. E.g. let&amp;rsquo;s say you want to define a step publicExampleOrg on method:
implicit class MyMethodTraversals(method: Traversal[Method]) { def publicExampleOrg = method.fullName(&amp;#34;.*org.example.*&amp;#34;).isPublic } To try it out, you can just paste this into the Joern REPL. Usage: cpg.method.publicExampleOrg
Note: tab completion works, i.e. if you type cpg.method.pu&amp;lt;TAB&amp;gt; it will auto-complete.</description></item><item><title>Data-Flow Steps</title><link>https://docs.joern.io/cpgql/data-flow-steps/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/cpgql/data-flow-steps/</guid><description>Data-Flow Steps are Complex Steps that represent flows of data.
We will look at each one using our sample program X42:
#include &amp;lt;stdio.h&amp;gt; #include &amp;lt;stdlib.h&amp;gt; #include &amp;lt;string.h&amp;gt; int main(int argc, char *argv[]) { if (argc &amp;gt; 1 &amp;amp;&amp;amp; strcmp(argv[1], &amp;#34;42&amp;#34;) == 0) { fprintf(stderr, &amp;#34;It depends!\n&amp;#34;); exit(42); } printf(&amp;#34;What is the meaning of life?\n&amp;#34;); exit(0); } reachableBy # reachableBy is a Data-Flow Step that returns sources for flows of data from sinks to sources.</description></item><item><title>Execution Directives</title><link>https://docs.joern.io/cpgql/execution-directives/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/cpgql/execution-directives/</guid><description>Execution Directives are CPGQL Directives which execute the traversals they suffix and return the result in a specific format. The most straightforward Execution Directive is toList which, as the name suggests, executes the CPGQL Query it suffixes and returns the results in a list:
toList # joern&amp;gt; cpg.call.name.toList res0: List[String] = List( &amp;#34;exit&amp;#34;, &amp;#34;printf&amp;#34;, &amp;#34;exit&amp;#34;, &amp;#34;fprintf&amp;#34;, &amp;#34;&amp;lt;operator&amp;gt;.indirectIndexAccess&amp;#34;, &amp;#34;strcmp&amp;#34;, &amp;#34;&amp;lt;operator&amp;gt;.equals&amp;#34;, &amp;#34;&amp;lt;operator&amp;gt;.greaterThan&amp;#34;, &amp;#34;&amp;lt;operator&amp;gt;.logicalAnd&amp;#34; ) l # toList has a shorthand named l:</description></item><item><title>Filter Steps</title><link>https://docs.joern.io/cpgql/filter-steps/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/cpgql/filter-steps/</guid><description>Filter Steps are CPGQL Steps which filter nodes in a traversal according to a criterion. Joern supports four Generic Filter Steps which can be added to any other step, and number of specific filter steps called Property Filter Steps which can be used on nodes of a certain type. The Generic Filter Steps are filter, filterNot, where and whereNot. The Property Filter Steps for each node type correspond to the Property Directives it has defined.</description></item><item><title>Help Directive</title><link>https://docs.joern.io/cpgql/help-directive/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/cpgql/help-directive/</guid><description>The Help Directive is a CPGQL Directive which returns textual descriptions of other directives.
If it is executed by itself, it shows an overview of Top-Level Commands:
joern&amp;gt; help val res0: Helper = Welcome to the interactive help system. Below you find a table of all available top-level commands. To get more detailed help on a specific command, just type `help.&amp;lt;command&amp;gt;`. Try `help.importCode` to begin with. ┌────────────────┬────────────────────────────────────────────────┬─────────────────────────┐ │command │description │example │ ├────────────────┼────────────────────────────────────────────────┼─────────────────────────┤ │close │Close project by name │close(projectName) │ │cpg │CPG of the active project │cpg.</description></item><item><title>Node-Type Steps</title><link>https://docs.joern.io/cpgql/node-type-steps/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/cpgql/node-type-steps/</guid><description>Node-Type Steps are CPGQL Steps that traverse nodes based on their type.
Overview # Step Description all Visits all nodes in the Code Property Graph block Visits BLOCK nodes call Visits CALL nodes, represent call-sites comment Visits COMMENT nodes, COMMENT nodes exist only for source-based Code Property Graphs file Visits FILE nodes, in source-based Code Property Graphs, FILE nodes will point both to the actual source code files of the program under analysis and paths to the referenced files from the standard library, for IR-based Code Property Graphs, the nodes representing source code files will not exist identifier Visits IDENTIFIER nodes; e.</description></item><item><title>Reference Card</title><link>https://docs.joern.io/cpgql/reference-card/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/cpgql/reference-card/</guid><description>Node-Type Steps # Step Description all All nodes argument All arguments (actual parameters) assignment All assignments call All call sites comment All comments (only source-based CPGs) controlStructure All control structures (also break, continue, ifBlock etc. for specific structures) file All source files identifier All identifiers, e.g. occurrences of local variables or class members in method bodies literal All literals, e.g. numbers or strings local All local variables member All members of complex types, e.</description></item><item><title>Repeat Steps</title><link>https://docs.joern.io/cpgql/repeat-steps/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.joern.io/cpgql/repeat-steps/</guid><description>Repeat Steps are CPGQL Steps which repeat another traversal multiple times.
repeat..maxDepth # joern&amp;gt; cpg.method.name(&amp;#34;main&amp;#34;).repeat(_.astChildren)(_.maxDepth(4)).l res0: List[AstNode] = List( Call( id -&amp;gt; 13L, code -&amp;gt; &amp;#34;argc &amp;gt; 1&amp;#34;, name -&amp;gt; &amp;#34;&amp;lt;operator&amp;gt;.greaterThan&amp;#34;, // ...output trimmed for brevity ), Call( id -&amp;gt; 16L, code -&amp;gt; &amp;#34;strcmp(argv[1], \&amp;#34;42\&amp;#34;) == 0&amp;#34;, name -&amp;gt; &amp;#34;&amp;lt;operator&amp;gt;.equals&amp;#34;, // ...output trimmed for brevity ), Call( id -&amp;gt; 24L, code -&amp;gt; &amp;#34;fprintf(stderr, \&amp;#34;It depends!\\n\&amp;#34;)&amp;#34;, name -&amp;gt; &amp;#34;fprintf&amp;#34;, // ...output trimmed for brevity ), Call( id -&amp;gt; 27L, code -&amp;gt; &amp;#34;exit(42)&amp;#34;, name -&amp;gt; &amp;#34;exit&amp;#34;, // .</description></item></channel></rss>