internal/security/ — core security layer baked into gnoma: - Secret scanner: gitleaks-derived regex patterns (Anthropic, OpenAI, AWS, GitHub, GitLab, Slack, Stripe, private keys, DB URLs, generic secrets) + Shannon entropy detection for unknown formats - Redactor: replaces matched secrets with [REDACTED], merges overlapping ranges, preserves surrounding context - Unicode sanitizer: NFKC normalization, strips Cf/Co categories, tag characters (ASCII smuggling), zero-width chars, RTL overrides - Incognito mode: suppresses persistence, learning, content logging - Firewall: wraps engine, scans outgoing messages + system prompt + tool results before they reach the provider Wired into engine and CLI. 21 security tests.
36 lines
1.3 KiB
Modula-2
36 lines
1.3 KiB
Modula-2
module somegit.dev/Owlibou/gnoma
|
|
|
|
go 1.26.1
|
|
|
|
require (
|
|
github.com/BurntSushi/toml v0.3.1
|
|
github.com/VikingOwl91/mistral-go-sdk v1.2.1
|
|
github.com/anthropics/anthropic-sdk-go v1.29.0
|
|
github.com/openai/openai-go v1.12.0
|
|
golang.org/x/text v0.27.0
|
|
google.golang.org/genai v1.52.1
|
|
)
|
|
|
|
require (
|
|
cloud.google.com/go v0.116.0 // indirect
|
|
cloud.google.com/go/auth v0.9.3 // indirect
|
|
cloud.google.com/go/compute/metadata v0.5.0 // indirect
|
|
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
|
github.com/google/go-cmp v0.6.0 // indirect
|
|
github.com/google/s2a-go v0.1.8 // indirect
|
|
github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect
|
|
github.com/gorilla/websocket v1.5.3 // indirect
|
|
github.com/tidwall/gjson v1.18.0 // indirect
|
|
github.com/tidwall/match v1.1.1 // indirect
|
|
github.com/tidwall/pretty v1.2.1 // indirect
|
|
github.com/tidwall/sjson v1.2.5 // indirect
|
|
go.opencensus.io v0.24.0 // indirect
|
|
golang.org/x/crypto v0.40.0 // indirect
|
|
golang.org/x/net v0.41.0 // indirect
|
|
golang.org/x/sync v0.16.0 // indirect
|
|
golang.org/x/sys v0.34.0 // indirect
|
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
|
|
google.golang.org/grpc v1.66.2 // indirect
|
|
google.golang.org/protobuf v1.34.2 // indirect
|
|
)
|