ARTEX-English/program/scan.go
skilfoy aa666993bf Record scope groups, a skill index, and a leased desk.
Allowed names can be copied onto the engagement graph without a harness run. A live lease is the only thing that blocks confirm. The skill index drops payload and generator names.
2026-10-25 03:46:17 +00:00

18 lines
600 B
Go

package program
import "strings"
// ScanText rejects secret-shaped text before it is stored on the desk.
// It does not decide whether a sentence is an instruction.
func ScanText(text string) (bool, string) {
if strings.Contains(text, "AKIA") || strings.Contains(text, "BEGIN PRIVATE KEY") || strings.Contains(text, "BEGIN OPENSSH PRIVATE KEY") {
return false, "secret material"
}
lower := strings.ToLower(text)
for _, key := range []string{"password=", "token=", "api_key=", "secret="} {
if strings.Contains(lower, key) {
return false, "credential assignment"
}
}
return true, ""
}