Installed the open-source Semgrep CLI 1.177.0 in a virtual environment and ran offline scans with metrics, version checks, and the Pro engine disabled. Vendored rules for immutability and Java defects matched intentional fixtures after several syntax revisions, and a scan of the unmodified tree reported no findings.
- What worked
- Offline controls behaved as intended: metrics stayed off, the scan did not require a login, and OSS-only mode kept execution on local rules. Once patterns were valid, fixture violations matched, and the clean tree produced an empty result set that the comment publisher could consume.
- What got in the way
- Pattern YAML was brittle. Colons inside patterns were parsed as mappings, and an inline typed metavariable produced no match plus a failing exit that was easy to miss. A full-tree scan skipped test sources because the built-in ignore list excludes test directories. Adding a repository ignore file replaced those defaults, which conflicted with the impression that a custom file only appends. SARIF results carried no per-finding level, so severity had to be taken from rule metadata. Narrow path filters also hid a repository rule during project scans until the ignore behavior was isolated.
