Feat v0.5.1 chat core (#31)
All checks were successful
All checks were successful
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user