Completes tasks 10-15 and fixes what was outstanding: - vulndb.Pull implemented with oras-go, streaming the ~50MB layer and staging both files before replacing either, so a failed pull leaves the previous database intact rather than a half-written one. - db.go: Vulnerability.Severity is a string, not trivy Severity, so the int conversion did not compile. Severity now resolves vendor (highest when vendors disagree) then NVD then unknown, and CVSS is read too. - findings.go: added sweepFixedFindings plus the fleet query, severity counts, rescan flag and accept/unaccept the API needs. - vulnrules.go: added rule CRUD and the digest builder. ResolveTargets returns []models.Server, not []string, so filterByServers was wrong. - api/vulnerabilities.go was an empty file while handlers.go registered twelve routes against it; written, grouped by CVE. - shared/mail: added the missing sender. The templates were orphaned and the HTML one was a copy of the text one, defining "subject" (which html/template would escape) and emitting no markup. render.go parses every template in init(), so a bad one panics server, admin and sitesvc at boot — go build never runs init(), which is why nothing complained. - notify: digests dispatch through their own path so SMTP gets the digest template rather than arriving dressed as a monitor alert.
72 lines
3.0 KiB
AMPL
72 lines
3.0 KiB
AMPL
module gitea.hostxtra.co.uk/mrhid6/vantage/server
|
|
|
|
go 1.26
|
|
|
|
require (
|
|
github.com/coreos/go-oidc/v3 v3.18.0
|
|
github.com/gin-gonic/gin v1.10.0
|
|
github.com/google/uuid v1.6.0
|
|
github.com/redis/go-redis/v9 v9.20.1
|
|
github.com/wwt/guac v1.3.2
|
|
go.mongodb.org/mongo-driver/v2 v2.8.0
|
|
golang.org/x/crypto v0.54.0
|
|
golang.org/x/oauth2 v0.36.0
|
|
google.golang.org/grpc v1.64.0
|
|
)
|
|
|
|
require (
|
|
github.com/aquasecurity/trivy-db v0.0.0-20260713131703-4be526083c54 // indirect
|
|
github.com/hyperboloide/lk v0.0.0-20251220053519-b291812e3216 // indirect
|
|
github.com/knqyf263/go-apk-version v0.0.0-20200609155635-041fdbb8563f // indirect
|
|
github.com/knqyf263/go-deb-version v0.0.0-20241115132648-6f4aee6ccd23 // indirect
|
|
github.com/knqyf263/go-rpm-version v0.0.0-20240918084003-2afd7dc6a38f // indirect
|
|
github.com/opencontainers/go-digest v1.0.0 // indirect
|
|
github.com/opencontainers/image-spec v1.1.1 // indirect
|
|
github.com/robfig/cron/v3 v3.0.1 // indirect
|
|
oras.land/oras-go/v2 v2.6.2 // indirect
|
|
)
|
|
|
|
require (
|
|
gitea.hostxtra.co.uk/mrhid6/vantage/shared v0.0.0
|
|
github.com/bytedance/sonic v1.11.6 // indirect
|
|
github.com/bytedance/sonic/loader v0.1.1 // indirect
|
|
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
|
github.com/cloudwego/base64x v0.1.4 // indirect
|
|
github.com/cloudwego/iasm v0.2.0 // indirect
|
|
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
|
|
github.com/gin-contrib/sse v0.1.0 // indirect
|
|
github.com/go-jose/go-jose/v4 v4.1.4 // indirect
|
|
github.com/go-playground/locales v0.14.1 // indirect
|
|
github.com/go-playground/universal-translator v0.18.1 // indirect
|
|
github.com/go-playground/validator/v10 v10.20.0 // indirect
|
|
github.com/goccy/go-json v0.10.2 // indirect
|
|
github.com/gorilla/websocket v1.4.1 // indirect
|
|
github.com/json-iterator/go v1.1.12 // indirect
|
|
github.com/klauspost/compress v1.17.6 // indirect
|
|
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
|
|
github.com/konsorten/go-windows-terminal-sequences v1.0.1 // indirect
|
|
github.com/leodido/go-urn v1.4.0 // indirect
|
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
|
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
|
|
github.com/sirupsen/logrus v1.4.2 // indirect
|
|
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
|
github.com/ugorji/go/codec v1.2.12 // indirect
|
|
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
|
|
github.com/xdg-go/scram v1.2.0 // indirect
|
|
github.com/xdg-go/stringprep v1.0.4 // indirect
|
|
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
|
|
go.uber.org/atomic v1.11.0 // indirect
|
|
golang.org/x/arch v0.8.0 // indirect
|
|
golang.org/x/net v0.56.0 // indirect
|
|
golang.org/x/sync v0.22.0 // indirect
|
|
golang.org/x/sys v0.47.0 // indirect
|
|
golang.org/x/text v0.40.0 // indirect
|
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e // indirect
|
|
google.golang.org/protobuf v1.34.2 // indirect
|
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
)
|
|
|
|
replace gitea.hostxtra.co.uk/mrhid6/vantage/shared => ../shared
|