Documentation
¶
Overview ¶
internal/reporting/reporter.go
internal/reporting/sarif_reporter.go
Index ¶
Constants ¶
View Source
const ( ToolName = "Scalpel CLI" ToolInfoURI = "https://github.com/xkilldash9x/scalpel-cli" SARIFVersion = "2.1.0" SARIFSchema = "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json" )
Constants for tool identification in the SARIF report.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NopWriteCloser ¶
NopWriteCloser wraps an io.Writer like os.Stdout and provides a no-op Close method. This prevents closing standard streams when the reporter attempts to close its writer.
func (*NopWriteCloser) Close ¶
func (nwc *NopWriteCloser) Close() error
Close is a no-op for standard streams.
type Reporter ¶
type Reporter interface {
// Write processes a single result envelope.
Write(result *schemas.ResultEnvelope) error
// Close finalizes the report and closes any underlying resources (e.g., file handles).
Close() error
}
Reporter defines the interface for writing scan results to an output. Implementations must be thread-safe.
type RuleFingerprint ¶
type RuleFingerprint string
type SARIFReporter ¶
type SARIFReporter struct {
// contains filtered or unexported fields
}
func NewSARIFReporter ¶
func NewSARIFReporter(writer io.WriteCloser, toolVersion string) *SARIFReporter
func (*SARIFReporter) Close ¶
func (r *SARIFReporter) Close() error
func (*SARIFReporter) Write ¶
func (r *SARIFReporter) Write(result *schemas.ResultEnvelope) error
Click to show internal directories.
Click to hide internal directories.