Back to Checks
A database resource is marked as publicly accessible.
NIF-0008
Service: rdbSeverity: critical
OfficialBuilt-inVerified
Database resources should not publicly available. You should limit all access to the minimum that is required for your application to function.
Run this check with Prowler
Run in Prowler CloudRun
prowler iac --checks NIF-0008Recommendation
Set the database to not be publicly accessible
Check Code
# METADATA
# title: A database resource is marked as publicly accessible.
# description: |
# Database resources should not publicly available. You should limit all access to the minimum that is required for your application to function.
# scope: package
# schemas:
# - input: schema["cloud"]
# related_resources:
# - https://pfs.nifcloud.com/guide/rdb/server_new.htm
# custom:
# id: NIF-0008
# long_id: nifcloud-rdb-no-public-db-access
# aliases:
# - AVD-NIF-0008
# - no-public-db-access
# - nifcloud-rdb-no-public-db-access
# provider: nifcloud
# service: rdb
# severity: CRITICAL
# recommended_action: Set the database to not be publicly accessible
# input:
# selector:
# - type: cloud
# subtypes:
# - service: rdb
# provider: nifcloud
# examples: checks/cloud/nifcloud/rdb/no_public_db_access.yaml
package builtin.nifcloud.rdb.nifcloud0008
import rego.v1
deny contains res if {
some db in input.nifcloud.rdb.dbinstances
db.publicaccess.value == true
res := result.new("Instance is exposed publicly.", db.publicaccess)
}