-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
edcc8af
commit 3130ebd
Showing
1 changed file
with
14 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
package policy | ||
# METADATA | ||
# title: Install Code Execution (Suspicious) | ||
# description: | | ||
# Returns a violation if there is suspicious code execution on pacakge install | ||
|
||
package policy.v1 | ||
|
||
import rego.v1 | ||
|
||
# Returns a violation if there is suspicious code execution on package install | ||
# METADATA | ||
# scope: rule | ||
# schemas: | ||
# - data.issue: schema.issue | ||
issue contains "Package contains suspicious code execution on install" if { | ||
data.issue.tag == "CM0007" | ||
# Package contains suspicious code execution on install | ||
deny contains issue if { | ||
some issue in data.issues | ||
issue.tag == "CM0007" | ||
} | ||
|
||
issue contains "Package contains suspicious code execution on install" if { | ||
endswith(data.issue.tag, "M0031") | ||
# Package contains suspicious code execution on install | ||
deny contains issue if { | ||
some issue in data.issues | ||
endswith(issue.tag, "M0031") | ||
} |