mirror of
https://github.com/github/codeql.git
synced 2026-04-18 05:24:01 +02:00
Use if then else
Apply code review suggestion. Co-Authored-By: Taus <1104778+tausbn@users.noreply.github.com>
This commit is contained in:
@@ -41,18 +41,7 @@ where
|
||||
uses.getVersion() = version and
|
||||
not isTrustedOwner(nwo) and
|
||||
not isImmutableAction(uses, nwo) and
|
||||
not
|
||||
(
|
||||
(
|
||||
isContainerImage(nwo) and
|
||||
isPinnedContainer(version)
|
||||
)
|
||||
or
|
||||
(
|
||||
not isContainerImage(nwo) and
|
||||
isPinnedCommit(version)
|
||||
)
|
||||
)
|
||||
not if isContainerImage(nwo) then isPinnedContainer(version) else isPinnedCommit(version)
|
||||
select uses.getCalleeNode(),
|
||||
"Unpinned 3rd party Action '" + name + "' step $@ uses '" + nwo + "' with ref '" + version +
|
||||
"', not a pinned commit hash", uses, uses.toString()
|
||||
|
||||
Reference in New Issue
Block a user