Skip to content

Commit

Permalink
🧹 Update github policies to use new resource fields
Browse files Browse the repository at this point in the history
  • Loading branch information
jaym committed Sep 23, 2024
1 parent 05c7d7c commit aa0215e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions core/mondoo-github-best-practices.mql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ queries:
// if a .github repo exists, then check if the SUPPORT.md is there
if ( github.organization.repositories.one(name == ".github") ) {
github.organization.repositories.where( name == ".github").all(
files.one( name.downcase == "support.md")
) || github.repository.files.one( name.downcase == "support.md")
supportFile.exists
) || github.repository.supportFile.exists
} else {
github.repository.files.one( name.downcase == "support.md")
github.repository.supportFile.exists
}
docs:
desc: |
Expand All @@ -113,10 +113,10 @@ queries:
// if a .github repo exists, then check if the CODE_OF_CONDUCT.md is there
if ( github.organization.repositories.one(name == ".github") ) {
github.organization.repositories.where( name == ".github").all(
files.one( name.downcase == "code_of_conduct.md")
) || github.repository.files.one( name.downcase == "code_of_conduct.md")
codeOfConductFile.exists
) || github.repository.codeOfConductFile.exists
} else {
github.repository.files.one( name.downcase == "code_of_conduct.md")
github.repository.codeOfConductFile.exists
}
docs:
desc: |
Expand Down
8 changes: 4 additions & 4 deletions core/mondoo-github-security.mql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,10 @@ queries:
mql: |
if ( github.organization.repositories.one(name == ".github") ) {
github.organization.repositories.where( name == ".github").all(
files.one( name.downcase == "security.md")
) || github.repository.files.one( name.downcase == "security.md")
securityFile.exists
) || github.repository.securityFile.exists
} else {
github.repository.files.one( name.downcase == "security.md")
github.repository.securityFile.exists
}
docs:
desc: |
Expand Down Expand Up @@ -503,7 +503,7 @@ queries:
title: Ensure repository defines a security policy
impact: 30
mql: |
github.repository.files.one( name.downcase == "security.md")
github.repository.securityFile.exists
docs:
desc: |
This check tries to determine that the repository defines a security policy.
Expand Down

0 comments on commit aa0215e

Please sign in to comment.