mirror of
https://github.com/koalaman/shellcheck
synced 2025-08-20 21:33:50 -07:00
Merge pull request #3258 from e-kwsm/doas-run0
feat(SC2016,SC2032,SC2033): check doas and run0 similarly to sudo
This commit is contained in:
commit
5b40fde630
1 changed files with 6 additions and 2 deletions
|
@ -1105,6 +1105,8 @@ checkSingleQuotedVariables params t@(T_SingleQuoted id s) =
|
||||||
,"xprop"
|
,"xprop"
|
||||||
,"alias"
|
,"alias"
|
||||||
,"sudo" -- covering "sudo sh" and such
|
,"sudo" -- covering "sudo sh" and such
|
||||||
|
,"doas" -- same as sudo
|
||||||
|
,"run0" -- same as sudo
|
||||||
,"docker" -- like above
|
,"docker" -- like above
|
||||||
,"podman"
|
,"podman"
|
||||||
,"oc"
|
,"oc"
|
||||||
|
@ -2330,7 +2332,7 @@ prop_checkFunctionsUsedExternally2c =
|
||||||
prop_checkFunctionsUsedExternally3 =
|
prop_checkFunctionsUsedExternally3 =
|
||||||
verifyNotTree checkFunctionsUsedExternally "f() { :; }; echo f"
|
verifyNotTree checkFunctionsUsedExternally "f() { :; }; echo f"
|
||||||
prop_checkFunctionsUsedExternally4 =
|
prop_checkFunctionsUsedExternally4 =
|
||||||
verifyNotTree checkFunctionsUsedExternally "foo() { :; }; sudo \"foo\""
|
verifyNotTree checkFunctionsUsedExternally "foo() { :; }; run0 \"foo\""
|
||||||
prop_checkFunctionsUsedExternally5 =
|
prop_checkFunctionsUsedExternally5 =
|
||||||
verifyTree checkFunctionsUsedExternally "foo() { :; }; ssh host foo"
|
verifyTree checkFunctionsUsedExternally "foo() { :; }; ssh host foo"
|
||||||
prop_checkFunctionsUsedExternally6 =
|
prop_checkFunctionsUsedExternally6 =
|
||||||
|
@ -2340,7 +2342,7 @@ prop_checkFunctionsUsedExternally7 =
|
||||||
prop_checkFunctionsUsedExternally8 =
|
prop_checkFunctionsUsedExternally8 =
|
||||||
verifyTree checkFunctionsUsedExternally "foo() { :; }; command sudo foo"
|
verifyTree checkFunctionsUsedExternally "foo() { :; }; command sudo foo"
|
||||||
prop_checkFunctionsUsedExternally9 =
|
prop_checkFunctionsUsedExternally9 =
|
||||||
verifyTree checkFunctionsUsedExternally "foo() { :; }; exec -c sudo foo"
|
verifyTree checkFunctionsUsedExternally "foo() { :; }; exec -c doas foo"
|
||||||
checkFunctionsUsedExternally params t =
|
checkFunctionsUsedExternally params t =
|
||||||
runNodeAnalysis checkCommand params t
|
runNodeAnalysis checkCommand params t
|
||||||
where
|
where
|
||||||
|
@ -2364,6 +2366,8 @@ checkFunctionsUsedExternally params t =
|
||||||
"chroot" -> firstNonFlag
|
"chroot" -> firstNonFlag
|
||||||
"screen" -> firstNonFlag
|
"screen" -> firstNonFlag
|
||||||
"sudo" -> firstNonFlag
|
"sudo" -> firstNonFlag
|
||||||
|
"doas" -> firstNonFlag
|
||||||
|
"run0" -> firstNonFlag
|
||||||
"xargs" -> firstNonFlag
|
"xargs" -> firstNonFlag
|
||||||
"tmux" -> firstNonFlag
|
"tmux" -> firstNonFlag
|
||||||
"ssh" -> take 1 $ drop 1 $ dropFlags argAndString
|
"ssh" -> take 1 $ drop 1 $ dropFlags argAndString
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue