mirror of
https://github.com/skilfoy/ARTEX-English.git
synced 2026-12-03 21:17:24 +00:00
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.
18 lines
600 B
Go
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, ""
|
|
}
|