reference Environment variables

HOME

Value
a directory
See also
opengrep lsp

The home directory of the user. XDG_CONFIG_HOME takes its place when it names an existing directory, and USERPROFILE does on Windows. The variable has no OPENGREP_ form.

The only data that Opengrep keeps under the home directory is the cache of opengrep lsp, in .semgrep/cache. Scans, tests and validation write nothing there.

Programs that Opengrep runs may read HOME themselves: git, when it clones a git+ configuration, reads its own configuration from there.

Examples

A scan writes nothing to the home directory

rule.yaml
rules:  - id: find-eval    pattern: eval(...)    message: found eval    languages: [python]    severity: WARNING
app.py
eval(1)
Command and result
$ mkdir home
$ HOME=$PWD/home opengrep scan --config rule.yaml app.py > /dev/null 2>&1
$ ls -A home | wc -l | tr -d ' '
0