Skip to content

Commit 6a63f97

Browse files
Join mode requires login (#1951)
This was moved behind login with the OSS/CE change, but that didn't get picked up into this article.
1 parent e0fe567 commit 6a63f97

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/writing-rules/experiments/join-mode/overview.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ description: "Join mode runs several Semgrep rules at once and only returns resu
66

77
# Join mode overview
88

9-
Join mode runs several Semgrep rules at once and only returns results if certain conditions on the results are met. Semgrep Community Edition (CE) is good for finding code patterns with an easy syntax, but its search is typically limited to single files. Join mode is an experimental mode that lets you cross file boundaries, allowing you to write rules for whole code bases instead of individual files. As the name implies, this was inspired by join clauses in SQL queries.
9+
Join mode runs several Semgrep rules at once and only returns results if certain conditions on the results are met. Join mode is an experimental mode that lets you cross file boundaries, allowing you to write rules for whole code bases instead of individual files. As the name implies, this was inspired by join clauses in SQL queries.
1010

1111
Think of join mode like this: distinct Semgrep rules are used to gather information about a code base. Then, the conditions you define are used to select specific results from these rules, and the selected results are reported by Semgrep. You can join results on metavariable contents or on the result's file path.
1212

1313
:::info
14-
You can also use cross-file (interfile) analysis. For more information, see [<i class="fa-regular fa-file-lines"></i> Perform cross-file analysis](/semgrep-code/semgrep-pro-engine-intro).
14+
You can also use cross-file (interfile) analysis. For more information, see [<i class="fa-regular fa-file-lines"></i> Perform cross-file analysis](/semgrep-code/semgrep-pro-engine-intro). Cross-file analysis is preferred over join mode where either of the two are feasible. Neither is currently available in Semgrep CE.
1515
:::
1616

1717
## Example
@@ -243,7 +243,7 @@ Join mode **is not taint mode**! While it can look on the surface like join mode
243243

244244
To use join mode with `refs`, you must define your individual Semgrep rules in independent locations. This can be anything that works with `semgrep --config <here>`, such as a file, a URL, or a Semgrep registry pointer like `r/java.lang.security.some.rule.id`.
245245

246-
Join mode does not work in the Semgrep Playground or Semgrep Editor, as it is an experimental feature.
246+
Join mode requires login, and does not work in the Semgrep Playground or Semgrep Editor, as it is an experimental feature.
247247

248248
Currently, join mode only reports the code location of the **last finding that matches the conditions**. Join mode parses the conditions from top-to-bottom, left-to-right. This means that findings from the "bottom-right" condition become the reported code location.
249249

0 commit comments

Comments
 (0)