-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Baseline: Add security profile check
Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
- Loading branch information
Showing
2 changed files
with
54 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
version: v1 | ||
type: rule-type | ||
name: security_policy | ||
severity: | ||
value: medium | ||
context: | ||
provider: github | ||
description: Raise an alert if a repository is missing a security policy file. | ||
guidance: | | ||
Ensure that a repository has a security policy file | ||
def: | ||
in_entity: repository | ||
rule_schema: | ||
type: object | ||
properties: | ||
filename: | ||
type: string | ||
description: | | ||
Path to the security policy file | ||
default: SECURITY.md | ||
required: | ||
- filename | ||
# Defines the configuration for ingesting data relevant for the rule | ||
ingest: | ||
type: git | ||
git: | ||
branch: master | ||
eval: | ||
type: rego | ||
rego: | ||
type: deny-by-default | ||
def: | | ||
package minder | ||
import rego.v1 | ||
default allow := false | ||
allow if { | ||
file.exists(input.profile.filename) | ||
} | ||
# We don't have a remediation method in place yet. | ||
|
||
# Defines the configuration for alerting on the rule | ||
alert: | ||
type: security_advisory | ||
security_advisory: {} |