Feat v0.5.1 chat core (#31)
All checks were successful
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-frontend (push) Successful in 5s
CI/CD / test-go-pg (push) Successful in 2m35s
CI/CD / test-sqlite (push) Successful in 2m49s
CI/CD / build-and-deploy (push) Successful in 1m21s

Co-authored-by: Jeffrey Smith <jasafpro@gmail.com>
Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #31.
This commit is contained in:
2026-03-30 12:42:54 +00:00
committed by xcaliber
parent 2abf406db8
commit 7155aaf663
14 changed files with 1883 additions and 29 deletions

View File

@@ -145,6 +145,14 @@ func (s *Sandbox) ExecWithLoader(ctx context.Context, filename, source string, m
}
}()
// Unicode security gate — scan source for invisible/deceptive characters
// before execution (defense in depth; install gate is primary).
if findings := ScanSource(source, filename); len(findings) > 0 {
if blocked, reason := Verdict(findings); blocked {
return nil, fmt.Errorf("unicode security gate: %s (file: %s)", reason, filename)
}
}
globals, err := starlark.ExecFile(thread, filename, source, predeclared)
if err != nil {
return nil, wrapError(err)