fix: address audit execution failures and unsafe type conversions

This commit is contained in:
2026-10-12 19:53:19 +02:00
parent bfe9852826
commit 2fa48335d3
29 changed files with 1630 additions and 421 deletions
+9
View File
@@ -285,6 +285,7 @@ type Options struct {
Types string `yaml:"types"`
ArrayNullable string `yaml:"array_nullable"`
ContinueOnError bool `yaml:"continue_on_error"`
AtomicExecution bool `yaml:"atomic_execution"`
// FullDDL makes direct pgsql output execute the full idempotent DDL instead of
// diffing against the live database first.
FullDDL bool `yaml:"full_ddl"`
@@ -479,6 +480,14 @@ func (s *Set) Validate() error {
func (j *Job) validate() []string {
var e []string
if j.Options.AtomicExecution {
if j.Options.ContinueOnError {
e = append(e, "atomic_execution cannot be combined with continue_on_error")
}
if (j.Command != CommandConvert && j.Command != CommandMerge) || j.Output == nil || j.Output.ConnEnv == "" || j.Output.Format != "pgsql" {
e = append(e, "atomic_execution requires convert/merge with pgsql database output")
}
}
switch j.Command {
case CommandConvert, CommandMerge, CommandScriptsList, CommandScriptsExec,