Skip to content

Add SARIF output format #1

@pikespeak

Description

@pikespeak

Goal

Add SARIF (Static Analysis Results Interchange Format) as an output format for ottersight scan.

Context

Currently the CLI outputs a terminal table and Markdown. SARIF is a standard format for static analysis results that integrates with GitHub Code Scanning, VS Code, and other tools.

Relevant files

  • packages/cli/src/renderers/ — existing renderers (terminal table, Markdown)
  • packages/scanner/src/types.ts — scan result types

Expected interface

ottersight scan . --format sarif

Outputs valid SARIF JSON to stdout. See SARIF spec.

Getting started

  1. Read CONTRIBUTING.md for setup instructions
  2. Look at the existing Markdown renderer for the pattern
  3. Create a new renderer in packages/cli/src/renderers/sarif.ts
  4. Add tests in packages/cli/src/__tests__/

Happy to answer questions in the comments!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions