bab29a83fa
Sweep all .go imports + go.mod, plus module-path refs in .golangci.yml, Dockerfile, swagger templates, locale example, and repo/wiki URLs (MokoGitea-Fork -> MokoGIT). Part of the MokoGIT rebrand. Claude-Session: https://claude.ai/code/session_01Bqe7fAuHQeiLueYfeHFrHw
36 lines
1.0 KiB
Go
36 lines
1.0 KiB
Go
// Copyright 2026 Moko Consulting <hello@mokoconsulting.tech>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
package security
|
|
|
|
import (
|
|
security_model "code.mokoconsulting.tech/MokoConsulting/MokoGIT/models/security"
|
|
"code.mokoconsulting.tech/MokoConsulting/MokoGIT/modules/git"
|
|
)
|
|
|
|
// Finding represents a single security issue found by a scanner.
|
|
type Finding struct {
|
|
Scanner security_model.ScannerType
|
|
Severity security_model.AlertSeverity
|
|
RuleID string
|
|
Title string
|
|
Description string
|
|
FilePath string
|
|
LineNumber int
|
|
CommitSHA string
|
|
Fingerprint string // unique identifier for dedup
|
|
Metadata string // JSON extra data
|
|
}
|
|
|
|
// Scanner is the interface all security scanner modules implement.
|
|
type Scanner interface {
|
|
// Type returns the scanner type identifier.
|
|
Type() security_model.ScannerType
|
|
|
|
// ScanCommit scans a single commit and returns findings.
|
|
ScanCommit(commit *git.Commit) ([]Finding, error)
|
|
|
|
// ScanTree scans the full repository tree and returns findings.
|
|
ScanTree(commit *git.Commit) ([]Finding, error)
|
|
}
|