github

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package github provides an output formatter that emits GitHub Actions workflow commands (::error / ::warning / ::notice) so Leakwatch findings show up as inline annotations on pull requests and in the workflow run log.

The format is meant to be written to the Actions runner's stdout: workflow commands are only interpreted on the live command stream, so writing them to a file has no effect. For safety, this formatter NEVER emits the raw secret value — annotations render in the (often public) PR UI and run logs, so only the redacted value is shown regardless of any --show-raw setting.

Reference: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Formatter

type Formatter struct{}

Formatter emits findings as GitHub Actions workflow commands.

func (*Formatter) FileExtension

func (f *Formatter) FileExtension() string

FileExtension returns the file extension for this format. Workflow commands are intended for stdout, not a file; ".txt" is returned to satisfy the Formatter contract.

func (*Formatter) Format

func (f *Formatter) Format(w io.Writer, findings []finding.Finding) error

Format writes one workflow command per finding to w. A finding with a known file path is anchored to that file and line so GitHub renders it inline on the "Files changed" view; a finding without a file path becomes a run-level annotation (no file/line properties).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL