fix(workflow): prevent prototype traversal and inherited CLI authorization
This commit is contained in:
1 parent
fac81b08e8
commit
d2e0d564ca
6 files changed
+62
-31
No files matched your search
+2
-2
@@ -25,12 +25,12 @@ export class MutationConfirmationRequired extends CliError {
|
||||
}
|
||||
|
||||
export function isDryRun(parsed: CliParsedArgs, runtime: CliRuntime): boolean {
|
||||
return runtime.dryRun === true || booleanOption(parsed.options, ["dry-run", "dryRun", "dryrun"]);
|
||||
return (Object.hasOwn(runtime, "dryRun") && runtime.dryRun === true) || booleanOption(parsed.options, ["dry-run", "dryRun", "dryrun"]);
|
||||
}
|
||||
|
||||
export function isConfirmed(parsed: CliParsedArgs, runtime: CliRuntime): boolean {
|
||||
return (
|
||||
runtime.confirmed === true ||
|
||||
(Object.hasOwn(runtime, "confirmed") && runtime.confirmed === true) ||
|
||||
booleanOption(parsed.options, ["yes", "y", "confirm", "force-write"])
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user