reference Flags

--skin

Accepted by
opengrep scan, opengrep ci, opengrep validate
Value
legacy, simple or vivid
Default
simple
Environment
OPENGREP_SKIN
See also
--force-color, --max-chars-per-line, --max-lines-per-finding, --text, --no-progress-bar, COLUMNS

Selects the layout of the text output. The findings are the same with each skin; only their presentation differs.

ValueLayout
simpleThe default. For each file, its path, then for each finding the severity, the rule id, the message and the matched lines.
vividColored output, with horizontal rules across the width of the terminal.
legacyFindings in drawn boxes, under a heading with their number.

The skin also determines what Opengrep prints on standard error around the output, such as the numbers of files and rules before it and the number of findings after it, and whether a status line shows the progress of the scan (see --no-progress-bar). opengrep validate uses the skin for these lines only.

The width comes from the terminal, or from COLUMNS when the output is not a terminal. Color is used on a terminal unless NO_COLOR is set, and always with --force-color.

Examples

The same finding in each layout

rule.yaml
rules:  - id: find-eval    pattern: eval(...)    message: found eval    languages: [python]    severity: WARNING
app.py
eval(1)
Command and result
$ opengrep scan -q --config rule.yaml --skin simple app.py
app.py

  warn  find-eval
  found eval

     1: eval(1)
$ COLUMNS=40 opengrep scan -q --config rule.yaml --skin vivid app.py
app.py ─────────────────────────────────

  ▌  WARN       find-eval
  ▌ found eval
  ▌
  ▌   1   eval(1)
$ opengrep scan -q --config rule.yaml --skin legacy app.py
┌────────────────┐
│ 1 Code Finding │
└────────────────┘

    app.py
    ❯❱ find-eval
          found eval

            1┆ eval(1)