-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
5c6c7d3
commit e8ccd66
Showing
4 changed files
with
25 additions
and
12 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
9 changes: 7 additions & 2 deletions
9
...rvices/network/network_vpc_has_empty_routingtables/network_vpc_has_empty_routingtables.py
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,21 @@ | ||
from prowler.lib.check.models import Check, Check_Report_NHN | ||
from prowler.providers.nhn.services.network.network_client import network_client | ||
|
||
|
||
class network_vpc_has_empty_routingtables(Check): | ||
def execute(self): | ||
findings = [] | ||
for network in network_client.networks: | ||
report = Check_Report_NHN(metadata=self.metadata(), resource=network) | ||
report.status = "PASS" | ||
report.status_extended = f"VPC {network.name} does not have a empty routingtables." | ||
report.status_extended = ( | ||
f"VPC {network.name} does not have a empty routingtables." | ||
) | ||
if network.empty_routingtables: | ||
report.status = "FAIL" | ||
report.status_extended = f"VPC {network.name} has a empty routingtables." | ||
report.status_extended = ( | ||
f"VPC {network.name} has a empty routingtables." | ||
) | ||
findings.append(report) | ||
|
||
return findings |
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
1 change: 1 addition & 0 deletions
1
.../network/network_vpc_subnet_has_external_router/network_vpc_subnet_has_external_router.py
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