Added flags to disable env and file ops #2515

This commit is contained in:
Mike Farah
2025-11-22 09:40:03 +11:00
parent c716d157f2
commit f00852bc6c
10 changed files with 222 additions and 0 deletions
+3
View File
@@ -218,6 +218,9 @@ yq -P -oy sample.json
panic(err)
}
rootCmd.PersistentFlags().BoolVarP(&yqlib.ConfiguredSecurityPreferences.DisableEnvOps, "security-disable-env-ops", "", false, "Disable env related operations.")
rootCmd.PersistentFlags().BoolVarP(&yqlib.ConfiguredSecurityPreferences.DisableFileOps, "security-disable-file-ops", "", false, "Disable file related operations (e.g. load)")
rootCmd.AddCommand(
createEvaluateSequenceCommand(),
createEvaluateAllCommand(),