reference Environment variables

OPENGREP_SKIN

Value
legacy, simple or vivid
Equivalent to
--skin

The layout of the text output, as set by --skin, for every opengrep scan, opengrep ci and opengrep validate that does not pass the flag. The flag takes precedence, with a warning that the variable is ignored. An empty value is treated as unset; any value other than the names of the skins stops the command with exit status 2.

The variable has no SEMGREP_ form.

Examples

The layout from the environment

rule.yaml
rules:  - id: find-eval    pattern: eval(...)    message: found eval    languages: [python]    severity: WARNING
app.py
eval(1)
Command and result
$ OPENGREP_SKIN=legacy opengrep scan -q --config rule.yaml app.py
┌────────────────┐
│ 1 Code Finding │
└────────────────┘

    app.py
    ❯❱ find-eval
          found eval

            1┆ eval(1)
$ OPENGREP_SKIN=legacy opengrep scan --config rule.yaml --skin simple app.py 2>&1 | grep WARNING
[00.00][WARNING]: --skin is given; ignoring $OPENGREP_SKIN
$ OPENGREP_SKIN=fancy opengrep scan --config rule.yaml app.py 2>&1 | grep -A1 'invalid value'
opengrep scan: environment variable OPENGREP_SKIN: invalid value "fancy",
               expected one of 'legacy', 'simple' or 'vivid'
$ OPENGREP_SKIN=fancy opengrep scan --config rule.yaml app.py > /dev/null 2>&1; echo "exit status: $?"
exit status: 2