Compare commits

...

1445 Commits

Author SHA1 Message Date
github-actions
7fb0e84686 chore(release): 3.3.4 2023-04-05 12:02:43 +00:00
Pepe Fagoaga
e07167a6fc chore(release): 3.3.3 2023-04-05 13:12:38 +02:00
Sergio Garcia
f8e69ee26c chore(regions_update): Changes in regions for AWS services. (#2173)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-05 12:39:51 +02:00
dependabot[bot]
43cba63389 build(deps-dev): bump moto from 4.1.5 to 4.1.6 (#2164)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-04-05 12:39:45 +02:00
Nacho Rivera
cc19c768fc fix(elbv2 desync check): Mixed elbv2 desync and smuggling (#2171) 2023-04-05 12:39:38 +02:00
Sergio Garcia
4e9a107478 chore(regions_update): Changes in regions for AWS services. (#2170)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-05 12:39:34 +02:00
dependabot[bot]
6635de3526 build(deps): bump botocore from 1.29.100 to 1.29.105 (#2163)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-05 12:39:26 +02:00
dependabot[bot]
eb1597b708 build(deps): bump mkdocs-material from 9.1.4 to 9.1.5 (#2162)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-05 12:39:20 +02:00
Nacho Rivera
f0d9800e96 fix(pipeline build): fixed wording when build and push (#2169)
# Conflicts:
#	poetry.lock
2023-04-05 12:39:06 +02:00
dependabot[bot]
f660118da9 build(deps-dev): bump pylint from 2.17.0 to 2.17.2 (#2161)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
# Conflicts:
#	poetry.lock
2023-04-05 12:37:54 +02:00
Pepe Fagoaga
c66d75fc79 fix(dax): Call list_tags using the cluster ARN (#2167) 2023-04-05 12:35:08 +02:00
Pepe Fagoaga
6968172f93 fix(iam): Handle LimitExceededException when calling generate_credential_report (#2168) 2023-04-05 12:35:02 +02:00
Pepe Fagoaga
dc1c8bf91b fix(cloudformation): Handle ValidationError (#2166) 2023-04-05 12:34:57 +02:00
Pepe Fagoaga
529eb4b858 fix(rds): Handle DBSnapshotNotFound (#2165) 2023-04-05 12:34:51 +02:00
Michael Göhler
0eeb919c91 fix(secretsmanager_automatic_rotation_enabled): Improve description for Secrets Manager secret rotation (#2156) 2023-04-05 12:34:42 +02:00
Sergio Garcia
441fffb32d chore(regions_update): Changes in regions for AWS services. (#2159)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-05 12:34:36 +02:00
Igor Ceron
dbc18ecea9 fix(docs): check extra_742 name adjusted in the V2 to V3 mapping (#2154) 2023-04-05 12:34:31 +02:00
Sergio Garcia
79289c23c1 chore(regions_update): Changes in regions for AWS services. (#2155)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-05 12:34:24 +02:00
Pepe Fagoaga
2580d820ec fix(pypi): Build from release branch (#2151) 2023-03-30 10:16:03 +02:00
Pepe Fagoaga
3f3888f499 chore(poetry): lock 2023-03-30 08:22:25 +02:00
Sergio Garcia
b20a532ab5 chore(regions_update): Changes in regions for AWS services. (#2149)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-30 08:20:49 +02:00
Pepe Fagoaga
b11c9991a3 fix(ssm): Handle ValidationException when retrieving documents (#2146) 2023-03-30 08:20:49 +02:00
Nacho Rivera
fd9cbe6ba3 fix(audit_info): azure subscriptions parsing error (#2147) 2023-03-30 08:20:49 +02:00
Nacho Rivera
227b1db493 fix(delete check): delete check ec2_securitygroup_in_use_without_ingress_filtering (#2148) 2023-03-30 08:20:49 +02:00
Sergio Garcia
10d8c12913 chore(regions_update): Changes in regions for AWS services. (#2145)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-30 08:20:49 +02:00
dependabot[bot]
d9a1cc333e build(deps): bump botocore from 1.29.90 to 1.29.100 (#2142)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-30 08:20:49 +02:00
dependabot[bot]
d1670c8347 build(deps): bump mkdocs-material from 9.1.3 to 9.1.4 (#2140)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-30 08:20:49 +02:00
Nacho Rivera
b03bc8fc0b fix(azure output): change default values of audit identity metadata (#2144) 2023-03-30 08:20:49 +02:00
dependabot[bot]
79c975ab9c build(deps): bump pydantic from 1.10.6 to 1.10.7 (#2139)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-30 08:20:49 +02:00
dependabot[bot]
68cf285fb9 build(deps): bump alive-progress from 3.0.1 to 3.1.0 (#2138)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-30 08:20:47 +02:00
Sergio Garcia
36ba0ffb1f chore(docs): Developer Guide - how to create a new check (#2137) 2023-03-30 08:20:22 +02:00
Pepe Fagoaga
d2b1818700 fix(resource_not_found): Handle error (#2136) 2023-03-30 08:20:22 +02:00
Nacho Rivera
2df02acbd8 feat(defender service): retrieving key dicts with get (#2129) 2023-03-30 08:20:20 +02:00
Pepe Fagoaga
7fd11b2f0e fix(s3): handle if ignore_public_acls is None (#2128) 2023-03-30 08:19:42 +02:00
Sergio Garcia
47bab87603 fix(brew): move brew formula action to the bottom (#2135) 2023-03-30 08:18:52 +02:00
Pepe Fagoaga
1835e1df98 fix(aws_provider): Fix assessment session name (#2132) 2023-03-30 08:18:52 +02:00
Sergio Garcia
dc88b033a0 chore(regions_update): Changes in regions for AWS services. (#2126)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-30 08:18:52 +02:00
Sergio Garcia
0f784e34db chore(regions_update): Changes in regions for AWS services. (#2123)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-30 08:18:52 +02:00
Ben Nugent
698f299edf fix(quickinventory): AttributError when creating inventory table (#2122) 2023-03-30 08:18:52 +02:00
Sergio Garcia
172bb36dfb fix(output bucket): solve IsADirectoryError using compliance flag (#2121) 2023-03-30 08:18:52 +02:00
Sergio Garcia
4b1e6c7493 chore(regions_update): Changes in regions for AWS services. (#2120)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-30 08:18:52 +02:00
Sergio Garcia
6d5c277c73 docs: improve reporting documentation (#2119) 2023-03-30 08:18:52 +02:00
Sergio Garcia
2d4b7ce499 docs: improve quick inventory section (#2117) 2023-03-30 08:18:52 +02:00
Toni de la Fuente
3ee3a3b2f1 docs(developer-guide): added phase 1 of the developer guide (#1904)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2023-03-30 08:18:52 +02:00
Pepe Fagoaga
e9e6ff0e24 docs: Remove list severities (#2116) 2023-03-30 08:18:52 +02:00
Sergio Garcia
e0c6de76d4 chore(version): check latest version (#2106) 2023-03-30 08:18:52 +02:00
dependabot[bot]
5c2a411982 build(deps): bump boto3 from 1.26.86 to 1.26.90 (#2114)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-21 11:04:26 +01:00
Sergio Garcia
08d65cbc41 chore(regions_update): Changes in regions for AWS services. (#2115)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-21 11:03:54 +01:00
dependabot[bot]
9d2bf429c1 build(deps): bump mkdocs-material from 9.1.2 to 9.1.3 (#2113)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-21 10:18:36 +01:00
dependabot[bot]
d34f863bd4 build(deps-dev): bump moto from 4.1.4 to 4.1.5 (#2111)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-03-21 09:27:44 +01:00
Sergio Garcia
b4abf1c2c7 chore(regions_update): Changes in regions for AWS services. (#2104)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-21 08:32:26 +01:00
dependabot[bot]
68baaf589e build(deps-dev): bump coverage from 7.2.1 to 7.2.2 (#2112)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-21 08:18:47 +01:00
dependabot[bot]
be74e41d84 build(deps-dev): bump openapi-spec-validator from 0.5.5 to 0.5.6 (#2110)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-21 07:52:50 +01:00
Sergio Garcia
848122b0ec chore(release): update Prowler Version to 3.3.0 (#2102)
Co-authored-by: github-actions <noreply@github.com>
2023-03-16 22:30:02 +01:00
Nacho Rivera
0edcb7c0d9 fix(ulimit check): try except when checking ulimit (#2096)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2023-03-16 17:39:46 +01:00
Pepe Fagoaga
cc58e06b5e fix(providers): Move provider's logic outside main (#2043)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-03-16 17:32:53 +01:00
Sergio Garcia
0d6ca606ea fix(ec2_securitygroup_allow_wide_open_public_ipv4): correct check title (#2101) 2023-03-16 17:25:32 +01:00
Sergio Garcia
75ee93789f chore(regions_update): Changes in regions for AWS services. (#2095)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-16 17:14:40 +01:00
Sergio Garcia
05daddafbf feat(SecurityHub): add compliance details to Security Hub findings (#2100) 2023-03-16 17:11:55 +01:00
Nacho Rivera
7bbce6725d fix(ulimit check): test only when platform is not windows (#2094) 2023-03-16 08:38:37 +01:00
Nacho Rivera
789b211586 feat(lambda_cloudtrail check): improved logic and status extended (#2092) 2023-03-15 12:32:58 +01:00
Sergio Garcia
826a043748 chore(regions_update): Changes in regions for AWS services. (#2091)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-15 12:28:03 +01:00
Sergio Garcia
6761048298 fix(cloudwatch): solve inexistent filterPattern error (#2087) 2023-03-14 14:46:34 +01:00
Sergio Garcia
738fc9acad feat(compliance): add compliance field to HTML, CSV and JSON outputs including frameworks and reqs (#2060)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-03-14 14:20:46 +01:00
Sergio Garcia
43c0540de7 chore(regions_update): Changes in regions for AWS services. (#2085)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-14 13:11:02 +01:00
Sergio Garcia
2d1c3d8121 fix(emr): solve emr_cluster_publicly_accesible error (#2086) 2023-03-14 13:10:21 +01:00
dependabot[bot]
f48a5c650d build(deps-dev): bump pytest-xdist from 3.2.0 to 3.2.1 (#2084)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-14 10:21:17 +01:00
dependabot[bot]
66c18eddb8 build(deps): bump botocore from 1.29.86 to 1.29.90 (#2083)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-14 10:01:23 +01:00
dependabot[bot]
fdd2ee6365 build(deps-dev): bump bandit from 1.7.4 to 1.7.5 (#2082)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-14 09:03:46 +01:00
dependabot[bot]
c207f60ad8 build(deps): bump pydantic from 1.10.5 to 1.10.6 (#2081)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-14 08:02:28 +01:00
dependabot[bot]
0eaa95c8c0 build(deps): bump mkdocs-material from 9.1.1 to 9.1.2 (#2080)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-14 07:48:02 +01:00
Pepe Fagoaga
df2fca5935 fix(bug_report): typo in bug reporting template (#2078)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2023-03-13 18:42:34 +01:00
Toni de la Fuente
dcaf5d9c7d update(docs): update readme with new ECR alias (#2079) 2023-03-13 18:07:51 +01:00
Sergio Garcia
0112969a97 fix(compliance): add check to 2.1.5 CIS (#2077) 2023-03-13 09:25:51 +01:00
Sergio Garcia
3ec0f3d69c chore(regions_update): Changes in regions for AWS services. (#2075)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-13 07:51:13 +01:00
Pepe Fagoaga
5555d300a1 fix(bug_report): Update wording (#2074) 2023-03-10 12:21:51 +01:00
Nacho Rivera
8155ef4b60 feat(templates): New versions of issues and fr templates (#2072) 2023-03-10 10:32:17 +01:00
Sergio Garcia
a12402f6c8 chore(regions_update): Changes in regions for AWS services. (#2073)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-10 10:27:29 +01:00
Sergio Garcia
cf28b814cb fix(ec2): avoid terminated instances (#2063) 2023-03-10 08:11:35 +01:00
Pepe Fagoaga
b05f67db19 chore(actions): Missing cache in the PR (#2067) 2023-03-09 11:50:49 +01:00
Pepe Fagoaga
260f4659d5 chore(actions): Use GHA cache (#2066) 2023-03-09 10:29:16 +01:00
dependabot[bot]
9e700f298c build(deps-dev): bump pylint from 2.16.4 to 2.17.0 (#2062)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-08 15:41:22 +01:00
dependabot[bot]
56510734c4 build(deps): bump boto3 from 1.26.85 to 1.26.86 (#2061)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-08 15:14:18 +01:00
Pepe Fagoaga
3938a4d14e chore(dependabot): Change to weekly (#2057) 2023-03-08 14:41:34 +01:00
Sergio Garcia
fa3b9eeeaf chore(regions_update): Changes in regions for AWS services. (#2058)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-08 14:38:56 +01:00
dependabot[bot]
eb9d6fa25c build(deps): bump botocore from 1.29.85 to 1.29.86 (#2054)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-08 09:57:44 +01:00
Alex Nelson
b53307c1c2 docs: Corrected spelling mistake in multiacount (#2056) 2023-03-08 09:57:08 +01:00
dependabot[bot]
c3fc708a66 build(deps): bump boto3 from 1.26.82 to 1.26.85 (#2053)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-08 09:03:00 +01:00
Sergio Garcia
b34ffbe6d0 feat(inventory): add tags to quick inventory (#2051) 2023-03-07 14:20:50 +01:00
Sergio Garcia
f364315e48 chore(iam): update Prowler permissions (#2050) 2023-03-07 14:14:31 +01:00
Sergio Garcia
3ddb5a13a5 fix(ulimit): handle low ulimit OSError (#2042)
Co-authored-by: Toni de la Fuente <toni@blyx.com>
2023-03-07 13:19:24 +01:00
dependabot[bot]
a24cc399a4 build(deps-dev): bump moto from 4.1.3 to 4.1.4 (#2045)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-03-07 12:45:50 +01:00
Sergio Garcia
305f4b2688 chore(regions_update): Changes in regions for AWS services. (#2049)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-07 11:27:28 +01:00
dependabot[bot]
9823171d65 build(deps-dev): bump pylint from 2.16.3 to 2.16.4 (#2048)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-07 10:11:19 +01:00
dependabot[bot]
4761bd8fda build(deps): bump mkdocs-material from 9.1.0 to 9.1.1 (#2047)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-07 09:33:19 +01:00
dependabot[bot]
9c22698723 build(deps-dev): bump pytest from 7.2.1 to 7.2.2 (#2046)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-07 08:32:19 +01:00
dependabot[bot]
e3892bbcc6 build(deps): bump botocore from 1.29.84 to 1.29.85 (#2044)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-07 08:18:53 +01:00
Sergio Garcia
629b156f52 fix(quick inventory): add non-tagged s3 buckets to inventory (#2041) 2023-03-06 16:55:03 +01:00
Gary Mclean
c45dd47d34 fix(windows-path): --list-services bad split (#2028)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-03-06 14:00:07 +01:00
Sergio Garcia
ef8831f784 feat(quick_inventory): add regions to inventory table (#2026) 2023-03-06 13:41:30 +01:00
Sergio Garcia
c5a42cf5de feat(rds_instance_transport_encrypted): add new check (#1963)
Co-authored-by: Toni de la Fuente <toni@blyx.com>
2023-03-06 13:18:41 +01:00
dependabot[bot]
90ebbfc20f build(deps-dev): bump pylint from 2.16.2 to 2.16.3 (#2038)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-06 13:18:26 +01:00
Fennerr
17cd0dc91d feat(new_check): cloudwatch_log_group_no_secrets_in_logs (#1980)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
Co-authored-by: Jeffrey Souza <JeffreySouza@users.noreply.github.com>
2023-03-06 12:16:46 +01:00
dependabot[bot]
fa1f42af59 build(deps): bump botocore from 1.29.82 to 1.29.84 (#2037)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-06 12:14:48 +01:00
Sergio Garcia
f45ea1ab53 fix(check): change cloudformation_outputs_find_secrets name (#2027) 2023-03-06 12:11:58 +01:00
Sergio Garcia
0dde3fe483 chore(poetry): add poetry checks to pre-commit (#2040) 2023-03-06 11:44:04 +01:00
dependabot[bot]
277dc7dd09 build(deps-dev): bump freezegun from 1.2.1 to 1.2.2 (#2033)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-06 11:06:23 +01:00
dependabot[bot]
3215d0b856 build(deps-dev): bump coverage from 7.1.0 to 7.2.1 (#2032)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-06 09:55:19 +01:00
dependabot[bot]
0167d5efcd build(deps): bump mkdocs-material from 9.0.15 to 9.1.0 (#2031)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-06 09:15:44 +01:00
Sergio Garcia
b48ac808a6 chore(regions_update): Changes in regions for AWS services. (#2035)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-03 10:14:20 +01:00
dependabot[bot]
616524775c build(deps-dev): bump docker from 6.0.0 to 6.0.1 (#2030)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-03 10:02:11 +01:00
dependabot[bot]
5832849b11 build(deps): bump boto3 from 1.26.81 to 1.26.82 (#2029)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-03 09:43:43 +01:00
Sergio Garcia
467c5d01e9 fix(cloudtrail): list tags only in owned trails (#2025) 2023-03-02 16:16:19 +01:00
Sergio Garcia
24711a2f39 feat(tags): add resource tags to S-W services (#2020) 2023-03-02 14:21:05 +01:00
Nacho Rivera
24e8286f35 feat(): 7 chars in dispatch commit message (#2024) 2023-03-02 14:20:31 +01:00
Sergio Garcia
e8a1378ad0 feat(tags): add resource tags to G-R services (#2009) 2023-03-02 13:56:22 +01:00
Sergio Garcia
76bb418ea9 feat(tags): add resource tags to E services (#2007)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-03-02 13:55:26 +01:00
Nacho Rivera
cd8770a3e3 fix(actions): fixed dispatch commit message (#2023) 2023-03-02 13:55:03 +01:00
Sergio Garcia
da834c0935 feat(tags): add resource tags to C-D services (#2003)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-03-02 13:14:53 +01:00
Nacho Rivera
024ffb1117 fix(head): Pass head commit to dispatch action (#2022) 2023-03-02 12:06:41 +01:00
Nacho Rivera
eed7ab9793 fix(iam): refactor IAM service (#2010) 2023-03-02 11:16:05 +01:00
Sergio Garcia
032feb343f feat(tags): add resource tags in A services (#1997) 2023-03-02 10:59:49 +01:00
Pepe Fagoaga
eabccba3fa fix(actions): push should be true (#2019) 2023-03-02 10:37:29 +01:00
Nacho Rivera
d86d656316 feat(dispatch): add tag info to dispatch (#2002) 2023-03-02 10:31:30 +01:00
Sergio Garcia
fa73c91b0b chore(regions_update): Changes in regions for AWS services. (#2018)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-02 10:23:59 +01:00
Pepe Fagoaga
2eee50832d fix(actions): Stop using github storage (#2016) 2023-03-02 10:23:04 +01:00
Toni de la Fuente
b40736918b docs(install): Add brew and github installation to quick start (#1991) 2023-03-02 10:21:57 +01:00
Sergio Garcia
ffb1a2e30f chore(regions_update): Changes in regions for AWS services. (#1995)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-02 10:21:41 +01:00
Sergio Garcia
d6c3c0c6c1 feat(s3_bucket_level_public_access_block): new check (#1953) 2023-03-02 10:18:27 +01:00
dependabot[bot]
ee251721ac build(deps): bump botocore from 1.29.81 to 1.29.82 (#2015)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-02 09:53:24 +01:00
dependabot[bot]
fdbb9195d5 build(deps-dev): bump moto from 4.1.2 to 4.1.3 (#2014)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-02 09:23:48 +01:00
dependabot[bot]
c68b08d9af build(deps-dev): bump black from 22.10.0 to 22.12.0 (#2013)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-02 08:59:18 +01:00
dependabot[bot]
3653bbfca0 build(deps-dev): bump flake8 from 5.0.4 to 6.0.0 (#2012)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-02 08:32:41 +01:00
dependabot[bot]
05c7cc7277 build(deps): bump boto3 from 1.26.80 to 1.26.81 (#2011)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-02 07:54:33 +01:00
Sergio Garcia
5670bf099b chore(regions_update): Changes in regions for AWS services. (#2006)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-01 10:16:58 +01:00
Nacho Rivera
0c324b0f09 fix(awslambdacloudtrail): include advanced event and all lambdas in check (#1994) 2023-03-01 10:04:06 +01:00
dependabot[bot]
968557e38e build(deps): bump botocore from 1.29.80 to 1.29.81 (#2005)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-01 08:59:54 +01:00
dependabot[bot]
882cdebacb build(deps): bump boto3 from 1.26.79 to 1.26.80 (#2004) 2023-03-01 08:40:41 +01:00
Sergio Garcia
07753e1774 feat(encryption): add new encryption category (#1999) 2023-02-28 13:42:11 +01:00
Pepe Fagoaga
5b984507fc fix(emr): KeyError EmrManagedSlaveSecurityGroup (#2000) 2023-02-28 13:41:58 +01:00
Sergio Garcia
27df481967 chore(metadata): remove tags from metadata (#1998) 2023-02-28 12:27:59 +01:00
dependabot[bot]
0943031f23 build(deps): bump mkdocs-material from 9.0.14 to 9.0.15 (#1993)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-28 11:02:59 +01:00
dependabot[bot]
2d95168de0 build(deps): bump botocore from 1.29.79 to 1.29.80 (#1992)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-28 10:46:25 +01:00
Sergio Garcia
97cae8f92c chore(brew): bump new version to brew (#1990) 2023-02-27 18:07:05 +01:00
github-actions
eb213bac92 chore(release): 3.2.4 2023-02-27 14:25:52 +01:00
Sergio Garcia
8187788b2c fix(pypi-release.yml): create PR before replicating (#1986) 2023-02-27 14:16:53 +01:00
Sergio Garcia
c80e08abce fix(compliance): solve AWS compliance dir path (#1987) 2023-02-27 14:16:17 +01:00
github-actions[bot]
42fd851e5c chore(release): update Prowler Version to 3.2.3 (#1985)
Co-authored-by: github-actions <noreply@github.com>
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-02-27 13:59:28 +01:00
Pepe Fagoaga
70e4ebccab chore(codeowners): Update team to OSS (#1984) 2023-02-27 13:31:16 +01:00
Sergio Garcia
140f87c741 chore(readme): add brew stats (#1982) 2023-02-27 13:17:48 +01:00
Pepe Fagoaga
b0d756123e fix(action): Use PathContext to get version changes (#1983) 2023-02-27 13:17:09 +01:00
Pedro Martín González
6188c92916 chore(compliance): implements dynamic handling of available compliance frameworks (#1977)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-02-27 10:47:47 +01:00
dependabot[bot]
34c6f96728 build(deps): bump boto3 from 1.26.74 to 1.26.79 (#1981)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-27 09:45:45 +01:00
dependabot[bot]
50fd047c0b build(deps): bump botocore from 1.29.78 to 1.29.79 (#1978)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-27 09:14:29 +01:00
Sergio Garcia
5bcc05b536 chore(regions_update): Changes in regions for AWS services. (#1972)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-24 12:10:27 +01:00
Sergio Garcia
ce7d6c8dd5 fix(service errors): solve EMR, VPC and ELBv2 service errors (#1974) 2023-02-24 10:49:54 +01:00
dependabot[bot]
d87a1e28b4 build(deps): bump alive-progress from 2.4.1 to 3.0.1 (#1965)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-24 10:12:52 +01:00
Pepe Fagoaga
227306c572 fix(acm): Fix issues with list-certificates (#1970) 2023-02-24 10:12:38 +01:00
dependabot[bot]
45c2691f89 build(deps): bump mkdocs-material from 8.2.1 to 9.0.14 (#1964)
Signed-off-by: dependabot[bot] <support@github.com>
2023-02-24 10:03:52 +01:00
Pepe Fagoaga
d0c81245b8 fix(directoryservice): tzinfo without _ (#1971) 2023-02-24 10:03:34 +01:00
dependabot[bot]
e494afb1aa build(deps): bump botocore from 1.29.74 to 1.29.78 (#1968)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-24 09:43:14 +01:00
dependabot[bot]
ecc3c1cf3b build(deps): bump azure-storage-blob from 12.14.1 to 12.15.0 (#1966)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-24 08:42:44 +01:00
dependabot[bot]
228b16416a build(deps): bump colorama from 0.4.5 to 0.4.6 (#1967)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-24 07:56:47 +01:00
Nacho Rivera
17eb74842a fix(cloudfront): handle empty objects in checks (#1962) 2023-02-23 16:57:44 +01:00
Nacho Rivera
c01ff74c73 fix(kms): handle if describe_keys returns no value 2023-02-23 15:54:23 +01:00
Sergio Garcia
f88613b26d fix(toml): add toml dependency to pypi release action (#1960) 2023-02-23 15:24:46 +01:00
Sergio Garcia
3464f4241f chore(release): 3.2.2 (#1959)
Co-authored-by: github-actions <noreply@github.com>
2023-02-23 15:10:03 +01:00
Sergio Garcia
849b703828 chore(resource-based scan): execute only applicable checks (#1934) 2023-02-23 13:30:21 +01:00
Sergio Garcia
4b935a40b6 fix(metadata): remove us-east-1 in remediation (#1958) 2023-02-23 13:19:10 +01:00
Sergio Garcia
5873a23ccb fix(key errors): solver EMR and IAM errrors (#1957) 2023-02-23 13:15:00 +01:00
Nacho Rivera
eae2786825 fix(cloudtrail): Handle when the CloudTrail bucket is in another account (#1956) 2023-02-23 13:04:32 +01:00
github-actions[bot]
6407386de5 chore(regions_update): Changes in regions for AWS services. (#1952)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-23 12:24:36 +01:00
Sergio Garcia
3fe950723f fix(actions): add README to docker action and filter steps for releases (#1955) 2023-02-23 12:22:41 +01:00
Sergio Garcia
52bf6acd46 chore(regions): add secret token to avoid stuck checks (#1954) 2023-02-23 12:11:54 +01:00
Sergio Garcia
9590e7d7e0 chore(poetry): make python-poetry as packaging and dependency manager (#1935)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-02-23 11:50:29 +01:00
github-actions[bot]
7a08140a2d chore(regions_update): Changes in regions for AWS services. (#1950)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-23 08:42:36 +01:00
dependabot[bot]
d1491cfbd1 build(deps): bump boto3 from 1.26.74 to 1.26.76 (#1948)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-22 08:01:13 +01:00
dependabot[bot]
695b80549d build(deps): bump botocore from 1.29.75 to 1.29.76 (#1946)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-22 07:50:39 +01:00
Sergio Garcia
11c60a637f release: 3.2.1 (#1945) 2023-02-21 17:22:02 +01:00
Sergio Garcia
844ad70bb9 fix(cloudwatch): allow " in regex patterns (#1943) 2023-02-21 16:46:23 +01:00
Sergio Garcia
5ac7cde577 chore(iam_disable_N_days_credentials): improve checks logic (#1923) 2023-02-21 15:20:33 +01:00
Sergio Garcia
ce3ef0550f chore(Security Hub): add status extended to Security Hub (#1921) 2023-02-21 15:11:43 +01:00
Sergio Garcia
813f3e7d42 fix(errors): handle errors when S3 buckets or EC2 instances are deleted (#1942) 2023-02-21 12:31:23 +01:00
Sergio Garcia
d03f97af6b fix(regions): add unique branch name (#1941) 2023-02-21 11:53:36 +01:00
github-actions[bot]
019ab0286d chore(regions_update): Changes in regions for AWS services. (#1940)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-21 11:47:03 +01:00
Fennerr
c6647b4706 chore(secrets): Improve the status_extended with more information (#1937)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-02-21 11:37:20 +01:00
Sergio Garcia
f913536d88 fix(services): solve errors in EMR, RDS, S3 and VPC services (#1913) 2023-02-21 11:11:39 +01:00
dependabot[bot]
640d1bd176 build(deps-dev): bump moto from 4.1.2 to 4.1.3 (#1939)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-21 07:48:08 +01:00
dependabot[bot]
66baccf528 build(deps): bump botocore from 1.29.74 to 1.29.75 (#1938)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-21 07:32:44 +01:00
Sergio Garcia
6e6dacbace chore(security hub): add --skip-sh-update (#1911) 2023-02-20 09:58:00 +01:00
dependabot[bot]
cdbb10fb26 build(deps): bump boto3 from 1.26.72 to 1.26.74 (#1933)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-20 07:56:40 +01:00
dependabot[bot]
c34ba3918c build(deps): bump botocore from 1.29.73 to 1.29.74 (#1932)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-20 07:34:20 +01:00
Fennerr
fa228c876c fix(iam_rotate_access_key_90_days): check only active access keys (#1929)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-02-17 12:53:28 +01:00
dependabot[bot]
2f4d0af7d7 build(deps): bump botocore from 1.29.72 to 1.29.73 (#1926)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-17 12:14:23 +01:00
github-actions[bot]
2d3e5235a9 chore(regions_update): Changes in regions for AWS services. (#1927)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-17 11:13:13 +01:00
dependabot[bot]
8e91ccaa54 build(deps): bump boto3 from 1.26.71 to 1.26.72 (#1925)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-17 10:56:19 +01:00
Fennerr
6955658b36 fix(quick_inventory): handle ApiGateway resources (#1924)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-02-16 18:29:23 +01:00
Fennerr
dbb44401fd fix(ecs_task_definitions_no_environment_secrets): dump_env_vars is reintialised (#1922) 2023-02-16 15:59:53 +01:00
dependabot[bot]
b42ed70c84 build(deps): bump botocore from 1.29.71 to 1.29.72 (#1919)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-16 14:21:46 +01:00
dependabot[bot]
a28276d823 build(deps): bump pydantic from 1.10.4 to 1.10.5 (#1918)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-16 13:51:37 +01:00
Pepe Fagoaga
fa4b27dd0e fix(compliance): Set Version as optional and fix list (#1899)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-02-16 12:47:39 +01:00
dependabot[bot]
0be44d5c49 build(deps): bump boto3 from 1.26.70 to 1.26.71 (#1920)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-16 12:38:10 +01:00
github-actions[bot]
2514596276 chore(regions_update): Changes in regions for AWS services. (#1910)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-16 11:56:10 +01:00
dependabot[bot]
7008d2a953 build(deps): bump botocore from 1.29.70 to 1.29.71 (#1909)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-15 07:39:16 +01:00
dependabot[bot]
2539fedfc4 build(deps): bump boto3 from 1.26.69 to 1.26.70 (#1908)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-15 07:12:18 +01:00
Ignacio Dominguez
b453df7591 fix(iam-credentials-expiration): IAM password policy expires passwords fix (#1903)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-02-14 13:54:58 +01:00
Pepe Fagoaga
9e5d5edcba fix(codebuild): Handle endTime in builds (#1900) 2023-02-14 11:27:53 +01:00
Nacho Rivera
2d5de6ff99 fix(cross account): cloudtrail s3 bucket logging (#1902) 2023-02-14 11:23:31 +01:00
github-actions[bot]
259e9f1c17 chore(regions_update): Changes in regions for AWS services. (#1901)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-14 10:28:04 +01:00
dependabot[bot]
daeb53009e build(deps): bump botocore from 1.29.69 to 1.29.70 (#1898)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-14 08:27:14 +01:00
dependabot[bot]
f12d271ca5 build(deps): bump boto3 from 1.26.51 to 1.26.69 (#1897)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-14 07:55:26 +01:00
dependabot[bot]
965185ca3b build(deps-dev): bump pylint from 2.16.1 to 2.16.2 (#1896) 2023-02-14 07:35:29 +01:00
Pepe Fagoaga
9c484f6a78 Release: 3.2.0 (#1894) 2023-02-13 15:42:57 +01:00
Fennerr
de18c3c722 docs: Minor changes to logging (#1893) 2023-02-13 15:31:23 +01:00
Fennerr
9be753b281 docs: Minor changes to the intro paragraph (#1892) 2023-02-13 15:20:48 +01:00
Pepe Fagoaga
d6ae122de1 docs: Boto3 configuration (#1885)
Co-authored-by: Toni de la Fuente <toni@blyx.com>
2023-02-13 15:20:33 +01:00
Pepe Fagoaga
c6b90044f2 chore(Dockerfile): Remove build files (#1886) 2023-02-13 15:19:05 +01:00
Nacho Rivera
14898b6422 fix(Azure_Audit_Info): Added audited_resources field (#1891) 2023-02-13 15:17:11 +01:00
Fennerr
26294b0759 docs: Update AWS Role Assumption (#1890) 2023-02-13 15:13:22 +01:00
Nacho Rivera
6da45b5c2b fix(list_checks): arn filtering checks after audit_info set (#1887) 2023-02-13 14:57:42 +01:00
Acknosyn
674332fddd update(logging): fix plural grammar for checks execution message (#1680)
Co-authored-by: Francesco Badraun <francesco.badraun@zxsecurity.co.nz>
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-02-13 14:33:34 +01:00
Sergio Garcia
ab8942d05a fix(service errors): solve errors in IAM, S3, Lambda, DS, Cloudfront services (#1882)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-02-13 10:35:04 +01:00
github-actions[bot]
29790b8a5c chore(regions_update): Changes in regions for AWS services. (#1884)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-13 10:01:43 +01:00
dependabot[bot]
4a4c26ffeb build(deps): bump botocore from 1.29.51 to 1.29.69 (#1883)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-13 09:19:01 +01:00
Sergio Garcia
25c9bc07b2 chore(compliance): add manual checks to compliance CSV (#1872)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-02-10 12:38:13 +01:00
Nacho Rivera
d22d4c4c83 fix(cloudtrail_multi_region_enabled): reformat check (#1880) 2023-02-10 12:34:53 +01:00
Sergio Garcia
d88640fd20 fix(errors): solve several services errors (AccessAnalyzer, AppStream, KMS, S3, SQS, R53, IAM, CodeArtifact and EC2) (#1879) 2023-02-10 12:26:00 +01:00
github-actions[bot]
57a2fca3a4 chore(regions_update): Changes in regions for AWS services. (#1878)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-10 11:25:00 +01:00
Sergio Garcia
f796688c84 fix(metadata): typo in appstream_fleet_session_disconnect_timeout.metadata.json (#1875) 2023-02-09 16:22:19 +01:00
alexr3y
d6bbf8b7cc update(compliance): ENS RD2022 Spanish security framework updates (#1809)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-02-09 14:14:38 +01:00
Nacho Rivera
37ec460f64 fix(hardware mfa): changed hardware mfa description (#1873) 2023-02-09 14:06:54 +01:00
Sergio Garcia
004b9c95e4 fix(key_errors): handle Key Errors in Lambda and EMR (#1871)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-09 10:32:00 +01:00
github-actions[bot]
86e27b465a chore(regions_update): Changes in regions for AWS services. (#1870)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-09 10:17:18 +01:00
Nacho Rivera
5e9afddc3a fix(permissive role assumption): actions list handling (#1869) 2023-02-09 10:06:53 +01:00
Pepe Fagoaga
de281535b1 feat(boto3-config): Use standard retrier (#1868)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2023-02-09 09:58:47 +01:00
Pedro Martín González
9df7def14e feat(compliance): Add 17 new security compliance frameworks for AWS (#1824)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-09 07:39:57 +01:00
Sergio Garcia
5b9db9795d feat(new check): add accessanalyzer_enabled check (#1864)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-08 17:39:25 +01:00
Sergio Garcia
7d2ce7e6ab fix(action): do not trigger action when editing release (#1865) 2023-02-08 17:34:02 +01:00
Oleksandr Mykytenko
3e807af2b2 fix(checks): added validation for non-existing VPC endpoint policy (#1859)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-08 12:13:22 +01:00
Oleksandr Mykytenko
4c64dc7885 Fixed elbv2 service for GWLB resources (#1860)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-08 10:38:34 +01:00
github-actions[bot]
e7a7874b34 chore(regions_update): Changes in regions for AWS services. (#1863)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-08 10:36:03 +01:00
dependabot[bot]
c78a47788b build(deps): bump cryptography from 39.0.0 to 39.0.1 (#1862) 2023-02-08 08:02:47 +01:00
dependabot[bot]
922698c5d9 build(deps-dev): bump pytest-xdist from 3.1.0 to 3.2.0 (#1858) 2023-02-07 18:04:30 +01:00
Sergio Garcia
8e8a490936 chore(release): 3.1.4 (#1857)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-07 17:49:27 +01:00
Sergio Garcia
231bc0605f fix(output_bucket): Use full path for -o option with output to S3 bucket (#1854)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-02-07 17:28:25 +01:00
Carlos
0298ff9478 Change prowler additional policy json due errors in creation (#1852)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2023-02-07 13:09:12 +01:00
Sergio Garcia
33a25dcf0e fix(exit_code): change sys exit code to 1 in Critical Errors (#1853) 2023-02-07 11:43:14 +01:00
Sergio Garcia
54c16e3cdb chore(security hub): improve securityhub_enabled check logic (#1851)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-07 11:29:39 +01:00
github-actions[bot]
28a978acc2 chore(regions_update): Changes in regions for AWS services. (#1849)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-07 10:58:10 +01:00
dependabot[bot]
bea26a461f build(deps-dev): bump openapi-spec-validator from 0.5.4 to 0.5.5 (#1846)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-07 09:58:56 +01:00
Sergio Garcia
ed54c5b8b9 feat(exit_code 3): add -z option (#1848)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-07 09:51:46 +01:00
Sergio Garcia
13316b68aa fix(checks): solve different errors in EFS, S3 and VPC (#1841)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-07 09:42:10 +01:00
dependabot[bot]
043986f35b build(deps-dev): bump sure from 2.0.0 to 2.0.1 (#1847)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-07 09:28:26 +01:00
dependabot[bot]
2dc4421dd6 build(deps-dev): bump moto from 4.1.1 to 4.1.2 (#1845)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-07 08:22:55 +01:00
Sergio Garcia
6c16e2bca2 fix(kms): call GetKeyRotationStatus only for Customer Keys (#1842) 2023-02-06 17:07:03 +01:00
Sergio Garcia
c2b4a8e115 fix(errors): solve CloudWatch, KMS, EMR and OpenSearch service errors (#1843)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-06 16:59:46 +01:00
Toni de la Fuente
63b7bc8794 chore(issues): update bug_report.md (#1844) 2023-02-06 16:45:52 +01:00
github-actions[bot]
f41ae74ae2 chore(regions_update): Changes in regions for AWS services. (#1840) 2023-02-06 09:59:50 +01:00
Pepe Fagoaga
98689d223e fix(lambda-runtime): Init value must be empty string (#1837) 2023-02-06 09:38:35 +01:00
Sergio Garcia
f19cf21146 fix(readme): correct PyPi download link (#1836) 2023-02-03 16:43:43 +01:00
Sergio Garcia
24e19e6b18 fix(errors): solve different errors in KMS, EFS and Lambda (#1835)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-03 15:05:07 +01:00
Sergio Garcia
08376cb15e chore(release): 3.1.3 (#1832)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-03 14:32:15 +01:00
Pepe Fagoaga
5f6e4663c0 fix(action): Build from release branch (#1834) 2023-02-03 14:31:43 +01:00
Pepe Fagoaga
9b91c00fcc fix(awslambda_function_no_secrets_in_code): Retrieve Code if set (#1833) 2023-02-03 14:28:31 +01:00
Sergio Garcia
229ab88c2f fix(shub): update link to Security Hub documentation (#1830) 2023-02-03 14:10:27 +01:00
dependabot[bot]
8863d13578 build(deps-dev): bump pylint from 2.16.0 to 2.16.1 (#1823) 2023-02-03 14:03:20 +01:00
Nacho Rivera
e07fc9fbb9 fix(cloudtrail): included advanced data events selectors (#1814) 2023-02-03 14:02:16 +01:00
Sergio Garcia
0164574fdd fix(KeyError): handle service key errors (#1831) 2023-02-03 12:28:23 +01:00
github-actions[bot]
98eec332d8 chore(regions_update): Changes in regions for AWS services. (#1829) 2023-02-03 11:30:01 +01:00
Oleksandr Mykytenko
3d2986fc64 fix(metadata) fixed typo in title for awslambda_function_not_publicly… (#1826) 2023-02-03 10:34:24 +01:00
dependabot[bot]
29e7f8581e build(deps-dev): bump openapi-spec-validator from 0.5.2 to 0.5.4 (#1821) 2023-02-02 18:04:24 +01:00
dependabot[bot]
4ee3f6c87a build(deps-dev): bump pylint from 2.15.10 to 2.16.0 (#1815)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-02 11:39:32 +01:00
Sergio Garcia
b8c7440e1f fix(KeyError): Handle service key errors (#1819)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-02 11:34:19 +01:00
Sergio Garcia
d49ff8d9a4 chore(logs): improve check error logs (#1818) 2023-02-02 11:13:40 +01:00
github-actions[bot]
07198042bd chore(regions_update): Changes in regions for AWS services. (#1817)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-02 10:58:47 +01:00
Sergio Garcia
c7a9492e96 feat(scan-type): AWS Resource ARNs based scan (#1807)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-02-01 14:09:22 +01:00
Sergio Garcia
360c6f3c1c fix(cloudtrail): improve cloudtrail_cloudwatch_logging_enabled status extended (#1813)
Co-authored-by: sergargar <sergio@verica.io>
2023-02-01 14:08:11 +01:00
github-actions[bot]
89aab4acd5 chore(regions_update): Changes in regions for AWS services. (#1812)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-02-01 10:15:10 +01:00
Nacho Rivera
d9b3e842d9 fix(accessanalyzer): no analyzers using pydantic (#1806) 2023-01-31 13:01:54 +01:00
Sergio Garcia
3ac4dc8392 feat(scanner): Tag-based scan (#1751)
Co-authored-by: Toni de la Fuente <toni@blyx.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-01-31 12:19:29 +01:00
Nacho Rivera
0d1a5318ec feat(audit-metadata): retrieve audit metadata from execution (#1803) 2023-01-31 11:24:01 +01:00
Pepe Fagoaga
94b7a219fd chore(regions): Change feat to chore (#1805) 2023-01-31 10:32:32 +01:00
github-actions[bot]
ba3eb71abd feat(regions_update): Changes in regions for AWS services. (#1804)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-01-31 10:22:05 +01:00
Sergio Garcia
bbc9e11205 fix(ec2_securitygroup_not_used): ignore default security groups (#1800)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-30 16:51:07 +01:00
Sergio Garcia
75571e4266 fix(iam_avoid_root_usage): correct date logic (#1801) 2023-01-30 16:47:24 +01:00
Sergio Garcia
4e879271a0 fix(iam_policy_no_administrative_privileges): check only *:* permissions (#1802) 2023-01-30 16:47:09 +01:00
Nacho Rivera
552e0fefc3 fix(accessanalyzer_enabled_without_findings): fixed status findings (#1799) 2023-01-30 13:22:05 +01:00
Jose Luis Martinez
cb7439a831 feat(allowlist): AWS Lambda function support (#1793) 2023-01-30 11:30:29 +01:00
Sergio Garcia
35d6b8bbc6 chore(readme): add prowler PyPi stats (#1798) 2023-01-30 11:26:09 +01:00
Jose Luis Martinez
48b9220ffc fix(allowlist): validate allowlist for any database format (file, dynamo, s3, etc) (#1792) 2023-01-30 10:30:46 +01:00
ifduyue
5537981877 Use docs.aws.amazon.com like other aws checks, not docs.amazonaws.cn (#1790) 2023-01-30 10:29:18 +01:00
Sergio Garcia
711f24a5b2 fix(partition): add dynamic partition in CloudTrail S3 DataEvents checks (#1787)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-27 10:50:31 +01:00
Sergio Garcia
5d2b8bc8aa fix(kms): add symmetric condition to kms_cmk_rotation_enabled check (#1788)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-27 10:49:40 +01:00
github-actions[bot]
f6ea10db2d feat(regions_update): Changes in regions for AWS services. (#1786) 2023-01-27 10:17:22 +01:00
Sergio Garcia
fc38ba3acb docs(readme): correct compliance link (#1780) 2023-01-26 12:48:58 +01:00
Sergio Garcia
0830ad268f chore(release): new version 3.1.2 (#1779)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-26 12:44:43 +01:00
github-actions[bot]
e633664c2a feat(regions_update): Changes in regions for AWS services. (#1778)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-01-26 10:28:13 +01:00
Ozan-Ekinci
d4c7d9a60a docs(grammar): Improved grammar in the Documentation paragraph #HSFDPMUW (#1776) 2023-01-26 10:18:42 +01:00
dependabot[bot]
5ee0d964f3 build(deps-dev): bump coverage from 7.0.5 to 7.1.0 (#1777) 2023-01-26 10:18:00 +01:00
Sergio Garcia
ba5e0f145f fix(severity): update severities for Security Hub, GuardDuty and NACL related checks (#1775) 2023-01-25 15:03:43 +01:00
Nacho Rivera
34eb9cc063 fix(cloudtrail_multi_region_enabled.py): fixed region when no trails (#1774) 2023-01-25 14:33:24 +01:00
Sergio Garcia
a795fdc40d fix(IAM): remove duplicate list_policies function (#1763)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-25 13:58:58 +01:00
Sergio Garcia
24cba4c4ca chore(contrib): CloudFormation of CodeBuild for v3 (#1764)
Co-authored-by: sergargar <sergio@verica.io>
Co-authored-by: Toni de la Fuente <toni@blyx.com>
2023-01-25 13:57:47 +01:00
Sergio Garcia
3d13f4bb9b fix(apigatewayv2): correct apigatewayv2_access_logging_enabled check title (#1769)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-25 13:56:28 +01:00
Sergio Garcia
e713d0d321 chore(readme): update pip package name (#1768) 2023-01-25 13:55:35 +01:00
Sergio Garcia
4e34be87a1 fix(json): close Json correctly when no findings (#1773)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-25 13:54:48 +01:00
Sergio Garcia
07307d37a1 fix(iam): handle credential report errors (#1765)
Co-authored-by: sergargar <sergio@verica.io>
Co-authored-by: n4ch04 <nacho@verica.io>
2023-01-25 10:31:58 +01:00
github-actions[bot]
81463181bc feat(regions_update): Changes in regions for AWS services. (#1772)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-01-25 10:31:04 +01:00
Acknosyn
02e57927fc fix(): IAM status messages switched fail and pass text and some grammar (#1756)
Co-authored-by: Francesco Badraun <francesco.badraun@zxsecurity.co.nz>
Co-authored-by: sergargar <sergio@verica.io>
Co-authored-by: n4ch04 <nachor1992@gmail.com>
2023-01-25 10:29:04 +01:00
Sergio Garcia
36925f0dbd fix(): solve metadata replace (#1755)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-24 13:45:46 +01:00
github-actions[bot]
f9b985e03d feat(regions_update): Changes in regions for AWS services. (#1761)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-24 10:39:49 +01:00
dependabot[bot]
598ad62b92 build(deps-dev): bump moto from 4.1.0 to 4.1.1 (#1758)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-24 09:27:05 +01:00
github-actions[bot]
ea929ab713 feat(regions_update): Changes in regions for AWS services. (#1748)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-01-23 12:43:51 +01:00
Ozan-Ekinci
04e56ced58 docs: Improved grammar in the AZ CLI / Browser / Managed Identity authentication paragraph #HSFDPMUW (#1745) 2023-01-23 10:24:23 +01:00
Vaibhav Bagaria
2278565b86 Update resource type for SQS and SNS (#1747) 2023-01-23 10:22:26 +01:00
Leon
afd0c56b44 fix(docs): Changed the azure subscription file text #HSFDPMUW (#1749) 2023-01-23 09:31:34 +01:00
Sergio Garcia
5ebdf66d22 release: 3.1.1 (#1744)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-20 15:36:27 +01:00
Toni de la Fuente
177d8a72a7 docs: add mapping of v2 to v3 checks and update pip package name in docs (#1742) 2023-01-20 12:50:57 +01:00
Pepe Fagoaga
03ef80dd8e fix(actions): Exclude docs folder in action (#1743) 2023-01-20 12:50:28 +01:00
Pepe Fagoaga
6f9825362a chore(code-ql): test tool (#1703) 2023-01-20 12:31:53 +01:00
github-actions[bot]
2167154064 feat(regions_update): Changes in regions for AWS services. (#1741)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-01-20 10:24:37 +01:00
Sergio Garcia
f88b35bd80 fix(rds): remove DocumentDB from RDS (#1737)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-20 09:31:19 +01:00
Nacho Rivera
6b9520338e fix(pipeline): fixed typo in main pipeline (#1740) 2023-01-20 09:30:53 +01:00
Sergio Garcia
438c087856 fix(arguments): improve quiet option (#1723)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-20 09:14:38 +01:00
Nacho Rivera
2a43274b06 feat(dispatch): dispatch triggered actions (#1739) 2023-01-20 09:13:57 +01:00
github-actions[bot]
20a9336867 feat(regions_update): Changes in regions for AWS services. (#1736)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-01-19 12:45:35 +01:00
Sergio Garcia
c921782714 feat(allowlist): add yaml structure validator (#1735)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-18 17:49:13 +01:00
Sergio Garcia
776ac9e3d4 fix(lambda): solve lambda errors (#1732)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-18 17:47:45 +01:00
Sergio Garcia
d02bd9b717 fix(allowlist): remove re.escape (#1734)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-18 17:45:51 +01:00
Sergio Garcia
50070e8fe7 fix(IAM): add missing permissions for Prowler (#1731)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-18 11:45:37 +01:00
github-actions[bot]
e3e3b3e279 feat(regions_update): Changes in regions for AWS services. (#1730)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-01-18 11:01:46 +01:00
Pepe Fagoaga
38fba297e8 fix: remove old example (#1728) 2023-01-17 18:04:12 +01:00
Sergio Garcia
52d65ee4e8 feat(pypi): replicate PyPi package (#1727)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-17 17:53:08 +01:00
Sergio Garcia
9ad2f33dd8 fix: remove check_sample.metadata.json (#1725) 2023-01-17 14:36:00 +01:00
Sergio Garcia
02ae23b11d feat(release): add PyPi GitHub Action (#1724)
Co-authored-by: sergargar <sergio@verica.io>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-01-17 14:33:15 +01:00
Sergio Garcia
70c6d6e7ae release: 3.1.0 (#1722)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-17 13:15:07 +01:00
Sergio Garcia
8efebf992f fix(metadata): fix recommendation in iam_role_cross_service_confused_deputy_prevention check (#1721) 2023-01-17 13:11:46 +01:00
Sergio Garcia
b9be94bcc5 feat(README): add pypi downloads (#1720)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-17 13:05:44 +01:00
Sergio Garcia
e6310c32ac feat(check): add iam_role_cross_service_confused_deputy_prevention check (#1710)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-17 12:17:37 +01:00
Sergio Garcia
654b4702d0 fix(error): ecr_repositories_scan_vulnerabilities_in_latest_image report not found (#1719)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-17 12:17:15 +01:00
dependabot[bot]
262b5a7ee5 build(deps-dev): bump openapi-spec-validator from 0.5.1 to 0.5.2 (#1716)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-17 12:13:44 +01:00
Pepe Fagoaga
ef0d4fe34b fix(fill_html_overview_statistics): Handle if file exists (#1718) 2023-01-17 11:40:05 +01:00
github-actions[bot]
c08342f40c feat(regions_update): Changes in regions for AWS services. (#1717)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-01-17 10:18:40 +01:00
Pepe Fagoaga
e7796268b5 feat(only_logs): New logging flag to only show execution logs (#1708) 2023-01-17 10:13:09 +01:00
Nacho Rivera
0cbe80d2ab feat(report): conditional import (#1702)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-01-17 10:00:31 +01:00
Ozan-Ekinci
11d3ba70a0 docs: missing comma in the Service Principal authentication paragraph (#1713)
Co-authored-by: Ozan-Can Ekinci <ozan-can.ekinci1@informatik.hs-fulda>
2023-01-17 08:50:52 +01:00
dependabot[bot]
c30e4c4867 build(deps-dev): bump pytest from 7.2.0 to 7.2.1 (#1715)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-17 08:42:48 +01:00
Sergio Garcia
d1e5087c18 fix(): add permissions to Github action (#1712) 2023-01-16 16:04:57 +01:00
Gabriel Soltz
618dd442e3 Incorrect ResourceType for check ec2_elastic_ip_unassgined (#1711) 2023-01-16 14:16:35 +01:00
Sergio Garcia
7f26fdf2d0 feat(iam): add IAM Role Class (#1709)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-16 11:47:23 +01:00
Gabriel Soltz
64090474e1 fix(apigateway): Add ApiGateway ResourceArn and check fixes (#1707)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-16 10:23:14 +01:00
Leon
a69c28713a fix(docs): Include multiple commas in the troubleshooting file #HSFDPMUW (#1706) 2023-01-16 09:05:24 +01:00
Leon
1d4b3095af fix(docs): Include a new comma in the Basic Usage paragraph #HSFDPMUW (#1705) 2023-01-16 09:04:48 +01:00
Sergio Garcia
ff75125af8 fix(docs): correct permissions links (#1701) 2023-01-13 10:28:54 +01:00
Toni de la Fuente
aa0025abbe fix(quick_inventory): Prowler quick inventory for US GovCloud and China (#1698) 2023-01-12 17:40:10 +01:00
Sergio Garcia
c9436da235 fix: Solve IAM policy Errors (#1692)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-12 17:39:09 +01:00
Sergio Garcia
12f1eaace7 fix: VPC Key Error (#1695)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-12 17:35:57 +01:00
Sergio Garcia
09ef8aba0f fix(): set default region CloudWatch (#1693)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-12 17:17:40 +01:00
Toni de la Fuente
08c094b8a5 docs(SECURITY.md): Include Security Policy (#1697)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-01-12 17:16:46 +01:00
Sergio Garcia
e9fb4410cd fix(docs): Add security section and solve images location (#1696)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
Co-authored-by: Toni de la Fuente <toni@blyx.com>
2023-01-12 17:16:34 +01:00
Nacho Rivera
cbdda22a33 fix: deleted test exclusion in name loading checks (#1694) 2023-01-12 15:43:54 +01:00
Sergio Garcia
fe906477da fix(aws_regions_by_service.json): FileNotFoundError[13] (#1689)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-12 13:24:03 +01:00
dependabot[bot]
b03df619df build(deps-dev): bump coverage from 7.0.4 to 7.0.5 (#1688)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-12 11:32:41 +01:00
Sergio Garcia
53d89d8d17 fix: solve multiple errors (#1690)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-12 11:29:33 +01:00
Sergio Garcia
1e5a1f3e1f fix: remove unnecessary print (#1686)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-12 08:58:15 +01:00
Nacho Rivera
6efe2979c6 fix(): Edit troubleshooting page (#1685) 2023-01-11 11:18:37 +01:00
Sergio Garcia
92cc2c8e69 fix(config): path error in Windows environment (#1684)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-10 17:06:14 +01:00
dependabot[bot]
50dd2e4179 build(deps-dev): bump vulture from 2.6 to 2.7 (#1677)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-10 08:26:44 +01:00
dependabot[bot]
7a8fd9c3d3 build(deps-dev): bump coverage from 7.0.3 to 7.0.4 (#1678)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-10 08:15:55 +01:00
dependabot[bot]
d5a3fc490b build(deps-dev): bump moto from 4.0.13 to 4.1.0 (#1675)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-10 07:56:16 +01:00
dependabot[bot]
13f948062b build(deps-dev): bump pylint from 2.15.9 to 2.15.10 (#1676)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-10 07:43:54 +01:00
Fennerr
b965fda226 feat(ecs_task_definitions_no_environment_secrets): Update resource_id (#1665)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-09 16:05:45 +01:00
Sergio Garcia
f9d67f0e9d fix(compliance): Security Hub working with compliance (#1673)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-09 14:18:12 +01:00
Sergio Garcia
4dfa20e40b fix(Security Hub): associate resource_arn as resourceId (#1672)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-09 14:16:57 +01:00
Gabriel Soltz
d5edbaa3a9 fix(s3): Add S3 ResourceArn (#1666)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-09 11:04:09 +01:00
Leon
0cd5ce8c29 fix(docs): Include a comma in the permissions paragraph (#1668) 2023-01-09 09:52:36 +01:00
Sergio Garcia
1c50a87ca2 fix(trustedadvisor_errors_and_warnings): add region (#1662)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-05 17:57:21 +01:00
Sergio Garcia
efa83e05e4 release: 3.0.2 (#1660)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-05 14:01:24 +01:00
Fennerr
76a694d043 feat(): add ECS task revision number (#1657)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-05 13:36:32 +01:00
Fennerr
571280f0cd feat(): update recommendation of ecs_task_definitions_no_environment_secrets (#1658) 2023-01-05 13:11:05 +01:00
dependabot[bot]
c2fc01608e build(deps-dev): bump moto from 4.0.12 to 4.0.13 (#1656) 2023-01-05 08:52:19 +01:00
dependabot[bot]
2ba144843a build(deps-dev): bump coverage from 7.0.2 to 7.0.3 (#1655) 2023-01-05 07:57:49 +01:00
Sergio Garcia
458dadc9b6 fix(contrib): Update contrib folder (#1635) 2023-01-04 13:11:51 +01:00
Gabriel Soltz
6ed0c59762 feat(ec2): Add ResourceArn (#1649)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-04 11:55:58 +01:00
Sergio Garcia
54fbaa808e fix(glacier): handle no vault policy error (#1650)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-04 11:41:56 +01:00
Nacho Rivera
f0db63da35 fix(): Refresh credentials when assuming role (#1636) 2023-01-04 08:48:00 +01:00
Sergio Garcia
9b8c80b74d fix(codeartifact): set Namespace attribute as optional (#1648)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-03 16:04:40 +01:00
github-actions[bot]
0c23b6af84 feat(regions_update): Changes in regions for AWS services. (#1646) 2023-01-03 14:00:09 +01:00
Sergio Garcia
1189177079 fix: GH Action permissions (#1644) 2023-01-03 13:58:49 +01:00
Sergio Garcia
794402e92d fix: add Github Action permission (#1643)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-01-03 13:32:09 +01:00
Sergio Garcia
0de6d87af5 feat(aws-regions): update refresh regions action (#1641)
Co-authored-by: sergargar <sergio@verica.io>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-01-03 12:59:08 +01:00
dependabot[bot]
567c150eaa build(deps-dev): bump coverage from 7.0.1 to 7.0.2 (#1640) 2023-01-03 08:03:29 +01:00
Peter Dave Hello
7ea9225277 Remove additional apk update in Dockerfile (#1617) 2023-01-02 18:41:46 +01:00
Sergio Garcia
df25ead15a fix(): update pipfile.lock (#1639)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-02 17:25:07 +01:00
Nacho Rivera
5227d57a55 fix(): Delete old reqs from issue template (#1638) 2023-01-02 17:17:24 +01:00
Sergio Garcia
8db86992aa fix(outputs): apply -q to security hub (#1637)
Co-authored-by: sergargar <sergio@verica.io>
2023-01-02 15:56:49 +01:00
Nacho Rivera
79c09e613b fix(): password enabled issues in iam_user_mfa_enabled_console_access (#1634) 2023-01-02 14:08:45 +01:00
Pepe Fagoaga
99d1cea537 fix(output_filename): Use custom output filename when set (#1632) 2023-01-02 10:37:01 +01:00
Christian Clauss
98bc3f18fe docs: Fix typo in Azure documentation (#1619) 2023-01-02 08:27:44 +01:00
github-actions[bot]
b007d01057 feat(regions_update): Changes in regions for AWS services. (#1629)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2023-01-02 08:26:18 +01:00
dependabot[bot]
ea85e0824b build(deps-dev): bump coverage from 7.0.0 to 7.0.1 (#1618)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-02 08:22:49 +01:00
Toni de la Fuente
d75b48877d docs(install): Add multiple ways to install Prowler (#1627) 2023-01-02 08:09:22 +01:00
Ikko Ashimine
94bda8c17d docs(AWS-Role): fixed typo (#1610) 2022-12-26 12:06:29 +01:00
Pepe Fagoaga
f05cb2859e fix(output-filename): Handle argument (#1604) 2022-12-23 14:11:32 +01:00
Sergio Garcia
3c6254f086 feat(3.0.1): 3.0.1 release (#1601)
Co-authored-by: sergargar <sergio@verica.io>
2022-12-23 12:51:35 +01:00
Sergio Garcia
d9dc6c0a49 fix(global_services): handle global regions correctly (#1594)
Co-authored-by: sergargar <sergio@verica.io>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2022-12-23 12:32:31 +01:00
Nacho Rivera
3cfe1b8376 docs: Include Azure requirements in README (#1600) 2022-12-23 12:31:16 +01:00
Nacho Rivera
83275c5fd0 fix(send to s3): fixed send to s3 feature (#1599) 2022-12-23 11:38:42 +01:00
Pepe Fagoaga
e4698b5843 fix(check_report): Init status field and fix stats output (#1580) 2022-12-23 11:16:39 +01:00
Pepe Fagoaga
c4b134c0b5 fix(refresh-aws-regions): Change branch (#1598) 2022-12-23 10:30:44 +01:00
Sergio Garcia
5065cdb9e6 fix(sqs): Get SQS encryption (#1596)
Co-authored-by: sergargar <sergio@verica.io>
2022-12-23 10:24:10 +01:00
Sergio Garcia
f72be9a1e4 feat(errors): prettify unknown service errors (#1592)
Co-authored-by: sergargar <sergio@verica.io>
2022-12-22 17:02:28 +01:00
Sergio Garcia
a53f9eb294 fix(aws-cn partition): solve aws-cn partition errors (#1576)
Co-authored-by: sergargar <sergio@verica.io>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2022-12-22 15:39:50 +01:00
Sergio Garcia
44e0eedac2 fix(efs): handle PolicyNotFound error (#1591)
Co-authored-by: sergargar <sergio@verica.io>
2022-12-22 15:38:16 +01:00
Sergio Garcia
d894556191 fix(shub): Handle Security Hub InvalidAccessException error (#1590)
Co-authored-by: sergargar <sergio@verica.io>
2022-12-22 15:13:20 +01:00
Nacho Rivera
00cac892a7 fix(list services): Solve list services issue (#1587) 2022-12-22 15:00:08 +01:00
Sergio Garcia
167d332257 fix(vpc): endpoint policy error (#1588)
Co-authored-by: sergargar <sergio@verica.io>
2022-12-22 14:50:55 +01:00
Sergio Garcia
258abf6fe3 fix(iam): handle NoSuchEntity error (#1589)
Co-authored-by: sergargar <sergio@verica.io>
2022-12-22 14:49:41 +01:00
Sergio Garcia
451b362c52 fix(ECR): handle ECR errors that are not AccessDenied (#1586)
Co-authored-by: sergargar <sergio@verica.io>
2022-12-22 13:29:59 +01:00
Sergio Garcia
ff6b433661 fix(errors): Handle S3 errors that are not Access Denied (#1585)
Co-authored-by: sergargar <sergio@verica.io>
2022-12-22 13:26:22 +01:00
dependabot[bot]
3af2a44c70 build(deps-dev): bump pylint from 2.15.8 to 2.15.9 (#1569)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2022-12-22 13:10:21 +01:00
dependabot[bot]
7f712e4d72 build(deps-dev): bump moto from 4.0.11 to 4.0.12 (#1570)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-22 13:02:17 +01:00
Jonty Behr
28dee33e4f docs(links): Update broken links to permissions folder (#1584) 2022-12-22 12:59:04 +01:00
dependabot[bot]
2d0b503f9f build(deps-dev): bump coverage from 6.5.0 to 7.0.0 (#1568)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-22 12:51:52 +01:00
Pepe Fagoaga
b0b706e2f4 feat(dependabot): Daily check (#1582) 2022-12-22 12:34:23 +01:00
Pepe Fagoaga
0391fad32b feat(issues): Disable blank issues (#1583) 2022-12-22 12:32:19 +01:00
Pepe Fagoaga
167902616c test(credential_report): Improve credential report tests (#1579) 2022-12-22 12:20:54 +01:00
Sergio Garcia
ea42a6274b fix(logs): add check_name to logs (#1574) 2022-12-22 11:48:44 +01:00
Pepe Fagoaga
65e72d6937 fix(issue_template): Update for Prowler v3 (#1581) 2022-12-22 11:02:25 +01:00
Sergio Garcia
bb5ba8c37c fix(description): pyproject.toml description (#1567) 2022-12-21 12:08:46 +01:00
Pepe Fagoaga
f5e5921abc feat(dependabot): Automatic updates (#1564) 2022-12-21 12:02:29 +01:00
Pepe Fagoaga
80a8cfb6a6 fix(build-push): Update for 3.0 (#1563) 2022-12-21 11:47:32 +01:00
Pepe Fagoaga
4e34040e62 docs(usage): Format epilog (#1562) 2022-12-21 10:42:19 +01:00
github-actions[bot]
ba2620d91d feat(regions_update): Changes in regions for AWS services. (#1561)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-12-21 10:15:51 +01:00
Pepe Fagoaga
c2ae4a5efd docs(README): Chame img relative paths to permalinks (#1560) 2022-12-21 09:25:20 +01:00
Toni de la Fuente
62c1ce73bb feat(docs): added AWS CloudShell and rename FAQ to Troubleshooting (#1559) 2022-12-21 08:39:07 +01:00
Sergio Garcia
bab6380d68 fix: Refactor Outputs (#1548) 2022-12-20 18:23:30 +01:00
github-actions[bot]
9502355d22 feat(regions_update): Changes in regions for AWS services. (#1557)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-12-20 13:09:12 +01:00
Pepe Fagoaga
a82d9591ab fix(Dockerfile): Build from source (#1555)
Co-authored-by: sergargar <sergio@verica.io>
2022-12-20 13:08:53 +01:00
Pepe Fagoaga
d8fe11f393 docs(AWS-Role): Include section and remove CLI (#1556)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2022-12-20 13:01:26 +01:00
Toni de la Fuente
df5963082c docs: Add multiaccount scan in docs (#1554) 2022-12-20 11:47:52 +01:00
Toni de la Fuente
c3980e4f27 docs: General changes (#1552)
Co-authored-by: Sergio Garcia <sergio@verica.io>
2022-12-19 18:29:26 +01:00
Toni de la Fuente
a7155300d3 update(docs): update compliance and links (#1551)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2022-12-19 17:00:33 +01:00
Pepe Fagoaga
b622fe7229 feat(HTML): Fix layout and include stats (#1549) 2022-12-19 14:34:41 +01:00
Sergio Garcia
2ddf3c8881 feat(docs): add Powler config.yaml information to docs (#1546)
Co-authored-by: sergargar <sergio@verica.io>
2022-12-19 14:27:25 +01:00
Pepe Fagoaga
38ba009794 delete: Old Dockerfile (#1550) 2022-12-19 14:23:16 +01:00
Pepe Fagoaga
a55649b3e1 feat(outputs): Unify classes to generate outputs dynamically based on the provider (#1545)
Co-authored-by: n4ch04 <nachor1992@gmail.com>
Co-authored-by: sergargar <sergio@verica.io>
2022-12-19 13:03:04 +01:00
github-actions[bot]
fdf80ed89d feat(regions_update): Changes in regions for AWS services. (#1544) 2022-12-16 12:20:44 +01:00
Pepe Fagoaga
2da27d59b6 fix: Release fixes (#1543) 2022-12-15 15:16:29 +01:00
Sergio Garcia
b67e718412 feat(config): add comments to config (#1542)
Co-authored-by: sergargar <sergio@verica.io>
2022-12-15 10:41:21 +01:00
github-actions[bot]
b05286f455 feat(regions_update): Changes in regions for AWS services. (#1541)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-12-15 10:22:37 +01:00
Pepe Fagoaga
2a5f032a52 feat(args): Global and provider-specific arguments (#1540) 2022-12-14 17:39:05 +01:00
github-actions[bot]
27a79d9c8c feat(regions_update): Changes in regions for AWS services. (#1524) 2022-12-14 15:06:02 +01:00
Nacho Rivera
7ff72c048a feat(Audit_Info): Unifying import set audit info for different providers (#1538) 2022-12-14 11:34:14 +01:00
Sergio Garcia
388c0b2b9f feat(parse_regions): Add AWS regions parser && Dockerfile (#1537) 2022-12-13 19:00:43 +01:00
Sergio Garcia
bb09267f2a feat(pip): Prepare for PyPI (#1531) 2022-12-13 09:07:55 +01:00
Sergio Garcia
0cd13b90f4 feat(docs): Add compliance and inventory docs (#1534) 2022-12-12 17:20:45 +01:00
Sergio Garcia
fbb39a364e feat(quick_inventory): add quick inventory (#1533)
Co-authored-by: sergargar <sergio@verica.io>
2022-12-07 19:02:05 +01:00
Sergio Garcia
7bffe6b2d5 fix(html): fix error html generator (#1530)
Co-authored-by: sergargar <sergio@verica.io>
Co-authored-by: Toni de la Fuente <toni@blyx.com>
2022-12-07 13:04:38 +01:00
Sergio Garcia
df4b89366c feat(docs): add new docs and readme (#1529)
Co-authored-by: sergargar <sergio@verica.io>
Co-authored-by: n4ch04 <nachor1992@gmail.com>
2022-12-07 12:08:30 +01:00
Sergio Garcia
05075d6508 feat(cis_ouput): add csv output and table (#1532)
Co-authored-by: sergargar <sergio@verica.io>
2022-12-07 12:06:28 +01:00
Nacho Rivera
5e40d93d63 feat(Azure): Include multiple authentication (#1528) 2022-12-02 09:20:56 +01:00
Pepe Fagoaga
c2f5177afa fix(list-groups): Delete option (#1527) 2022-11-29 16:51:06 +01:00
Nacho Rivera
e5e01e51a9 feat(azure): subscription as parameter (#1526) 2022-11-29 13:46:38 +01:00
Sergio Garcia
8f802f1241 feat(html): add html output (#1525)
Co-authored-by: sergargar <sergio@verica.io>
2022-11-29 13:44:52 +01:00
Pepe Fagoaga
a54372e05e feat(categories): Remove old groups and use categories from metadata (#1523) 2022-11-29 11:09:50 +01:00
Nacho Rivera
f964439a15 fix(Pipfile): pipfile azure packages from dev to general (#1522) 2022-11-28 13:25:00 +01:00
github-actions[bot]
309c1e004b feat(regions_update): Changes in regions for AWS services. (#1516)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-11-28 12:19:02 +01:00
Pepe Fagoaga
9d91250f05 fix(globalaccelerator): Region must be us-west-2 (#1518) 2022-11-28 12:12:49 +01:00
Pepe Fagoaga
1f7262aaaa fix(route53domains): Set us-east-1 as region (#1521) 2022-11-28 12:12:20 +01:00
Nacho Rivera
9a5e433489 fix(outputs): Table and Azure metadata (#1520) 2022-11-28 11:16:13 +01:00
Pepe Fagoaga
d1f5d58eeb fix(directoryservice): Use ID instead of Name (#1519) 2022-11-28 11:08:52 +01:00
Nacho Rivera
e3d118f5bc feat(): Azure provider and checks (#1517)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2022-11-28 10:07:25 +01:00
Pepe Fagoaga
1a11f5777a fix(compliance): List Compliance Requirements (#1514) 2022-11-23 17:53:49 +01:00
Pepe Fagoaga
b3e57ca3e5 feat(compliance): Loader and Execute (#1465) 2022-11-23 15:53:53 +01:00
github-actions[bot]
1a70a45805 feat(regions_update): Changes in regions for AWS services. (#1508) 2022-11-23 15:11:22 +01:00
Sergio Garcia
989638a42d feat(RDS): Service and missing checks (#1513) 2022-11-23 14:34:51 +01:00
Sergio Garcia
9204142eaf feat(display): add progress bar and summary table (#1512)
Co-authored-by: sergargar <sergio@verica.io>
2022-11-22 11:18:43 +01:00
alexr3y
af1d85ae75 feat(compliance): ENS RD2022 first draft and json converter (#1502) 2022-11-21 12:13:24 +01:00
Toni de la Fuente
25d92ca4b0 feat(CIS): Compliance for CIS AWS 1.4 and 1.5 (#1509) 2022-11-21 11:30:21 +01:00
Sergio Garcia
52a3e990c6 feat(shield): Service and checks (#1504) 2022-11-21 10:18:54 +01:00
Pepe Fagoaga
1370e0dec4 fix(directoryservice): Errors related to the DS Type (#1506) 2022-11-21 09:59:37 +01:00
github-actions[bot]
f99a89eae2 feat(regions_update): Changes in regions for AWS services. (#1484)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-11-21 07:54:13 +01:00
Pepe Fagoaga
9954763356 feat(Lambda): Service and checks (#1491) 2022-11-17 22:59:28 +01:00
Nacho Rivera
538496ed6b feat(): workspace service and checks (#1503) 2022-11-17 22:59:14 +01:00
Nacho Rivera
7d80a9d048 feat(): ECS service and checks (#1476)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
Co-authored-by: sergargar <sergio@verica.io>
2022-11-17 22:54:38 +01:00
Nacho Rivera
a0ef56f245 feat(): sqs service and checks (#1501) 2022-11-17 22:51:36 +01:00
Sergio Garcia
e016fb2d6b feat(TrustedAvisor): add TrustedAvisor tests and checks (#1498)
Co-authored-by: sergargar <sergio@verica.io>
2022-11-17 22:36:06 +01:00
Sergio Garcia
62081cb399 feat(ec2): add extra7124 (#1500)
Co-authored-by: sergargar <sergio@verica.io>
2022-11-17 22:34:56 +01:00
Sergio Garcia
bfc8c90abb feat(Glue): add Glue tests and checks (#1495)
Co-authored-by: sergargar <sergio@verica.io>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2022-11-17 21:06:15 +01:00
Sergio Garcia
967990b76d feat(EC2): add EC2 tests and checks (#1482)
Co-authored-by: sergargar <sergio@verica.io>
2022-11-17 21:01:47 +01:00
Pepe Fagoaga
6ff9f30473 feat(ssm): Service and checks (#1496) 2022-11-17 20:59:55 +01:00
Nacho Rivera
025b0547cd feat(): redshift service and checks (#1497)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2022-11-17 20:50:30 +01:00
Sergio Garcia
3370475fe9 feat(ELB): add ELB and ELBv2 tests and checks (#1489)
Co-authored-by: sergargar <sergio@verica.io>
2022-11-17 20:30:27 +01:00
Pepe Fagoaga
12896cceaa feat(Route53): Service and checks (#1493)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2022-11-17 19:57:20 +01:00
Nacho Rivera
62ffe26b42 feat(): sns checks and services (#1494)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2022-11-17 19:45:41 +01:00
Nacho Rivera
c83c4d0892 feat(): ECR service and checks (#1475)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
Co-authored-by: sergargar <sergio@verica.io>
2022-11-17 19:41:03 +01:00
Nacho Rivera
9ff9b68d91 feat(): guardduty checks and service (#1492) 2022-11-17 19:29:36 +01:00
Nacho Rivera
daa299c7a6 feat(): Sagemaker service and checks (#1490)
Co-authored-by: sergargar <sergio@verica.io>
2022-11-17 12:56:36 +01:00
Nacho Rivera
67b5de205b feat(): EKS service and checks (#1479)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
Co-authored-by: sergargar <sergio@verica.io>
2022-11-17 11:50:13 +01:00
Nacho Rivera
5a9c064943 feat(): opensearch service and checks (#1487)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2022-11-17 11:48:18 +01:00
Pepe Fagoaga
24ca19d502 feat(EMR): Service and checks (#1486)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2022-11-17 11:31:20 +01:00
Pepe Fagoaga
d2d2c75967 feat(directoryservice): Service and checks (#1477) 2022-11-17 11:16:36 +01:00
Pepe Fagoaga
684b7fe0b8 feat(secretsmanager): Service and check (#1483) 2022-11-16 10:23:05 +01:00
Pepe Fagoaga
2c5320a0b0 feat(CloudFront): Service and Checks (#1470) 2022-11-16 10:21:43 +01:00
Pepe Fagoaga
30738d7810 feat(Glacier): Service and check (#1480) 2022-11-15 17:41:58 +01:00
Sergio Garcia
5281d521f4 feat(DynamoDB): add DynamoDB service and checks (#1468)
Co-authored-by: sergargar <sergio@verica.io>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2022-11-15 14:21:09 +01:00
github-actions[bot]
58bdbadb11 feat(regions_update): Changes in regions for AWS services. (#1478) 2022-11-15 11:16:28 +01:00
github-actions[bot]
e9b2f1d2fb feat(regions_update): Changes in regions for AWS services. (#1466)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-11-14 17:54:46 +01:00
Sergio Garcia
8c8763a620 feat(CIS checks): Complete CIS checks (#1461)
Co-authored-by: sergargar <sergio@verica.io>
Co-authored-by: Nacho Rivera <59198746+n4ch04@users.noreply.github.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2022-11-14 17:50:26 +01:00
Pepe Fagoaga
6497f7bfe8 fix(codebuild_project_user_controlled_buildspec): regex (#1474) 2022-11-14 17:35:23 +01:00
Pepe Fagoaga
9b035230ac feat(CodeArtifact): Service and checks (#1473) 2022-11-14 16:28:00 +01:00
Pepe Fagoaga
9d3bff9e54 fix: Linter issues (#1471)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2022-11-14 16:21:51 +01:00
Nacho Rivera
3b86b3ac77 feat(codebuild): codebuild service and checks (#1467) 2022-11-14 15:09:56 +01:00
Nacho Rivera
c87327bb77 feat(EFS): Service and checks (#1469)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
Co-authored-by: sergargar <sergio@verica.io>
2022-11-14 15:05:41 +01:00
github-actions[bot]
c9880b953f feat(regions_update): Changes in regions for AWS services. (#1457) 2022-11-10 18:13:20 +01:00
Sergio Garcia
b187bf12c2 feat(CloudWatch): add CloudWatch service and checks (#1456)
Co-authored-by: sergargar <sergio@verica.io>
Co-authored-by: Nacho Rivera <59198746+n4ch04@users.noreply.github.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2022-11-10 13:29:46 +01:00
Sergio Garcia
19ab29628f feat(S3): add S3 service and checks (#1450)
Co-authored-by: sergargar <sergio@verica.io>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2022-11-08 18:06:06 +01:00
github-actions[bot]
bbecd505eb feat(regions_update): Changes in regions for AWS services. (#1453) 2022-11-08 12:26:57 +01:00
Pepe Fagoaga
69d3a9e363 feat(cloudformation): Service and Checks (#1454)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2022-11-07 16:17:38 +01:00
Pepe Fagoaga
f5873fe0d7 feat(appstream): Service and Checks (#1452) 2022-11-07 16:16:58 +01:00
Nacho Rivera
4762e1cc4c feat(test): Remaining IAM tests (#1451) 2022-11-04 13:38:22 +01:00
Nacho Rivera
8ae989cce8 feat(cloudtrail): cloudtrail service and checks (#1449)
Co-authored-by: sergargar <sergio@verica.io>
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2022-11-03 15:39:41 +01:00
Sergio Garcia
c6adf3a6d8 feat(account): Aaccount service and manual checks (#1446)
Co-authored-by: sergargar <sergio@verica.io>
2022-11-02 11:36:57 +01:00
Pepe Fagoaga
976e07c125 feat(services): Sort services alphabetically (#1443) 2022-10-31 15:06:01 +01:00
Sergio Garcia
7c1dc1c977 feat(count): add number of services and checks (#1442) 2022-10-31 14:49:54 +01:00
Sergio Garcia
3e749dd652 feat(config): add config service and checks and check43 (#1441)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2022-10-31 14:37:59 +01:00
Sergio Garcia
adf04ba632 feat(apigateway): Service and checks for APIGW v1 and v2 (#1415) 2022-10-31 14:13:11 +01:00
Sergio Garcia
f7842fdcdd feat(kms): add service, checks and tests (#1439) 2022-10-28 12:30:34 +02:00
Sergio Garcia
b2976984d3 feat(vpc): add service, checks and tests (#1432) 2022-10-28 12:15:15 +02:00
Sergio Garcia
7e1b0d13c7 feat(autoscaling): Add AutoScaling service, check and test (#1426) 2022-10-28 09:33:29 +02:00
Pepe Fagoaga
8487777f96 fix(typo): FPT -> FTP (#1431) 2022-10-26 08:57:45 +02:00
Nacho Rivera
2d86254549 fix(allowlist): allowlist file default value (#1425)
Co-authored-by: sergargar <sergio@verica.io>
2022-10-24 09:29:24 +02:00
github-actions[bot]
e77486f771 feat(regions_update): Changes in regions for AWS services. (#1424) 2022-10-24 09:14:28 +02:00
Sergio Garcia
53f8a9698f feat(allowlist): Add Allowlist feature (#1395) 2022-10-21 11:33:23 +02:00
Sergio Garcia
bd6eb723dd feat(ACM): Add check and service for ACM (#1365) 2022-10-20 17:17:12 +02:00
Sergio Garcia
5c78e6b171 feat(line_no): Add line number to errors (#1422) 2022-10-20 14:32:35 +02:00
github-actions[bot]
44ce95979b feat(regions_update): Changes in regions for AWS services. (#1421) 2022-10-20 11:54:22 +02:00
Nacho Rivera
44ce00d6e9 fix(iam_user_two_active_access_key_test): fix tests (#1418) 2022-10-20 08:34:28 +02:00
Nacho Rivera
df0925394b feat(extra7100): Migrate check extra7100 -> iam_no_custom_policy_permissive_role_assumption (#1417) 2022-10-20 08:10:54 +02:00
Sergio Garcia
5b5b0b0405 feat(securityhub_check): Add check and service for SecurityHub (#1360)
Co-authored-by: Toni de la Fuente <toni@blyx.com>
Co-authored-by: sergargar <sergio@verica.io>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2022-10-19 15:21:07 +02:00
github-actions[bot]
6e73321a95 feat(regions_update): Changes in regions for AWS services. (#1416) 2022-10-19 12:11:28 +02:00
Nacho Rivera
d09020d144 feat(iam): Add IAM checks (#1407)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2022-10-19 09:51:25 +02:00
Nacho Rivera
e2a8fa8738 feat(iam_check_saml_providers_sts): Check and test (#1413) 2022-10-18 13:23:50 +02:00
Toni de la Fuente
1119ee54af feat(accessanalyzer): Check accessanalyzer_enabled_without_findings (#1359)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2022-10-18 12:26:42 +02:00
github-actions[bot]
e6cd7c838f feat(regions_update): Changes in regions for AWS services. (#1414)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-10-18 12:21:39 +02:00
Nacho Rivera
2b59068e50 feat(password_policy_checks): Include password policy checks (#1364) 2022-10-18 10:15:15 +02:00
github-actions[bot]
5cc3888022 feat(regions_update): Changes in regions for AWS services. (#1406)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-10-17 08:09:53 +02:00
github-actions[bot]
78975c286a feat(regions_update): Changes in regions for AWS services. (#1404)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-10-14 11:20:08 +02:00
github-actions[bot]
7a40d9c44b feat(regions_update): Changes in regions for AWS services. (#1392)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-10-07 11:57:42 +02:00
github-actions[bot]
460b71e3d9 feat(regions_update): Changes in regions for AWS services. (#1387)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-10-06 11:08:26 +02:00
Sergio Garcia
107070e6e2 feat(shodan_integration): add ec2_elastic_ip_shodan check and config yaml (#1356)
Co-authored-by: sergargar <sergio@verica.io>
2022-10-05 13:48:34 +02:00
github-actions[bot]
fb176f56d0 feat(regions_update): Changes in regions for AWS services. (#1378)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-09-30 11:11:07 +02:00
github-actions[bot]
f67dc57384 feat(regions_update): Changes in regions for AWS services. (#1373)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-09-22 11:08:50 +02:00
github-actions[bot]
dc7c0cd981 feat(regions_update): Changes in regions for AWS services. (#1371)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-09-16 11:07:52 +02:00
github-actions[bot]
5cda2ad19f feat(regions_update): Changes in regions for AWS services. (#1367)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-09-15 12:10:27 +02:00
github-actions[bot]
470b2ae369 feat(regions_update): Changes in regions for AWS services. (#1366)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-09-13 11:07:28 +02:00
github-actions[bot]
14ee08ce6d feat(regions_update): Changes in regions for AWS services. (#1363)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-09-09 13:55:50 +02:00
github-actions[bot]
c85b2567f7 feat(regions_update): Changes in regions for AWS services. (#1361) 2022-09-08 14:22:34 +02:00
github-actions[bot]
ef110128f2 feat(regions_update): Changes in regions for AWS services. (#1358) 2022-09-05 10:42:50 +02:00
github-actions[bot]
1fc249e772 feat(regions_update): Changes in regions for AWS services. (#1355)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-09-01 16:59:34 +02:00
Pepe Fagoaga
7388cb33d4 test(iam_user_two_active_access_key_test): Create unit tests (#1354)
Co-authored-by: sergargar <sergio@verica.io>
2022-09-01 13:35:00 +02:00
Sergio Garcia
f40c8f2dc5 feat(output-bucket-no-assume): add -D flag (#1353)
Co-authored-by: sergargar <sergio@verica.io>
2022-08-31 16:40:59 +02:00
Sergio Garcia
eb914d03ce feat(services_testing): Add tests for EC2, IAM and S3 services (#1352)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
Co-authored-by: sergargar <sergio@verica.io>
2022-08-31 13:40:28 +02:00
StylusFrost
e087f2e1b6 fix(check_network_acl): check with all rules together (#1350) 2022-08-30 13:58:50 +01:00
github-actions[bot]
f0c24d5152 feat(regions_update): Changes in regions for AWS services. (#1351)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-08-30 11:12:01 +02:00
Sergio Garcia
44f514f02c feat(s3_output): send outputs to S3 bucket (#1343) 2022-08-29 08:43:34 +02:00
Sergio Garcia
a63c42f59c feat(custom_filename): custom output filename (#1345)
* feat(s3_output): send outputs to S3 bucket

* feat(custom_filename): custom output filename

Co-authored-by: sergargar <sergio@verica.io>
2022-08-26 13:08:34 +02:00
Sergio Garcia
65185943ca feat(shub_compatibility): send finding to filter regions and change checkType to list (#1341) 2022-08-26 11:24:12 +01:00
github-actions[bot]
de1f707434 feat(regions_update): Update regions for AWS services. (#1349)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-08-26 12:01:53 +02:00
github-actions[bot]
0d0e00a8bd feat(regions_update): Update regions for AWS services. (#1344)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-08-25 11:48:40 +02:00
Sergio Garcia
5054b82030 feat(api_banner): remove API region from banner (#1342)
Co-authored-by: sergargar <sergio@verica.io>
2022-08-25 08:06:03 +02:00
Nacho Rivera
182d0381c3 chore(tests): Add tests to output generation (#1340)
* chore(tests): added tests to outputs

* fix(timestamp): change timestamp coming from config
2022-08-23 11:51:40 +02:00
Sergio Garcia
fb0429b2a5 fix(mkdir_security-hub): mkdir when using security-hub (#1339)
Co-authored-by: sergargar <sergio@verica.io>
2022-08-22 12:26:40 +02:00
Pepe Fagoaga
c7a43b09ce chore: Move shared to lib/ for AWS (#1321)
* chore: Move shared to lib/

* chore: Move shared to lib/ for AWS

Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2022-08-22 10:41:09 +01:00
Sergio Garcia
d18b430c16 feat(new_checks): add check for ec2 and iam (#1337)
* fix(key_error): remove KeyError.

* feat(ftp_check): add ec2_securitygroup_allow_ingress_from_internet_to_tcp_ftp_port_20_21 check.

* feat(password_check): iam_password_policy_expires_passwords_within_15_days_or_less added.

* change days to 90

Co-authored-by: sergargar <sergio@verica.io>
2022-08-22 10:33:43 +02:00
Sergio Garcia
9b4415f7b3 fix(s3_regions): verify if there are filter regions (#1338)
Co-authored-by: sergargar <sergio@verica.io>
2022-08-22 10:30:26 +02:00
github-actions[bot]
6c36c599a5 feat(regions_update): Update regions for AWS services. (#1336)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-08-22 08:11:05 +01:00
github-actions[bot]
a6fb000266 feat(regions_update): Update regions for AWS services. (#1325) 2022-08-18 12:47:45 +01:00
Sergio Garcia
92024e2b0e feat(iam_password_policy): add password policy class. (#1330)
Co-authored-by: sergargar <sergio@verica.io>
2022-08-09 09:08:00 -07:00
Sergio Garcia
b229c01450 fix(key_error): remove KeyError. (#1326) 2022-08-08 22:26:50 +02:00
Sergio Garcia
15867d3ef6 fix(version): Update version to beta (#1327) 2022-08-08 22:24:03 +02:00
github-actions[bot]
5abd7817af feat(regions_update): Update regions for AWS services. (#1324)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-08-05 11:19:45 +02:00
Pepe Fagoaga
fa0fdbf0d1 fix(output): No resources (#1320) 2022-08-04 18:46:03 +02:00
Pepe Fagoaga
f30245bb15 fix(nacls): Handle IPv6 source ingress (#1319) 2022-08-04 16:33:16 +02:00
Pepe Fagoaga
bc5df671dd feat(check): handle errors (#1318) 2022-08-04 16:09:30 +02:00
Sergio Garcia
a796545da5 feat(regions): add regions to resources (#1285) 2022-08-04 13:35:13 +02:00
Pepe Fagoaga
6e58991986 fix(time_comparison): Correct time formats (#1317) 2022-08-04 11:41:54 +02:00
Pepe Fagoaga
85a6634a56 feat(check): iam-policy-allows-privilege-escalation (#1315)
* feat(check): iam-policy-allows-privilege-escalation

* feat(metadata): Enrich check metadata

Co-authored-by: Toni de la Fuente <toni@blyx.com>

Co-authored-by: Toni de la Fuente <toni@blyx.com>
2022-08-04 11:26:42 +02:00
Pepe Fagoaga
5541ec0763 fix(ec2_instance_public_ip): format resource_id (#1316) 2022-08-04 11:22:50 +02:00
github-actions[bot]
a9aabd0082 feat(regions_update): Update regions for AWS services. (#1314)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-08-04 11:04:42 +02:00
Pepe Fagoaga
cbd375f5d0 fix(iam): Set user's region in findings (#1312) 2022-08-04 10:04:00 +02:00
Pepe Fagoaga
de96894a4d feat(metadata): Include EC2 subservices (#1311) 2022-08-03 17:29:43 +02:00
Pepe Fagoaga
5e40fc28c9 feat(output): Report generation data, color legend and assumed role information (#1300)
* feat(color-code): include legend

* chore(version): alfa -> alpha

* chore: remove comments

* feat(credentials): Include report generation data
2022-08-03 17:09:38 +02:00
Pepe Fagoaga
0b34940e20 feat(output): Include tab for better reading (#1310) 2022-08-03 16:55:11 +02:00
Pepe Fagoaga
f93dfe5e78 feat(version): Include -V (#1309) 2022-08-03 16:45:57 +02:00
Pepe Fagoaga
b59042d9e9 fix(check_name): Remove check_name (#1307) 2022-08-03 16:38:53 +02:00
Pepe Fagoaga
0c2ed53c54 refactor(security_groups): general function (#1306) 2022-08-03 16:38:29 +02:00
Pepe Fagoaga
fe474ae9df chore: change default log level (#1303) 2022-08-03 12:21:10 +02:00
Pepe Fagoaga
6f0d42a881 fix: Sort checks (#1302)
* fix: sort checks

* fix(metadata): Include missing provider
2022-08-03 12:14:23 +02:00
Pepe Fagoaga
5e479a5050 Prwlr 750 exclude metadata json order (#1301)
* chore: exclude metadata

* chore: exclude metadata

* chore: no prettify

* chore: no prettify
2022-08-03 12:07:36 +02:00
Pepe Fagoaga
dfbc618d44 chore(metadata): Remove CheckName and CheckAlias field (#1299) 2022-08-03 10:12:34 +02:00
Pepe Fagoaga
9f82a8a6d6 feat(provider): Set AWS as the default provider (#1298) 2022-08-02 13:43:42 +02:00
github-actions[bot]
476d93b33e feat(regions_update): Update regions for AWS services. (#1295) 2022-08-02 11:46:12 +02:00
github-actions[bot]
9895f9f595 feat(regions_update): Update regions for AWS services. (#1292) 2022-08-02 09:05:47 +02:00
github-actions[bot]
510cca6b29 feat(regions_update): Update regions for AWS services. (#1288)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-07-28 13:30:51 -04:00
Sergio Garcia
66d2b7b4d9 feat(ec2_checks): add several checks for ec2 (#1268)
* feat(checks): add extra718

* feat(checks): add extra763

* feat(checks): add extra748, extra749, extra72

* feat(checks): add extra750

* feat(checks): add check45

* feat(checks): add check46, check45, check42, check41

* feat(metadata_sample): add sample of check metadata

* feat(pci-group): add pci group.

* feat(cloud9): environment setup.

* fix(protocol): add protocol conditions

Co-authored-by: sergargar <sergio@verica.io>
2022-07-27 00:21:40 +02:00
Sergio Garcia
da76f69e51 feat(s3_checks): add several checks for s3 (#1266)
* feat(checks): add extra718

* feat(checks): add extra763

Co-authored-by: sergargar <sergio@verica.io>
2022-07-25 19:45:31 +02:00
Sergio Garcia
ed1572d2d9 feat(iam_checks): add several checks for iam (#1264)
* feat(extra71): add iam_administrator_access_with_mfa check.

* feat(checks): add extra7125 and extra7123

* feat(checks): add check14

* feat(checks): add check112

* feat(checks): add check11

* feat(checks): add check114 and check113

* feat(checks): add check12

* feat(classes): add IAM classess.

* Update iam_root_hardware_mfa_enabled.py

* fix(comments): Resolve comments.

Co-authored-by: sergargar <sergio@verica.io>
2022-07-22 12:14:49 +02:00
Sergio Garcia
7d0a95e98f feat(shub): add Security Hub integration (#1255) 2022-07-21 12:22:56 +02:00
github-actions[bot]
67834c3f8b feat(regions_update): Update regions for AWS services. (#1273) 2022-07-21 11:27:54 +02:00
github-actions[bot]
a5e58ad9ce feat(regions_update): Update regions for AWS services. (#1267) 2022-07-15 11:15:17 +02:00
github-actions[bot]
5cb363c389 feat(regions_update): Update regions for AWS services. (#1263) 2022-07-13 16:21:26 +02:00
github-actions[bot]
b80c7222ea feat(regions_update): Update regions for AWS services. (#1256) 2022-07-08 11:04:50 +02:00
Sergio Garcia
611bd909ef feat(json-asff): add json-asff ouput (#1252)
* feat(json): add json output

* feat(pydantic): add pydantic model to json output

* feat(json-asff): add json-asff ouput

* Update config/config.py

Co-authored-by: Pepe Fagoaga <pepe@verica.io>

* Update models.py

* fix(comments): Resolve comments.

Co-authored-by: sergargar <sergio@verica.io>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2022-07-08 09:37:32 +02:00
Sergio Garcia
db3de2d69e feat(sort_exec): Sort checks execution (#1253)
Co-authored-by: sergargar <sergio@verica.io>
2022-07-07 09:12:15 +02:00
Sergio Garcia
7b9fae5605 feat(json): add json output (#1251)
* feat(json): add json output

* feat(pydantic): add pydantic model to json output

Co-authored-by: sergargar <sergio@verica.io>
2022-07-06 14:35:15 +02:00
Sergio Garcia
d47bb09b2a feat(organizations): Extract Metadata from Management Account ID (-O) (#1248)
* feat(organizations): add organizations funtion to provider

* feat(organizations): add organizations -O option

* fix(comments): Resolve comments.

* feat(test): add test

* fix(pipfile): update pipfile

Co-authored-by: sergargar <sergio@verica.io>
2022-07-05 12:00:14 +02:00
Pepe Fagoaga
b2899bda69 test(aws-provider): First tests (#1231)
* test(pre-commit): Include security checks

* test(pre-commit): Include dependencies

* test(aws-provider): First unit tests

* test(arn-parsing): Include first tests

* chore(providers): Remove old comments
2022-07-04 12:51:31 +02:00
Nacho Rivera
11652838e2 feat(outputS): Output generation format CSV (#1230)
* chore(csv): first version csv output

* chore(pytest): added pytest dependency

* chore(outputs): organizations demo

* chore(compliance): Added new dataclass for each compliance framework

* fix(test org values): deleted test values in orgs instantiation

* fix(csv): formatted to match output format

* fix(csv output): Reformulation of check report and minor changes

* fix(minor issues): Fix various issues coming from PR comments

* fix(csv): Renamed csv output data model

* fix(output dir): create default if not present

* fix(typo): remove s

* fix(oldcode)

* fix(typo)

* fix(output): Only send to csv when -M is passed

Co-authored-by: sergargar <sergio@verica.io>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2022-07-04 10:30:47 +02:00
github-actions[bot]
a1dcc1310a feat(regions_update): Update regions for AWS services. (#1246)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-07-01 11:11:58 +02:00
github-actions[bot]
7e2303a732 feat(regions_update): Update regions for AWS services. (#1243)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-06-30 11:12:07 +02:00
github-actions[bot]
0d7214a4a6 feat(regions_update): Update regions for AWS services. (#1241)
Co-authored-by: jfagoagas <jfagoagas@users.noreply.github.com>
2022-06-29 12:54:23 +02:00
github-actions[bot]
cbd23c7fb1 feat(regions_update): Update regions for AWS services. (#1234) 2022-06-28 09:07:57 +02:00
Sergio Garcia
a2b40caeda feat(default_regions): Set profile region as default for global regions. (#1228)
Co-authored-by: sergargar <sergio@verica.io>
2022-06-23 17:28:01 +02:00
Pepe Fagoaga
66d57a3d36 feat(severity): Run checks by severity (#1223) 2022-06-23 16:56:06 +02:00
Pepe Fagoaga
2288702d26 feat(list-services): List Prowler available services by provider (#1222) 2022-06-23 16:53:44 +02:00
github-actions[bot]
cdbf62a9e5 feat(regions_update): Update regions for AWS services. (#1226) 2022-06-23 11:20:11 +02:00
Sergio Garcia
25dc6c4a20 feat(refresh_aws_regions): Auto refresh of AWS regions for services. (#1221)
* feat(refresh_aws_regions): Auto refresh of AWS regions for services.

* Update refresh_aws_services_regions.yml

* Delete aws_regions_by_service.json

* Update refresh_aws_services_regions.yml

Co-authored-by: sergargar <sergio@verica.io>
2022-06-23 10:47:43 +02:00
Pepe Fagoaga
af2bdc37ea fix(quit): Replace with sys.exit() (#1220) 2022-06-22 16:48:10 +02:00
Pepe Fagoaga
438ef9f348 feat(logger): Logs to file with custom log level (#1217) 2022-06-22 13:26:29 +02:00
Pepe Fagoaga
6ac6ef359f feat(validate-metadata): Validate Check's metadata and list checks (#1215) 2022-06-22 10:12:55 +02:00
Pepe Fagoaga
b07b7f3f26 feat(list-groups): List available groups (#1213) 2022-06-22 09:59:48 +02:00
Sergio Garcia
ecefda11c7 feat(quiet): Add -q option. (#1211)
Co-authored-by: sergargar <sergio@verica.io>
2022-06-22 09:45:03 +02:00
Pepe Fagoaga
21f8f56c18 feat(exclude-groups-and-services) (#1205) 2022-06-21 08:05:32 +02:00
Nacho Rivera
e52ab12696 feat(global_aws_session): Global data structure for the current AWS audit (#1212)
* fix(audit info): Common data structure for current audit

* fix(iam): iam session audit fixed

* feat(aws_session): Include else block

Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2022-06-21 07:53:49 +02:00
Sergio Garcia
b89b883741 feat(regions): Filter Audited Regions (-f) (#1202)
* feat(filter-regions): Added -f and ebs encryption check.

* feat(filter-regions): Added -f and ebs encryption check.

* feat(regional_clients): add regional_clients.

* fix(global variables): created global variables

* chore(role option): Mixed -A/-R option including error handling

* fix(arn): import errors from error.py file

* fix(review_comments): Review PR comments.

Co-authored-by: sergargar <sergio@verica.io>
Co-authored-by: n4ch04 <nachor1992@gmail.com>
2022-06-20 11:25:26 +02:00
Pepe Fagoaga
f694a6d12a feat(groups): Launch specific checks from groups and services (#1204) 2022-06-16 13:27:25 +02:00
Pepe Fagoaga
8abcc5988d feat(checks): Exclude checks with -e/--exclude-checks
* feat(checks): Select checks to run

* feat(checks): Include tests

* feat(checks): Exclude checks with -e

* fix(checks): Include missing path

* fix(checks): Include comments
2022-06-16 12:57:36 +02:00
Pepe Fagoaga
9d5e43e6a2 feat(checks): Select checks to run from provider using -C/--checks-file (#1200) 2022-06-16 12:49:55 +02:00
Pepe Fagoaga
162852634e feat(checks): Select checks to run from provider using -c/--checks (#1197)
* feat(checks): Select checks to run

* Update providers/aws/services/iam/iam_disable_30_days_credentials/iam_disable_30_days_credentials.py

Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2022-06-16 12:20:03 +02:00
Nacho Rivera
33c6801501 feat(core): AWS Role Assumption support (#1199)
* chore(assuming role): assume role logic and exceptions demo

* chore(exceptions): Exception handling

* fix(get_caller_identity): Deleted duplicate get_caller_identity and add info entries

* chore(creds renewal): Added support to credential renewal

* chore(assume options): Added condition for -I/-T options

* fix(typo/comments): Deleted f in logger config and comments

* chore(session_duration): limits for -T option

* fix(log messages): Changed -A/-R log messages

* fix(critical error): Errors in input options are critical

* fix(ClientError): IAM service ClientError exception support
2022-06-16 12:00:46 +02:00
Sergio Garcia
eb679f50f1 feat(reorganize_folders): Merge checks. (#1196)
Co-authored-by: sergargar <sergio@verica.io>
2022-06-14 13:10:26 +02:00
Pepe Fagoaga
36fcab17f3 feat(prowler3): pipenv usage 2022-06-14 12:51:53 +02:00
Pepe Fagoaga
b22faa01ea feat(prowler3): first commit 2022-06-14 12:22:54 +02:00
Pepe Fagoaga
9b05a9c334 delete(prowler): Main file 2022-06-14 12:19:31 +02:00
Pepe Fagoaga
0f39ee9b34 rename(provider): keep old version 2022-06-14 12:19:10 +02:00
Pepe Fagoaga
9a0088c84e delete(include): Old bash libraries 2022-06-14 12:15:39 +02:00
Toni de la Fuente
c533d48cf5 New folder structure phase 3 2022-05-25 16:45:23 +02:00
Toni de la Fuente
6a3ceb6bc0 New folder structure phase 2 2022-05-25 16:43:54 +02:00
Toni de la Fuente
5ad517ce83 New folder structure phase 1 2022-05-25 12:54:15 +02:00
Pepe Fagoaga
432416d09e fix(checks): Severity for Lambda URL checks (#1162) 2022-05-25 12:22:42 +02:00
Pepe Fagoaga
dd7d25dc10 release: Prowler 2.10 (#1161) 2022-05-25 12:03:05 +02:00
Pepe Fagoaga
24c60a0ef6 fix(checks): Handle AWS Gov Cloud regions (#1160) 2022-05-25 12:01:58 +02:00
Andrea Di Fabio
f616c17bd2 feat(new): New custom check extra9999 to build a custom check on the fly (#1103) 2022-05-25 09:16:36 +02:00
Pepe Fagoaga
5628200bd4 fix(remediation): Fix remediation fields for checks (#1157) 2022-05-23 15:48:26 +02:00
Pepe Fagoaga
ae93527a6f fix(BucketLocation): Recover bucket policy using the right region endpoint (#1156) 2022-05-23 15:45:30 +02:00
Pepe Fagoaga
2939d5cadd feat(lambda-function): Checks for misconfigured function's URLs (#1148) 2022-05-23 10:46:19 +02:00
Pepe Fagoaga
e2c7bc2d6d fix(IllegalLocationConstraintException): Recover bucket policy using the right region endpoint (#1155) 2022-05-23 09:37:46 +02:00
Nacho Rivera
f4bae78730 Timestamp to date casting issues solved (#1154)
* fix(date): Deleted @ char before date argument

* fix(date): Use @ only when input is epoch
2022-05-23 09:28:56 +02:00
1vicente
d307898289 Update README.md (#1153)
pretty README.md
2022-05-19 12:14:11 +02:00
Pepe Fagoaga
879ac3ccb1 fix(actions): Ignore changes on Readme (#1149) 2022-05-17 16:09:55 +02:00
Sergio Garcia
cd41e73cbe fix(readme): Correct permissions for DynamoDB allowlist (#1147) 2022-05-17 12:33:49 +02:00
Pepe Fagoaga
47f1ca646e fix(typo): ArtifactBucket tags (#1145) 2022-05-17 09:08:11 +02:00
Charles Josiah Rusch Alandt
a18b18e530 K8s cronjob sample files (#1140) 2022-05-16 10:58:50 +02:00
Pepe Fagoaga
4d1ffbb652 fix(actions): tag and push (#1142) 2022-05-13 11:20:30 +02:00
Pepe Fagoaga
13423b137e fix(actions): Include AWS region (#1141)
* fix(actions): Include AWS regions

* fix(zip): Quiet output
2022-05-13 10:13:03 +02:00
Sergio Garcia
d60eea5e2f fix(copyToS3): Upload to S3 only when indicated (#1134)
Co-authored-by: sergargar <sergio@verica.io>
2022-05-12 17:30:49 +02:00
Pepe Fagoaga
39c7d3b69f fix(typo) (#1139) 2022-05-12 17:28:30 +02:00
Pepe Fagoaga
2de04f1374 fix(actions): Job permissions (#1138) 2022-05-12 17:24:15 +02:00
Pepe Fagoaga
5fb39ea316 fix(actions): Trigger on PR (#1136)
* fix(actions): Include checkout

* fix(actions): version name

* fix(actions): fix branch

* fix(actions): version name

* fix(actions): PR trigger
2022-05-12 17:20:11 +02:00
Pepe Fagoaga
55640ecad2 fix(actions): Github token permissions (#1135) 2022-05-12 16:46:06 +02:00
Pepe Fagoaga
69d3867895 feat(actions): Upload Prowler containers to registries (#1132)
* feat(actions): Upload Prowler latest to dockerhub

* feat(upload-container): Action to Public Registries

* feat(upload-container): Include env secrets

* feat(actions): Include Docker linters

* feat(linters): include pre-commit

* fix(names)
2022-05-12 16:37:46 +02:00
Sergio Garcia
210f44f66f fix(custom-file-in-bucket): Custom file names are also support for S3 output. (#1129) 2022-05-11 10:16:29 +02:00
Sergio Garcia
b78e4ad6a1 fix(allowlist_db): Improve DynamoDB regex for allowlisting. (#1127) 2022-05-06 13:46:53 +02:00
stof
4146566f92 feat(assume-role): Properly handle External ID variable 2022-05-05 16:10:52 +02:00
Sergio Garcia
4e46dfb068 feat(add_prowler_pro_banner): include Prowler Pro banner in README (#1119)
* feat(add_prowler_pro_banner): include Prowler Pro banner in README

Context
Include Prowler Pro banner in README.md

Description
Add Prowler Pro banner in README.md for giving visibility to the Enterprise version of Prowler.

License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

* Update README.md
2022-05-03 16:24:23 +02:00
Milton Torasso
13c96a80db feat(deployment): Serverless multi account Prowler with SecurityHub Integration (#1113) 2022-05-03 13:41:56 +02:00
Sergio Garcia
de77a33341 fix(allowlist_db): Improve DynamoDB regex for allowlisting. (#1126)
Co-authored-by: sergargar <sergio@verica.io>
2022-05-03 11:57:23 +02:00
ChrisGoKim
295bb74acf fix(additions-policy): Updated multi-org ProwlerRole.yaml (#1123) 2022-05-03 11:34:12 +02:00
Jens Brey
59abd2bd5b check_extra7113: Fix wrong listing of RDS instances in regions without databases (#1124)
Co-authored-by: Jens Brey <jens.brey@allcloud.io>
2022-05-03 11:31:23 +02:00
Sergio Garcia
ecbfbfb960 fix(allowlist_db): Improve DynamoDB regex for allowlisting. (#1125)
Co-authored-by: sergargar <sergio@verica.io>
2022-05-03 11:31:12 +02:00
Justin Plock
04e5804665 Update CloudFormation template for CodeBuild (#1114) 2022-05-03 09:14:38 +02:00
Pepe Fagoaga
681d0d9538 feat(group7): Include extra7178 (#1121) 2022-04-29 14:26:19 +02:00
Pepe Fagoaga
8bfd9c0e62 feat(emr): Check BlockPublicAccessConfiguration for EMR (#1120) 2022-04-29 14:23:54 +02:00
Divyanshu
95df9bc316 feat(checks): New group and checks for Codebuild and EMR (#1112) 2022-04-29 14:19:04 +02:00
Sergio Garcia
d08576f672 feat(add_prowler_pro_banner): include Prowler Pro banner in README.md (#1117) 2022-04-28 17:28:52 +02:00
Sergio Garcia
aa16bf4084 feat(dynamodb_allowlist): Support DynamoDB tables ARN for allowlist input (#1118)
* feat(dynamodb_allowlist): Support dynamodb tables arn for allowlist input.

* feat(allowlist): Include logging messages for input file

* fix(allowlist): Modify DynamoDB key name

Co-authored-by: sergargar <sergio@verica.io>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2022-04-28 17:04:44 +02:00
Pepe Fagoaga
432632d981 chore(release): 2.9.0 (#1109) 2022-04-13 13:54:53 +02:00
Pepe Fagoaga
d6ade7694e chore(allowlist): Rename references (#1108)
* chore(allowlist): rename file

* chore(allowlist): remove old references
2022-04-13 11:31:50 +02:00
n4ch04
c9e282f236 IAM check116 and check122 modified to log also PASS results (#1107)
* fix(check116): Fixed logic to include resource_id of passed users

* fix(check122): Changed logic check to include explicit pass records
2022-04-12 19:54:51 +02:00
carterjones
5b902a1329 fix typo: publiccly -> publicly (#1106) 2022-04-12 18:12:26 +02:00
Pepe Fagoaga
fc7c932169 fix(extra7147): Handle unsupported AWS regions for Glacier (#1101) 2022-04-11 16:10:23 +02:00
n4ch04
819b52687c Replace comma from csv input info (#1102)
* fix(output): replace comma from csv input info

* fix(outputs): parameter expansion done in echo to csv
2022-04-11 16:04:47 +02:00
Sergio Garcia
28fff104a1 feat(S3_in_w_x_flags): Support S3 URIs for custom checks paths and whitelist files. (#1090)
* feat(S3_in_w_x_flags): Support S3 URIs for custom checks paths and whitelist files.

* feat(S3_in_w_x_flags): README document was updated.

* Update README.md

* Update README.md

* Update README.md

* Update README.md

Co-authored-by: Toni de la Fuente <toni@blyx.com>
Co-authored-by: Sergio Garcia Garcia
2022-04-07 14:37:02 -04:00
n4ch04
07b2b0de5a fix(extra764): Deleted temp file refs (#1089) 2022-04-07 17:03:32 +02:00
nealalan
4287b7ac61 check empty array in SECURITYGROUPS object (#1099)
* check empty array in SECURITYGROUPS object

Logic is only checking an object to see if it is null. This should be checking for the array in the object to see if it is empty.

* Replace new conditional with the old one

* Update check_extra75

Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2022-04-07 10:57:29 -04:00
Sergio Garcia
734331d5bc fix(extra764): NoSuchBucket error properly handled. (#1094) 2022-03-31 15:35:17 +02:00
Sergio Garcia
5de2bf7a83 fix(extra7172): IllegalLocationConstraintException properly handled. (#1093) 2022-03-31 14:40:32 +02:00
Sergio Garcia
1744921a0a fix(extra792): TLS1.3 policies added as secure (#1091) 2022-03-30 17:50:00 +02:00
Andrew Grangaard
d4da64582c docs(tf-quickstart): Update example code for terraform-quickstart (#1086)
+ use primary repository rather than fork.
+ use default branch.
+ fixed a missing character typos.
+ remove blank end-of-line spaces.

@singergs: thanks for adding this code and the video.
2022-03-30 09:15:38 +02:00
Andrea Di Fabio
d94acfeb17 New Extra Check - Detect SGs created by the EC2 Launch Wizard (#1081)
* new check

* added check to group

* fixed name

* added testpass logic

* Fixed a few issues

* Fixed more issues

* Updated to add extended information

* Added new line at end of file

* Fixed Spelling

* fix(title): Update title name

* refactor(style): Minor changes

Co-authored-by: Andrea Di Fabio <adifabio@amazon.com>
2022-03-29 10:06:44 +02:00
soffensive
fcc14012da Update check_extra736, is missing $PROFILE_OPT (#1084)
$PROFILE_OPT was missing in one aws command
2022-03-29 09:11:41 +02:00
Lucas Moura
cc8cbc89fd Fix typo extra729 and extra740 (#1083)
* Fix typo on remediation

* Fix typo on remediation description
2022-03-29 08:58:06 +02:00
Sergio Garcia
8582e40edf fix(secrets_library): Verify if detect-secrets library is missing (#1080) 2022-03-25 13:19:05 +01:00
Toni de la Fuente
1e87ef12ee feat(new_version): Prowler 2.8.1 (#1082) 2022-03-25 12:58:06 +01:00
Pepe Fagoaga
565200529f fix(detect-secrets): Include missing colon to link values (#1078) 2022-03-22 13:53:36 +01:00
Sergio Garcia
198c7f48ca fix(bucket_region): check extra764 doesn't handle bucket region properly (#1077)
* fix(bucket_region): check extra764 doesn't handle bucket region properly
2022-03-18 11:51:42 +01:00
Toni de la Fuente
8105e63b79 fix(extras-group): Add extra7172 to group extras (#1074) 2022-03-16 18:39:16 +01:00
Sergio Garcia
3932296fcf feat(new_version): Prowler 2.8.0 (#1073) 2022-03-16 18:15:57 +01:00
David Childs
cb0d9d3392 fix(filter-region): Support comma separated regions (#1071)
* regions separated by a comma deliminator

* Update README.md

Co-authored-by: Toni de la Fuente <toni@blyx.com>

* Update README.md

Co-authored-by: David Childs <d.childs@elsevier.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
Co-authored-by: Toni de la Fuente <toni@blyx.com>
2022-03-16 17:49:04 +01:00
Pepe Fagoaga
4b90eca21e docs(readme): Fix typo (#1072) 2022-03-16 16:54:27 +01:00
Toni de la Fuente
365b396f9a feat(metadata): Include account metadata in Prowler assessments (#1049)
* Add support for organizations accounts metadata part 1

* Add support for organizations accounts metadata part 2

* Add gathering account metadata from org

* chore(prowler): get accounts metadata

Use assume_role backing up normal assumed credentials to assume management account and then restore it to old ones

* fix(orgs metadata): deleted assume_role_orgs

* refactor(organization_metadata)

Reformulate to extract AWS Organizations metadata

* doc(org_metadata): include required -R in usage

* docs(org-metadata): Update README

Co-authored-by: n4ch04 <nachor1992@gmail.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2022-03-16 16:27:19 +01:00
plarso
c526c61d5e Fix(check122): Error when policy name contains commas (#1067)
* check122 - Support policy names with commas

* Requested changes
2022-03-16 15:06:12 +01:00
Leonardo Azize Martins
c4aff56f23 fix(extra760): Improve error handling (#1055)
* Fix AccessDenied issue

* fix(extra760): Error handling

* Fix merge conflict

* Improve code style

* Fix grep filter

* Fix bash variable expansion

* Fix grep logic to handle zip file
2022-03-16 14:57:37 +01:00
n4ch04
d9e0ed1cc9 fix(check_extra7161): fixed check title (#1068) 2022-03-15 12:30:57 +01:00
Leonardo Azize Martins
e77cd6b2b2 fix: Change lower case from bash variable expansion to tr (#1064)
* fix(extra715): Change lower case from bash variable expansion to tr command

* fix: Change from bash variable expansion to tr command

* Change the way to handle lower case
2022-03-15 08:22:22 +01:00
n4ch04
f04b174e67 fix(whitelist): Whitelist logic reformulated (#1061)
* fix(whitelist): Whitelist logic reformulated again

* chore(whitelist): reformulate style
2022-03-11 10:15:58 +01:00
Pepe Fagoaga
0c1c641765 fix(extra776): Handle image tag commas and json output (#1063) 2022-03-08 19:08:40 +01:00
xxxMinoo
d44f6bf20f fix: extra7167 Advanced Shield and CloudFront bug parsing None output without distributions (#1062)
* fix: not to flag as finding for account without cloudfront distributions

* fix: output empty for None from cloudfront list-distributions

* fix: extra7167 Advanced Shield and CloudFront bug parsing None output without distributions

Co-authored-by: moo.xin.foo <moo.xin.foo@accenture.com>
2022-03-08 14:09:20 +01:00
Leonardo Azize Martins
1fa62cf417 fix(extra758): Reduce API calls. Print correct instance state. (#1057)
* fix(extra758): Reduce API calls. Print correct instance state.

* feat(oldage-format): Include comment

Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2022-03-08 10:45:02 +01:00
Toni de la Fuente
d8d2ddd9e7 Revert "fix: extra7167 Advanced Shield and CloudFront bug parsing None output without distributions (#1053)" (#1054)
This reverts commit f3ff8369c3.
2022-03-04 13:12:03 +01:00
xxxMinoo
f3ff8369c3 fix: extra7167 Advanced Shield and CloudFront bug parsing None output without distributions (#1053)
* fix: not to flag as finding for account without cloudfront distributions

* fix: output empty for None from cloudfront list-distributions

Co-authored-by: moo.xin.foo <moo.xin.foo@accenture.com>
2022-03-04 10:25:47 +01:00
Roman Mueller
99d1868827 Add right region to CSV if access is denied (#1045) 2022-03-02 16:32:35 +01:00
Andrea Di Fabio
31cefa5b3c Make python3 default in Dockerfile (#1043) 2022-03-02 16:21:28 +01:00
Andrea Di Fabio
2d5ac8238b Added Timestamp to secrets related 5 checks (#1041) 2022-03-02 15:56:02 +01:00
Leonardo Azize Martins
248cc9d68b Fix(extra771): jq fail when policy action is an array (#1031)
* Fix error handling and policy output

* Fix jq filter when Action is an array

Fix jq select condition to handle Action as string or as array.
Add error handling.
When fail, print policies as just one line.

* Double quote variables to prevent globbing and word splitting

* Replace comma character from json by word comma
2022-03-02 15:04:18 +01:00
Leonardo Azize Martins
5f0a5b57f9 Fix(ES): Improve AWS CLI query and add error handling for ElasticSearch/OpenSearch checks (#1032)
* Fix CLI query and add error handling

Check extra781, extra782, extra783, extra784 and extra785

* Fix CLI query, add error handling, combine AWS CLI calls when possible

Checks related to Opensearch/ElasticSearch.

* Fix CLI query, add error handling, combine AWS CLI calls when possible

Checks related to Opensearch/ElasticSearch.
2022-03-02 12:44:24 +01:00
Pepe Fagoaga
86367fca3f fix: remove PR automatic labels (#1044) 2022-02-15 08:19:40 +01:00
Pepe Fagoaga
07be3c21bf docs(templates): Include triage label (#1042) 2022-02-14 17:47:53 +01:00
n4ch04
3097ba6c66 fix(include/outputs):Rolling back whitelist checking to RE check (#1037)
* fix(include/outputs):Rolling back whitelist checking to RE check

* fix(include/ouputs): Clarified variable assignation coming from argument
2022-02-14 13:04:47 +01:00
n4ch04
b4669a2a72 fix(check41/42): Added tcp protocol filter to query (#1035)
* fix(check41/42): Added tcp protocol filter to query

* Include {} in vars

Co-authored-by: Pepe Fagoaga <pepe@verica.io>

* Include {} in vars

Co-authored-by: Pepe Fagoaga <pepe@verica.io>

Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2022-02-11 10:54:32 +01:00
Leonardo Azize Martins
e8848ca261 docs: Improve check_sample examples, add general comments (#1039) 2022-02-10 17:58:50 +01:00
Pepe Fagoaga
5c6902b459 fix(extra730): Handle invalid date formats checking ACM certificates (#1033) 2022-02-09 17:56:55 +01:00
Leonardo Azize Martins
9b772a70a1 Fix(extra7141): Error handling and include missing policy (#1024)
* Fix AccessDenied issue when get document

Add check to validate access denied when get document from SSM.
Add missing action permission to allow ssm:GetDocument.

* Double quote variables to prevent globbing and word splitting
2022-02-09 16:01:01 +01:00
Pepe Fagoaga
6c12a3e1e0 fix(extra736): Recover Customer Managed KMS keys (#1036) 2022-02-09 10:05:57 +01:00
jeffmaley
c6f0351e9c feat(check): New check7172 for S3 Bucket ACLs (#1023)
* added check7172 for s3 bucket acls

* Added more errors to error handling and an access check for s3

* Removed extra api call

Co-authored-by: Jeff Maley <jeff.maley@symmetry-systems.com>
2022-02-07 16:58:18 -05:00
Martin Muller
7e90389dab fix: CFN codebuild example (#1030)
Since 2.7.0 this template failed:

```
An error occurred (AccessDeniedException) when calling the GetSubscriptionState operation: User: arn:aws:sts::863046042023:assumed-role/prowler-codebuild-role/AWSCodeBuild-2c3151c9-7c5d-4618-94e5-0234bddce775 is not authorized to perform: shield:GetSubscriptionState on resource: arn:aws:shield::863046042023:subscription/* because no identity-based policy allows the shield:GetSubscriptionState action
       INFO! No AWS Shield Advanced subscription found. Skipping check. 
7.167 [extra7167] Check if Cloudfront distributions are protected by AWS Shield Advanced - shield [Medium]
```

I aligned it with https://github.com/prowler-cloud/prowler/blob/master/iam/prowler-additions-policy.json#L19 .
2022-02-04 12:09:53 -05:00
n4ch04
30ce25300f fix(include/outputs): Whitelist logic reformulated to exactly match input (#1029)
* fix(inlcude/outputs) Whitelist logic reformulated to exactly match input

* fix(include/outputs): Changed name of iterative variable that browses whitelisted values

* fix(include/outputs): Deleted missing echo and include and put variables in brackets
2022-02-04 12:07:48 -05:00
Pepe Fagoaga
26caf51619 fix(CODEOWNERS): Rename team (#1027) 2022-02-04 12:05:43 -05:00
Leonardo Azize Martins
3ecb5dbce6 Fix AccessDenied issue (#1025) 2022-02-04 12:05:10 -05:00
Toni de la Fuente
1d409d04f2 Fix (extra7148 and add action #1017 (#1021) 2022-02-04 11:58:22 -05:00
Daniel Lorch
679414418e Fix: when prowler exits with a non-zero status, the remainder of the block is not executed (#1015)
* Fix: when prowler exits with a non-zero status, the remainder of the block is not executed

* Fix: do not trigger exit code 3 on failed checks, so that the remainder of the block is executed
2022-02-02 17:45:56 +01:00
Daniel Lorch
b26370d508 Typo (breaking change) (#1010)
Co-authored-by: Daniel Lorch <lorchda@amazon.ch>
2022-02-02 11:13:31 -05:00
Daniel Lorch
72b30aa45f Skip packages with broken dependencies when upgrading system (#1009)
Co-authored-by: Daniel Lorch <lorchda@amazon.ch>
2022-02-02 11:12:58 -05:00
n4ch04
d9561d5d22 fix(check32): filterName base64encoded to avoid space problems in filter names (#1020)
* fix(check32): filterName base64encoded to avoid space problems in filter names

* fix(check32): base64 decoding atomic expression

* fix(check32): Variable enclosing

Co-authored-by: Nacho Rivera <nachor1992@gmail>
2022-02-02 11:09:38 -05:00
Mike Stewart
3d0ab4684f docs(docker): Docker hub references (#1018) 2022-02-02 16:45:07 +01:00
Daniel Lorch
29a071c98e docs(whitelist): Add examples for Control Tower resources (#1013) 2022-02-02 13:36:02 +01:00
Daniel Lorch
0ac7064d80 fix(ftr-group): Visual formatting (#1012) 2022-02-02 13:17:46 +01:00
Toni de la Fuente
dcd55dbb8f Add badges 2022-01-28 12:12:59 +01:00
Jan Sepke
441dc11963 Fix issue #1002 (#1007)
regression in extra793

Co-authored-by: Jan Sepke <jan.sepke@jungheinrich.de>
2022-01-28 11:01:32 +01:00
Jan Sepke
21a8193510 Fix issue #1001 (#1006)
regression in extra75

Co-authored-by: Jan Sepke <jan.sepke@jungheinrich.de>
2022-01-27 15:13:07 +01:00
Pepe Fagoaga
3b9a3ff6be Include codeowners template (#1005)
* docs(templates): include Codeowners

* docs(templates): update PR template
2022-01-27 12:58:14 +01:00
Toni de la Fuente
c5f12f0a6c Fix issue #1002 (#1004) 2022-01-27 12:27:41 +01:00
Pepe Fagoaga
90565099bd Change references from toniblyx to prowler-cloud (#1003)
Co-authored-by: Toni de la Fuente <toni@blyx.com>
2022-01-27 12:17:38 +01:00
Toni de la Fuente
2b2814723f Prowler 2.7.0 - Brave (#998)
* Extra7161 EFS encryption at rest check

* Added check_extra7162 which checks if Log groups have 365 days retention

* fixed code to handle all regions and formatted output

* changed check title, resource type and service name as well as making the code more dynamic

* Extra7161 EFS encryption at rest check

* New check_extra7163 Secrets Manager key rotation enabled

* New check7160 Enabled AutomaticVersionUpgrade on RedShift Cluster

* Update ProwlerRole.yaml to have same permissions as util/org-multi-account/ProwlerRole.yaml

* Fix link to quicksight dashboard

* Install detect-secrets (e.g. for check_extra742)

* Updating check_extra7163 with requested changes

* fix(assumed-role): Check if -T and -A options are set

* docs(Readme): `-T` option is not mandatory

* fix(assume-role): Handle AWS STS CLI errors

* fix(assume-role): Handle AWS STS CLI errors

* Update group25_FTR

When trying to run the group 25 (Amazon FTR related security checks) nothing happens, after looking at the code there is a misconfiguration in 2 params: GROUP_RUN_BY_DEFAULT[9] and GROUP_CHECKS[9]. Updating values to 25 fixed the issue.

* Update README.md

broken link for capital letters in group file (group25_FTR)

* #938 issue assume_role multiple times should be fixed

* Label 2.7.0-1December2021 for tests

* Fixed error that appeared if the number of findings was very high.

* Adjusted the batch to only do 50 at a time. 100 caused capacity issues. Also added a check for an edge case where if the updated findings was a multiple of the batch size, it would throw an error for attempting to import 0 findings.

* Added line to delete the temp folder after everything is done.

* New check 7164 Check if Cloudwatch log groups are protected by AWS KMS@maisenhe

* updated CHECK_RISK

* Added checks extra7160,extra7161,extra7162,extra7163 to group Extras

* Added checks extra7160,extra7161,extra7162,extra7163 to group Extras

* Added issue templates

* New check 7165 DynamoDB: DAX encrypted at rest @Daniel-Peladeau

* New check 7165 DynamoDB: DAX encrypted at rest @Daniel-Peladeau

* Fix #963 check 792 to force json in ELB queries

* Fix #957 check 763 had us-east-1 region hardcoded

* Fix #962 check 7147 ALTERNATE NAME

* Fix #940 handling error when can not list functions

* Added new checks 7164 and 7165 to group extras

* Added invalid check or group id to the error message #962

* Fix Broken Link

* Add docker volume example to README.md

* Updated Dockerfile to use amazonlinux container

* Updated Dockerfile with AWS cli v2

* Added upgrade to the RUN

* Added cache purge to Dockerfile

* Backup AWS Credentials before AssumeRole and Restore them before CopyToS3

* exporting the ENV variables

* fixed bracket

* Improved documentation for install process

* fix checks with comma issues

* Added -D option to copy to S3 with the initial AWS credentials

* Cosmetic variable name change

* Added $PROFILE_OPT to CopyToS3 commands

* remove commas

* removed file as it is not needed

* Improved help usage options -h

* Fixed CIS LEVEL on 7163 through 7165

* When performing a restoreInitialAWSCredentials, unset the credentials ENV variables if they were never set

* New check 7166 Elastic IP addresses with associations are protected by AWS Shield Advanced

* New check 7167 Cloudfront distributions are protected by AWS Shield Advanced

* New check 7168 Route53 hosted zones are protected by AWS Shield Advanced

* New check 7169 Global accelerators are protected by AWS Shield Advanced

* New check 7170 Application load balancers are protected by AWS Shield Advanced

* New check 7171 Classic load balancers are protected by AWS Shield Advanced

* Include example for global resources

* Add AWS Advance Shield protection checks corrections

* Added Shield actions GetSubscriptionState and DescribeProtection

* Added Shield actions GetSubscriptionState and DescribeProtection

* docs(templates): Improve bug template with more info (#982)

* Removed echoes after role chaining fix

* Changed Route53 checks7152 and 7153 to INFO when no domains found

* Changed Route53 checks 7152 and 7153 title to clarify

* Added passed security groups in output to check 778

* Added passed security groups and updated title to check 777

* Added FAIL as error handling when SCP prevents queries to regions

* Label version 2.7.0-6January2022

* Updated .dockerignore with .github/

* Fix: issue #758 and #984

* Fix: issue #741 CloudFront and real-time logs

* Fix issues #971 set all as INFO instead of FAIL when no access to resource

* Fix: issue #986

* Add additional action permissions for Glue and Shield Advanced checks @lazize

* Add extra shield action permission

Allows the shield:GetSubscriptionState action

* Add permission actions

Make sure all files where permission actions are necessary will have the same actions

* Fix: Credential chaining from environment variables @lazize #996f

If profile is not defined, restore original credentials from environment variables,
if they exists, before assume-role

* Lable version 2.7.0-24January2022

Co-authored-by: Lee Myers <ichilegend@gmail.com>
Co-authored-by: Chinedu Obiakara <obiakac@amazon.com>
Co-authored-by: Daniel Peladeau <dcpeladeau@gmail.com>
Co-authored-by: Jonathan Lozano <jonloza@amazon.com>
Co-authored-by: Daniel Lorch <dlorch@gmail.com>
Co-authored-by: Pepe Fagoaga <jose.fagoaga@smartprotection.com>
Co-authored-by: Israel <6672089+lopmoris@users.noreply.github.com>
Co-authored-by: root <halfluke@gmail.com>
Co-authored-by: nikirby <nikirby@amazon.com>
Co-authored-by: Joel Maisenhelder <maisenhe@gmail.com>
Co-authored-by: RT <35173068+rtcms@users.noreply.github.com>
Co-authored-by: Andrea Di Fabio <39841198+sectoramen@users.noreply.github.com>
Co-authored-by: Joseph de CLERCK <clerckj@amazon.fr>
Co-authored-by: Michael Dickinson <45626543+michael-dickinson-sainsburys@users.noreply.github.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
Co-authored-by: Leonardo Azize Martins <lazize@users.noreply.github.com>
2022-01-24 13:49:47 +01:00
Toni de la Fuente
42e54c42cf Label new version 2.6.1-15November2021 2021-11-15 19:12:06 +01:00
Toni de la Fuente
f0c12bbf93 Merge pull request #928 from toniblyx/2.6.1
2.6.1
2021-11-15 18:56:16 +01:00
Toni de la Fuente
d272fad4c2 Enhancement IAM assumed role session duration error handling by @jfagoagas
Enhancement IAM assumed role session duration error handling by @jfagoagas
2021-11-15 18:17:09 +01:00
Toni de la Fuente
3e78f017e2 Fix Terraform Kickstarter path in README by @z0ph
Fix Terraform Kickstarter path in README
2021-11-15 17:05:37 +01:00
Toni de la Fuente
cee6437ae1 Fix issue #926 resource id and remediation typo 2021-11-15 16:49:40 +01:00
Toni de la Fuente
b251f31da9 Fix issue #925 replace sensible by sensitive 2021-11-15 15:59:13 +01:00
Toni de la Fuente
50de9f2ab4 Fix output for checks check3x when no CW group is in place 2021-11-15 15:49:33 +01:00
Toni de la Fuente
a6ba580344 Fix severity case variable 2021-11-15 15:45:33 +01:00
Pepe Fagoaga
563cd71060 fix(iam-role): Delete temporary prowler.sts_assumed* if error 2021-11-13 16:25:43 +01:00
Victor GRENU
32e5738c46 fix readme for terraform kickstarter 2021-11-13 14:48:16 +01:00
Pepe Fagoaga
e4edb5e39e fix(iam-role): IAM assumed role session duration 2021-11-12 18:32:02 +01:00
Toni de la Fuente
cbd1c31424 Merge pull request #922 from toniblyx/2.6
2.6
2021-11-12 13:23:42 +01:00
Toni de la Fuente
df6e3f9462 Merge branch 'master' into 2.6 2021-11-12 13:21:18 +01:00
Toni de la Fuente
79c32a3c0b Label new version 2.6.0-12November2021 2021-11-12 10:34:32 +01:00
Toni de la Fuente
9cf076899e Updated screenshots and minor changes 2021-11-12 10:33:45 +01:00
Toni de la Fuente
dd398a994b Fix issue #904 2021-11-11 14:05:14 +01:00
Toni de la Fuente
82b7eca80a Fix CIS LEVEL variable in check21 2021-11-11 14:00:33 +01:00
Toni de la Fuente
140e96e5e1 Fix issue #848 CIS LEVEL added to CSV and other formats 2021-11-11 13:40:40 +01:00
Toni de la Fuente
34aba53649 Consolidate Apache License file in LICENSE 2021-11-11 12:52:57 +01:00
Toni de la Fuente
6921eaa6e9 Fix issue #868 2021-11-11 11:25:12 +01:00
Toni de la Fuente
4b205e2cdd Add badges for Docker Hub and AWS ECR public registry 2021-11-10 18:49:06 +01:00
Toni de la Fuente
5d79bd6b0f Add extra7158,extra7159 to extras 2021-11-10 16:55:17 +01:00
Toni de la Fuente
a5dfa788a6 New check 7159 ELB Classic Load balancer has listeners underneath @kbgoll05
New check 7159 ELB Classic Load balancer has listeners underneath @kbgoll05
2021-11-10 16:49:10 +01:00
Toni de la Fuente
afed5eb4b2 New check 7158 ELBV2 has listeners underneath @kbgoll05
New check 7158 ELBV2 has listeners underneath @kbgoll05
2021-11-10 16:48:45 +01:00
Toni de la Fuente
aecb784eca Merge pull request #918 from toniblyx/revert-911-check7158
Revert "New check 7158 ELBV2 has listeners underneath @kbgoll05"
2021-11-10 14:27:36 +01:00
Toni de la Fuente
1ee7f4f276 Revert "New check 7158 ELBV2 has listeners underneath @kbgoll05" 2021-11-10 14:27:27 +01:00
Toni de la Fuente
98d465b84b Merge pull request #917 from toniblyx/revert-912-check7159
Revert "New check 7159 ELB Classic Load balancer has listeners underneath @kbgoll05"
2021-11-10 14:27:12 +01:00
Toni de la Fuente
24c3da2a60 Revert "New check 7159 ELB Classic Load balancer has listeners underneath @kbgoll05" 2021-11-10 14:27:01 +01:00
Toni de la Fuente
69164c5176 New check 7159 ELB Classic Load balancer has listeners underneath @kbgoll05
New check 7159 ELB Classic Load balancer has listeners underneath @kbgoll05
2021-11-10 14:26:23 +01:00
Toni de la Fuente
fa5c5773f7 New check 7158 ELBV2 has listeners underneath @kbgoll05
New check 7158 ELBV2 has listeners underneath @kbgoll05
2021-11-10 14:25:58 +01:00
Toni de la Fuente
950f14c845 Fix issue #886 2021-11-09 15:47:09 +01:00
Toni de la Fuente
48d7381822 Fix issue #871 2021-11-09 14:21:32 +01:00
Toni de la Fuente
2c81b383e8 Fix scoring check counter 2021-11-09 12:59:36 +01:00
Toni de la Fuente
60d89fa98d Enhanced scoring when only INFO is detected 2021-11-08 22:44:41 +01:00
Toni de la Fuente
7b6e4ccd13 Added Discord link to README.md 2021-11-08 21:21:39 +01:00
Toni de la Fuente
9ec4db456c Added Discord link to README.md 2021-11-08 21:19:48 +01:00
Toni de la Fuente
918dd9eb07 Added Discord link to README.md 2021-11-08 20:34:16 +01:00
Toni de la Fuente
83dc0a0987 Fixes issue #906 2021-11-08 20:05:50 +01:00
kbgoll05
226b016557 Add files via upload 2021-11-05 16:02:25 -05:00
kbgoll05
41c6131d10 Add files via upload 2021-11-05 15:50:54 -05:00
Toni de la Fuente
623e62ad3f Fix service name string with bash colors in html report 2021-11-05 18:33:24 +01:00
Toni de la Fuente
98e7e543fd Fix issue #827 2021-11-05 17:36:34 +01:00
Toni de la Fuente
5d5250076b Updated documentation about detect-secrets version to use issue #806 2021-11-04 19:50:33 +01:00
Toni de la Fuente
12f49a2795 Fixed typo in README.md @bevel-zgates
Fixed typo in README.md @bevel-zgates
2021-11-04 19:15:33 +01:00
Zach
2e0695112d Update README.md
fixed typo in `readme.md`
2021-11-04 12:29:36 -05:00
Toni de la Fuente
89e87c713b Added extra7157 to group extras 2021-10-26 14:34:44 +02:00
Toni de la Fuente
2c1fd8aeb4 New Check 7157 API Gateway V2 has Configured Authorizers @qumei
New Check 7157 API Gateway V2 has Configured Authorizers @qumei
2021-10-26 14:31:10 +02:00
Toni de la Fuente
7fe2946241 New checks group FTR (AWS Foundational Technical Review) @jfagoagas
New checks group FTR (AWS Foundational Technical Review) @jfagoagas
2021-10-26 14:19:52 +02:00
Pepe Fagoaga
bb068f1c7a feat(group): include new AWS FTR checks group 2021-10-26 14:06:34 +02:00
Toni de la Fuente
1c7d3c452f Fix Shodan typo in -h usage text @jfagoagas
Fix Shodan typo in -h usage text @jfagoagas
2021-10-26 12:42:44 +02:00
Pepe Fagoaga
12c6f726e9 fix(lambda-secrets): change aws cli output format to extract keys and values (#4) 2021-10-26 12:31:25 +02:00
Pepe Fagoaga
7a3e353d54 docs(usage): Fix Shodan typo (#3) 2021-10-25 14:49:51 +02:00
Zaid Qumei
dfdcd107fc Fixed servicename and fail text 2021-10-22 10:48:01 -04:00
Toni de la Fuente
a3a5d7cc4d Delete main.yml 2021-10-21 12:35:42 +02:00
Toni de la Fuente
c7c76a0581 Create main.yml 2021-10-21 12:15:09 +02:00
Toni de la Fuente
f06168f490 Fix check extra734 about S3 buckets default encryption with StringNotEquals @rustic
Fix check extra734 about S3 buckets default encryption with StringNotEquals @rustic
2021-10-19 16:54:53 +02:00
Lee Myers
fc07fa44ee check_extra734 update to StringNotEquals 2021-10-15 15:09:56 -04:00
Toni de la Fuente
8f265dca68 Updated parts from check7152 @jarrettandrulis
Updated parts from check7152 @jarrettandrulis
2021-10-15 14:30:17 +02:00
Jarrett Andrulis
7ff9dcd65e Updated link 2021-10-14 16:39:49 -05:00
Jarrett Andrulis
64a162fca1 Updated parts from check7152 accidentally left in 2021-10-14 16:37:47 -05:00
Zaid Qumei
e284a56f0d Added extracheck 7157 2021-10-14 09:46:03 -04:00
Toni de la Fuente
9d9a3ef761 Removed dot in title for consistency in new checks 2021-10-07 16:49:10 +02:00
Toni de la Fuente
571a714a82 Updated with right service name for consistency 2021-10-07 16:42:30 +02:00
Toni de la Fuente
b6fdbaba01 New feature: adding the ability to provide a file for checks to be ran @Kirizan
New feature: adding the ability to provide a file for checks to be ran @Kirizan
2021-10-07 14:31:34 +02:00
nikirby
6874fa4793 Fixed sample file to be what it's looking for. 2021-10-06 10:48:13 -04:00
nikirby
e23b24099d Added -C option to provide a file with the checklist to be checked against. Also added checklist.txt to provide a sample file 2021-10-06 10:41:40 -04:00
Toni de la Fuente
d3b04d3ed9 Update group extras with new checks 2021-10-05 17:39:52 +02:00
Toni de la Fuente
ea1d0c4dfa New check 7148 EFS File systems have backup enabled @georgie969 2021-10-05 17:39:22 +02:00
Toni de la Fuente
a9b2bc1167 New check 7155 Application Load Balancer is configured with defensive or strictest desync mitigation mode @ShubhamShah11 2021-10-05 17:31:59 +02:00
Toni de la Fuente
6fb49a46bf New check 7153 Route53 transfer lock for domains enabled @jarrettandrulis 2021-10-05 17:31:30 +02:00
Toni de la Fuente
221f6038d7 Restore group extras 2021-10-05 17:22:53 +02:00
Toni de la Fuente
f4045c6d97 New Check 7156 API Gateway V2 has Access Logging enabled @dsensibaugh
New Check 7156 API Gateway V2 has Access Logging enabled @dsensibaugh
2021-10-05 16:55:08 +02:00
Toni de la Fuente
53e5681f35 New check 7154 CloudFormation stack termination protection enabled @ShubhamShah11
New check 7154 CloudFormation stack termination protection enabled @ShubhamShah11
2021-10-05 16:52:38 +02:00
Toni de la Fuente
ca96addd92 New check 7152 Route53 domain privacy protection enabled @jarrettandrulis
New check 7152 Route53 domain privacy protection enabled @jarrettandrulis
2021-10-05 16:49:15 +02:00
Jarrett Andrulis
27ab868e49 Update check_extra7152 2021-10-04 15:26:05 -05:00
Toni de la Fuente
bffc9799c1 Updated documentation regarding a confusion with the -q option (issue #884) @w0rmr1d3r
Updated documentation regarding a confusion with the `-q` option (issue #884) @w0rmr1d3r
2021-10-04 13:28:37 +02:00
Toni de la Fuente
d704f1003c New check 7151 DynamoDB tables point-in-time recovery (PITR) enabled @ManuelUgarte
New check 7151 DynamoDB tables point-in-time recovery (PITR) enabled @ManuelUgarte
2021-10-04 13:24:01 +02:00
Toni de la Fuente
af7c4393d2 New check 7149 Redshift automated snapshots enabled @georgie969
New check 7149 Redshift automated snapshots enabled @georgie969
2021-10-04 13:22:14 +02:00
Toni de la Fuente
13d8c94053 New check 7150 ELB deletion protection enabled @ManuelUgarte
New check 7150 ELB deletion protection enabled @ManuelUgarte
2021-10-04 13:21:32 +02:00
Ramon
2f4a5c7c51 updated documentation regarding a confusion with the -q option 2021-10-04 13:13:24 +02:00
David Sensibaugh
fec9c9c976 Update check_extra7156 2021-10-03 18:59:52 -04:00
EC2 Default User
4f7d75598d Changed ',' with ';' in check variables 2021-10-01 15:24:14 +00:00
EC2 Default User
babbf065de Changed ',' with ';' in variables 2021-10-01 15:21:02 +00:00
Shubham Shah
f74414532d Update check_extra7154 2021-10-01 11:14:26 -04:00
Shubham Shah
44d40e4f0d Update check_extra7154 2021-09-28 16:34:44 -04:00
EC2 Default User
cff8f4a8d2 variable ends with just the value of key 'PointInTimeRecoveryStatus' if it is ENABLED. 2021-09-28 18:54:33 +00:00
Toni de la Fuente
34dd6842c4 New check 7148 EFS File systems have backup enabled @georgie969
New check 7148 EFS File systems have backup enabled @georgie969
2021-09-28 17:29:46 +02:00
Toni de la Fuente
70c6e5c7af Fix duplicated region in textFail message for extra741 @pablopagani
Fix duplicated region in textFail message for extra741 @pablopagani
2021-09-28 17:27:51 +02:00
Pablo Pagani
11deceb9e6 Bugfix: duplicated region in textFail message. 2021-09-23 14:05:20 -03:00
Toni de la Fuente
7c0d53a0e6 Delete group7_extras 2021-09-23 10:16:26 +02:00
Toni de la Fuente
e4ecbcbd54 Delete group7_extras 2021-09-23 10:08:26 +02:00
Toni de la Fuente
db6363e89f Delete randomFile.txt 2021-09-23 10:08:03 +02:00
Toni de la Fuente
fad06ef5c0 New feature added flags Z to control if Prowler returns exit code 3 on a failed check @Kirizan
New feature added flags `Z` to control if Prowler returns exit code 3 on a failed check @Kirizan
2021-09-23 09:30:56 +02:00
Toni de la Fuente
473e0fbc3a Fix doc reference link in check23 @FallenAtticus
Fix doc reference link in check23 @FallenAtticus
2021-09-23 09:27:14 +02:00
Toni de la Fuente
254cb0cf63 Fix Security Hub conflict with duplicated findings in the management account #711 @xeroxnir
Fix Security Hub conflict with duplicated findings in the management account #711 @xeroxnir
2021-09-21 17:03:04 +02:00
Shubham Shah
73c65cf323 Update group7_extras 2021-09-20 20:07:43 -04:00
Shubham Shah
052a36207c Update check_extra7154 2021-09-20 20:06:48 -04:00
Shubham Shah
ff3ef0b8c0 Update check_extra7154 2021-09-20 19:11:23 -04:00
Shubham Shah
e42a2f8249 Merge pull request #1 from ShubhamShah11/ShubhamShah11-patch-1
Shubham shah11 patch 1
2021-09-20 19:02:53 -04:00
Shubham Shah
6201a2a3fb Update check_extra7154 2021-09-20 19:02:28 -04:00
Shubham Shah
c6c730a81e Update check_extra7154 2021-09-20 17:21:19 -04:00
Shubham Shah
7d79532c1f Adding check_extra7154 2021-09-20 17:20:13 -04:00
Shubham Shah
af38286a15 Create check_extra7154 2021-09-20 17:06:33 -04:00
Jarrett Andrulis
6566e80a3c renamed as extra7152 2021-09-20 10:59:30 -05:00
Jarrett Andrulis
397a44e3f9 Adding check_extra7151 2021-09-20 10:16:52 -05:00
EC2 Default User
9d76ba0c7b Removed xargs from line 30, not needed. Tested code against resources. 2021-09-16 13:29:06 +00:00
Joaquin Rinaudo
504b27b47a #711 fix Security Hub management account
* Filter by AWS account Id to avoid importing findings from other accounts.
2021-09-16 15:15:15 +02:00
EC2 Default User
ee5ae4fc5e Check if DynamoDB tables point-in-time recovery (PITR) is enabled. 2021-09-15 20:38:24 +00:00
EC2 Default User
df7a2c6ef3 Added EOL and updated some variables to make it easier to read. 2021-09-15 18:12:11 +00:00
Toni de la Fuente
48b45bbf95 Terraform Kickstarter @singergs
Terraform Kickstarter @singergs
2021-09-15 14:52:21 +02:00
George
9776c412c9 New Prowler check 7149 added 2021-09-14 16:50:07 -04:00
George
7b645a4a34 New Prowler check 7149 added 2021-09-14 16:36:17 -04:00
EC2 Default User
5c6b81dd8b elb deletion protection enabled checkextra 7150 2021-09-14 19:57:40 +00:00
Geoff Singer
0437c10dfd Update: Documentation reference
Removed gifs in git repo and moved to S3 for storage.  Effort to reduce the size of the git repo.

Moved artifacts to the util dir
2021-09-13 16:14:35 -05:00
Toni de la Fuente
9fc9e43172 Fix typo and HTTP capitalisation in extra7142 @acknosyn
Fix typo and HTTP capitalisation in extra7142 @acknosyn
2021-09-13 19:23:41 +02:00
Toni de la Fuente
c1403dc140 Fix support policy arn in check120 @hersh86
Fix support policy arn in check120 @hersh86
2021-09-13 19:20:15 +02:00
Toni de la Fuente
a827504d58 Added feature to allow role ARN while using -R parameter @mmuller88
Added feature to allow role ARN while using -R parameter @mmuller88 #859
2021-09-13 19:01:15 +02:00
Toni de la Fuente
f3dcfe9f8e Added a new way to deploy Prowler at Organizational level with serverless @bella-kwon
Added a new way to deploy Prowler at Organizational level with serverless @bella-kwon
2021-09-13 18:57:36 +02:00
Geoff Singer
8617c77889 Remove: Link
Removed the hardlink to repo video file
2021-09-13 11:53:50 -05:00
Toni de la Fuente
28b97058ad Fix bug in extra784 @tayivan-sg
Fix bug in extra784 @tayivan-sg
2021-09-13 18:52:28 +02:00
Geoff Singer
8769783b75 Remove: Video File
Uploaded video file to youtube and removed it from the repo
2021-09-13 11:38:08 -05:00
Geoff Singer
1f1d7b2954 Update: Video Reference 2021-09-13 11:37:02 -05:00
georgie969
8586b1073d Delete extra_check7149
This file (7149) was committed in error
2021-09-10 10:52:15 -04:00
George
e17d6e580f New Prowler Check 7149 by George O. submitted for review 2021-09-10 09:22:21 -04:00
George
b3aa82a3b0 New Prowler Check 7148 by George O. submitted for review 2021-09-08 16:01:18 -04:00
Jarrett Andrulis
c23ba56313 commit 2021-09-08 14:43:54 -05:00
sascha.duwe
aadc7640b1 Removed the trailing space 2021-09-07 15:30:17 +02:00
nikirby
c901233199 Added CLI flags Z for selecting which checks should generate exit code 3, and z to stop exit code 3 being generated at all. 2021-09-07 08:54:47 -04:00
Sascha Duwe
ecec784113 Update check23
Fixed reference link
2021-09-07 11:13:42 +02:00
Acknosyn
d2c75d8d71 Fix typo and HTTP capitalisation 2021-09-06 11:24:34 +12:00
Alex Hershey
56fd096620 Quick fix for check120 2021-09-03 17:01:08 -04:00
Geoff Singer
1a2fd87777 Update: Create tf files for variables, output, etc.
Separated the variables, outputs, and data into separate tf files
2021-09-02 12:01:39 -05:00
Geoff Singer
859d78a204 Merge remote-tracking branch 'origin/terraform-kickstarter' into terraform-kickstarter 2021-09-02 09:29:30 -05:00
Geoff Singer
ea337993c3 Update: buildspec.yml
- removed the branch checkout
- moved all the commands to the install phase
per comments by w0rmr1d3r
2021-09-02 09:29:24 -05:00
Geoff Singer
21694f866e Update:
- removed the branch checkout
- moved all the commands to the install phase
per comments by w0rmr1d3r
2021-09-02 09:28:22 -05:00
Martin Mueller
36c4040a7f improve doc for -R 2021-09-02 07:32:42 +02:00
Toni de la Fuente
5757767b25 Fixed typo in risk description for check29 @kamiryo
Fixed typo in risk description for check29 @kamiryo
2021-09-01 19:14:03 +02:00
Geoff Singer
74a2f5ba03 Documentation: Updates 2021-09-01 11:33:31 -05:00
Martin Mueller
8d8ec38c60 feat: allow role arn for R parameter 2021-09-01 08:06:59 +02:00
Geoff Singer
8280ff619a Update: Documentation 2021-08-31 10:21:26 -05:00
Geoff Singer
77a732b8b3 Buildspec: parameter change 2021-08-31 09:43:57 -05:00
Geoff Singer
dc8e3b0028 Update: IAM role 2021-08-31 09:16:36 -05:00
Geoff Singer
066c90028f Update: IAM role 2021-08-31 09:05:16 -05:00
Geoff Singer
e621ae465a Updated: install commands 2021-08-31 08:25:28 -05:00
Geoff Singer
66cb830b66 Added: terraform artifacts 2021-08-31 08:21:37 -05:00
kamiryo
9f9d82adef Update check29
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Fixed typo
2021-08-30 16:43:42 +09:00
bella-kwon
12c52625c5 Readme and doc resources added 2021-08-30 11:00:31 +09:00
bella-kwon
f33342aef9 Prowler execution script added 2021-08-30 10:59:33 +09:00
bella-kwon
9f435b45fa Organizational prowler template added 2021-08-30 10:59:08 +09:00
Ivan Tay
13b93c81ea Changes to fix bug in extra 784 2021-08-26 09:55:27 +08:00
Toni de la Fuente
06f790858b Fix title, remediation and doc link for check extra768 @w0rmr1d3r
Fix title, remediation and doc link for check extra768 @w0rmr1d3r
2021-08-25 11:28:40 +02:00
Toni de la Fuente
a72a2e9b48 Ignore archived findings in GuardDuty for check extra7139 @chbiel
Ignore archived findings in GuardDuty for check extra7139 @chbiel
2021-08-25 11:26:31 +02:00
Ramon
c14593a40e fix check_extra768 texts 2021-08-20 16:22:52 +02:00
Christopher Biel
321c79a374 Ignore archvived findings, as the check should only look at active findings, not those that were moved to the archive of guardduty 2021-08-19 11:50:16 +02:00
Toni de la Fuente
49261840d0 Fix extra737 remove false positives due to policies with condition @rinaudjaws
Fix extra737 remove false positives due to policies with condition @rinaudjaws
2021-08-18 20:31:26 +02:00
Toni de la Fuente
06157bcb87 Updated prowler-codebuild-role name for CFN StackSets name length limit @varunirv
Updated prowler-codebuild-role name for CFN StackSets name length limit @varunirv
2021-08-18 20:29:17 +02:00
rinaudjaws
38df162976 Remove KMS with conditions false positives
CDK for example implements callerAccount as a condition for the KMS policy resulting in too many false positives.
2021-08-18 08:52:46 +02:00
Rajat
3df5ee330d Updated prowler-codebuild-role name
This change is to fix the issue as reported at
https://github.com/toniblyx/prowler/issues/845
2021-08-13 14:55:12 -04:00
Ramon
fbf7bb0bfe Merge pull request #1 from toniblyx/master
Updating with Upstream
2021-08-13 11:33:04 +02:00
Toni de la Fuente
3b6bc7fa64 2.5 - See release notes https://github.com/toniblyx/prowler/releases/tag/2.5.0
2.5 - See release notes https://github.com/toniblyx/prowler/releases/tag/2.5.0
2021-08-13 11:03:49 +02:00
Toni de la Fuente
e0f60114f4 Consolidated license file 2021-08-13 10:05:56 +02:00
Toni de la Fuente
e39ff9683c Set new version 2.5.0-12August2021 2021-08-12 10:38:59 +02:00
Toni de la Fuente
63233c9333 Changed check textTitle format for default output 2021-08-12 10:37:36 +02:00
Toni de la Fuente
3297fba209 Added new checks to extras 2021-08-10 23:11:50 +02:00
Toni de la Fuente
9c3ab79510 Removed Scored from title 2021-08-10 18:45:39 +02:00
Toni de la Fuente
24dec21aa4 Merge branch '2.5-new-checks' into 2.5 2021-08-10 17:28:48 +02:00
Toni de la Fuente
c8e9cf2e77 Tested new checks 7143 to 7147 2021-08-10 17:00:18 +02:00
Toni de la Fuente
5d4a96c35b Adding custom security checks @nayabpatel
Adding custom security checks @nayabpatel
2021-08-10 15:29:29 +02:00
Toni de la Fuente
4607e519a9 Merge branch '2.5-new-checks' into custom-checks 2021-08-10 15:25:31 +02:00
Toni de la Fuente
eba79e265e Merge branch '2.5' of https://github.com/toniblyx/prowler into 2.5 2021-08-10 15:13:26 +02:00
Toni de la Fuente
f418c706b5 Removed extra756 from extras as duplicated 2021-08-10 15:13:14 +02:00
Toni de la Fuente
7b9a7ccb8a Merge pull request #841 from toniblyx/2.5
2.5
2021-08-10 15:09:11 +02:00
Toni de la Fuente
ad23bddabe Ignore secrets folder in git @w0rmr1d3r
Ignore secrets folder in git @w0rmr1d3r
2021-08-10 15:04:50 +02:00
Toni de la Fuente
d869c748fb Now shows default output regardless custom outputs called with -M 2021-08-10 14:07:31 +02:00
Toni de la Fuente
cdf99c9600 Removed scored info from title 2021-08-10 14:03:13 +02:00
Toni de la Fuente
c6203bf9e3 Clean up redentials report output 2021-08-10 14:02:21 +02:00
Toni de la Fuente
62050e2e34 Added PROWLER_START_TIME to CSV for reports 2021-08-10 14:01:40 +02:00
Ramon
558a9b5f2e ignore secrets folder when scanning for secrets 2021-08-06 11:46:45 +02:00
Toni de la Fuente
d71e4a0214 Updated html report colour contrast for WCAG 2.1 accessibility standards @danielperez660
Updated html report colour contrast for WCAG 2.1 accessibility standards @danielperez660
2021-08-02 15:15:57 +02:00
danielperez660
9c24ae59cf Merge branch '2.5' into master 2021-08-02 14:10:14 +01:00
Toni de la Fuente
98f0755a0f Fix grammar issue in scoring @w0rmr1d3r
Fix grammar issue in scoring @w0rmr1d3r
2021-08-02 15:01:50 +02:00
Toni de la Fuente
38ebad4f00 Delete duplicated check extra737 and its references @w0rmr1d3r
Delete duplicated check extra737 and its references @w0rmr1d3r
2021-08-02 14:15:45 +02:00
Toni de la Fuente
5685cb8959 Merge branch '2.5' into delete_check_extra737_is_duplicated 2021-08-02 14:14:45 +02:00
Toni de la Fuente
ad28cf4671 Delete duplicated check extra756 and its references @w0rmr1d3r
Delete duplicated check extra756 and its references @w0rmr1d3r
2021-08-02 14:12:38 +02:00
daniel
3a66ca336a changes made so there is enough colour contrast for WCAG 2.1 accessibility standards 2021-08-02 13:23:16 +02:00
Toni de la Fuente
26d310e35b Updated Prowler additions policy 2021-07-29 18:37:57 +02:00
Toni de la Fuente
52e04406dc Added servicename to the title for ASFF 2021-07-29 17:03:04 +02:00
Toni de la Fuente
3f63b83179 Added section with info about regions 2021-07-27 15:12:14 +02:00
Toni de la Fuente
4d6285f167 Added s3 and glue required permissions and removed obsoletes 2021-07-27 14:52:23 +02:00
Toni de la Fuente
ffe147b5b5 Added s3 and glue required permissions and removed obsoletes 2021-07-27 14:49:58 +02:00
Toni de la Fuente
c32fa9aa1f Added s3 and glue required permissions 2021-07-27 14:43:20 +02:00
Ramon
9ddb31f9c3 fix grammar issue 2021-07-16 12:26:46 +02:00
Ramon
0d9ec6320e delete check extra737 and its references 2021-07-16 12:09:54 +02:00
Ramon
8c70efde5f delete check extra756 and its references 2021-07-16 12:03:39 +02:00
Toni de la Fuente
065483a8b6 Update check12 - Missing MFA at the beginning of remediation @thorkill
Update check12 - Missing MFA at the beginning of remediation @thorkill
2021-07-16 10:17:28 +02:00
Rafał Leśniak
0a4ca0d2ed Update check12
Added missing MFA in remediation description.
2021-07-16 01:35:46 +02:00
Toni de la Fuente
ab1407217d Enhanced Dockerfile with py3-pip 2021-07-09 13:57:35 +02:00
Toni de la Fuente
265f494b0d Fixed check21 to fail if trail is off 2021-07-08 17:09:22 +02:00
Toni de la Fuente
85cb2085b9 Output consolidation 2021-07-07 16:15:53 +02:00
Toni de la Fuente
5670e4a972 Removed CSV header stdout and add bucket-owner-full-control 2021-07-07 16:00:09 +02:00
Toni de la Fuente
c09385976a Consolidated titles and outputs including resource ID in ASFF 2021-07-05 20:17:27 +02:00
Toni de la Fuente
a9f277e131 Delete util/dashboard directory 2021-07-05 20:16:22 +02:00
Toni de la Fuente
f540758e36 Delete util/ec2-automation directory 2021-07-05 20:15:48 +02:00
Toni de la Fuente
90ae53a976 Delete util/quicksight directory 2021-07-05 20:15:33 +02:00
Toni de la Fuente
24a02c1f71 Merge branch '2.5' of https://github.com/toniblyx/prowler into 2.5 2021-07-05 20:14:03 +02:00
Toni de la Fuente
3936a7b17a Changed how color codes are shown in text mode 2021-07-05 20:11:35 +02:00
Toni de la Fuente
bc959a23f1 License file and banner cosolidation 2021-07-04 12:32:50 +02:00
Toni de la Fuente
d53e6eb3a9 Fixed aws organizations multi-account deployment s3 upload issue @owlvat
Fixed aws organizations multi-account deployment s3 upload issue @owlvat
2021-06-30 10:30:04 +02:00
IB (AWS)
8c74ef102f fixed aws organizations multi-account s3 upload issue 2021-06-28 14:49:54 -07:00
Toni de la Fuente
706d20b5f6 Updated document title 2021-06-24 17:55:46 +02:00
Toni de la Fuente
4e9e421c84 Updated README to include reference to CloudShelld 2021-06-24 17:49:33 +02:00
Patel
800bcb0016 renaming extra checkId, change in text message format, adding more metadata variables, lowercase servicename, adding checks in extras group 2021-06-24 15:47:29 +05:30
Toni de la Fuente
3441b34f01 Add ResourceID to all checks output for ASFF and other output formats @singergs
Add ResourceID to all checks output for ASFF and other output formats @singergs
2021-06-23 23:25:05 +02:00
Toni de la Fuente
dc47d32a36 Update: Add data to the ASFF @singergs
Update: Add data to the ASFF @singergs
2021-06-23 23:18:41 +02:00
Toni de la Fuente
a8ae0bc845 Adding code for running in AWS CloudShell @hackersifu
Adding code for running in AWS CloudShell @hackersifu
2021-06-23 10:34:55 +02:00
Joshua McKiddy
74ddaf8087 Adding code for running in cloudshell 2021-06-22 11:07:14 -07:00
Patel
8a2d2924b4 Fixed typo issues, removed commented line, change in severity 2021-06-17 11:43:19 +05:30
Geoff
4961498562 Added parameter to report resource name
Added a third parameter to checks textFail and textPass to identify resource name in finding.
2021-06-16 22:25:44 -05:00
Geoff
b14ac340bb Update: Add data to the ASFF
Added in the ASFF ProductFields ProwlerResourceName.  The resource name is passed into the fining from the third parameter in the Prowler checks
2021-06-16 09:12:17 -05:00
Toni de la Fuente
86aa9c317f HTML Report: Filtering and other nice things @nickmalcolm
HTML Report: Filtering and other nice things @nickmalcolm
2021-06-14 14:31:48 +02:00
Toni de la Fuente
7dec9f3d52 Merge branch '2.5' into nicer-html 2021-06-14 14:30:04 +02:00
Nick Malcolm
da45af78bc Disable ordering so that it sticks with the order the HTML was generated 2021-06-14 21:13:19 +12:00
Nick Malcolm
01663e4e0d Page width improvements. Use the 'link' icon for the link to docs, to cut down on page width. Remove the status column to save width, and also remove redundancy (colour coding and Result column serve the same purpose). Remove the column widths that added to over 100%. 2021-06-14 21:00:40 +12:00
Nick Malcolm
34e27131fd Refactor the HTML outputs so that they reuse code and are easier to change 2021-06-14 20:46:14 +12:00
Nick Malcolm
89af81ed22 Use DataTable's SearchPanes extension to allow easy filtering by result, severity, region, service, or check. 2021-06-14 20:33:38 +12:00
Nick Malcolm
f5a4e357b9 Consolidate javascript at the bottom of the template. Remove duplicate bootstrap includes - you only need bundle to get Popper (see https://getbootstrap.com/docs/4.0/getting-started/contents/#js-files) and you don't need both plain bootstrap and bundled bootstrap. Remove dupe jQuery too. 2021-06-14 20:27:16 +12:00
Patel
8e9ef841e5 Adding custom security checks 2021-06-14 12:43:21 +05:30
Toni de la Fuente
1229815c04 Add WAF CLASSIC check for extra7129 @kamiryo
Add WAF CLASSIC check for extra7129 @kamiryo
2021-06-11 17:17:28 +02:00
kamiryo
79a0eb622d Add WAF CLASSIC check for extra7129 2021-06-10 23:13:17 +09:00
Toni de la Fuente
f38f99e786 Corrected bug on groups when listing checks @pablopagani
Corrected bug on groups when listing checks @pablopagani
2021-06-10 10:29:37 +02:00
Pablo Pagani
aa3edbc636 corrected bug on groups when listing checks
corrected bug on groups when listing checks (option -l)
Previous regular expression will include groups when it matched half of the check_id
2021-06-09 14:01:27 -03:00
Toni de la Fuente
3f07afd7d4 Added custom file option @yangsec888
Added custom file option @yangsec888
2021-06-08 15:46:47 +02:00
Toni de la Fuente
701d5687be Fixed issue #811 @h1008
Fixed issue #811 @h1008
2021-06-08 14:50:59 +02:00
Toni de la Fuente
382e9c8e00 Align group21 title with the rest @w0rmr1d3r
Align group21 title with the rest @w0rmr1d3r
2021-06-08 14:49:52 +02:00
Ramon
c74faa6d07 add missing * to align with the rest of the titles 2021-06-08 14:18:46 +02:00
h1008
5aeb670a84 Fixed issue #811 2021-06-05 11:57:04 +02:00
Toni de la Fuente
124ae0fd2e Fixed kms keys compatibility in cli v2 and v1 2021-06-02 17:53:12 +02:00
Toni de la Fuente
4ddf0aff86 Added extra7142 to group extras 2021-06-01 12:28:30 +02:00
Toni de la Fuente
96b9accea8 New check extra7142 ALB Header Check request smuggling @Outrun207
New check extra7142 ALB Header Check request smuggling @Outrun207
2021-06-01 12:27:07 +02:00
Toni de la Fuente
324a1002a5 Fix finding customer kms keys in cli v2 for checks extra737 extra736 @dbellizzi
Fix finding customer kms keys in cli v2 for checks extra737 extra736 @dbellizzi
2021-06-01 12:24:19 +02:00
Toni de la Fuente
311d21546d Enhanced -f <filterregion> usage info 2021-06-01 09:10:51 +02:00
Toni de la Fuente
5f1fa558c9 Changes in text output with severity and service name 2021-06-01 09:09:25 +02:00
Toni de la Fuente
9b6198d5b0 Merge branch '2.5' of https://github.com/toniblyx/prowler into 2.5 2021-05-31 18:48:10 +02:00
Toni de la Fuente
55e703540e Fixed typo in check extra7141 ID 2021-05-31 18:47:56 +02:00
Dom Bellizzi
baf5232cbc Fix finding customer kms keys in cli v2 for checks extra737 extra736
Key id is in position 6 in aws cli version 2.2.5, but in position 4 in aws cli 1.x
Use --query to select only the data necessary and output in a consistent format
2021-05-29 22:27:15 +00:00
Josh Moss
e3893c7d5b Update check_extra7142 2021-05-25 13:49:27 -04:00
Sam (Yang) Li
a711b482df Fix #795 custom file option 2021-05-20 14:49:53 -04:00
Josh Moss
229d9ba00c ALB Header Check 2021-05-20 12:36:30 -04:00
Toni de la Fuente
51617df6c9 Bump Alpine to 3.13 in Dockerfile @gliptak
Bump Alpine to 3.13 in Dockerfile @gliptak
2021-05-20 17:10:28 +02:00
Toni de la Fuente
78e5dc5dba Added new check extra7141 to detect secrets in SSM Documents 2021-05-18 18:28:15 +02:00
Toni de la Fuente
1655bdb902 Added resource id to RDS checks and in json,csv,html outputs 2021-05-18 16:57:37 +02:00
Toni de la Fuente
30442b2da7 Added new check extra7140 for public SSM Documents 2021-05-18 16:10:55 +02:00
Toni de la Fuente
501082876c Fixed alias of extra7139 2021-05-18 16:08:10 +02:00
Toni de la Fuente
8d9ca987b5 Added link to doc for check45 check46 extra7138 and extras 2021-05-18 15:41:45 +02:00
Toni de la Fuente
f4cd84afd2 Merge pull request #785 from jfagoagas/new-acls-checks
Added new checks to test Network ACLs open to 22, 3389 and any port
2021-05-18 15:35:33 +02:00
Toni de la Fuente
46c6f44055 Merge branch '2.5' into new-acls-checks 2021-05-18 15:34:27 +02:00
Gábor Lipták
b72f66469e Bump Alpine to 3.13 in Dockerfile 2021-05-17 11:23:51 -04:00
Toni de la Fuente
cf4034c3b4 Improved error handling sts get-caller-identity @pablopagani
Improved error handling sts get-caller-identity @pablopagani
2021-05-04 15:43:29 +02:00
Toni de la Fuente
7c65430508 Improved error handling when listing regions @pablopagani
Improved error handling when listing regions @pablopagani
2021-05-04 15:39:25 +02:00
Toni de la Fuente
497b473431 Added check extra7139 shows number of GuardDuty critical findings @pablopagani
Added check extra7139 shows number of GuardDuty critical findings @pablopagani
2021-05-04 15:35:36 +02:00
Pablo Pagani
5385c4e546 Improved error handling sts get-caller-identity
Instead of looking for a fixed error string, it uses error codes from aws cli
Previos condition was not catching this error message:
An error occurred (ExpiredToken) when calling the GetCallerIdentity operation: The security token included in the request is expired
Also forced the output of the command to json. In some tests I was doing was failing becuase it was sending output as text
2021-05-01 17:54:11 -03:00
Pablo Pagani
9ac8c78fdb improved error handling when listing regions 2021-05-01 17:47:08 -03:00
Pablo Pagani
ce00f3a019 improved error handling. Added check 7139 . 2021-05-01 17:33:54 -03:00
Pepe Fagoaga
2727b7e8e2 fix(network-acls): update resource type to match AWS documentation 2021-04-28 18:50:20 +02:00
Pepe Fagoaga
2dc1ce61ec fix(network-acls): fix line typo 2021-04-26 12:30:44 +02:00
Pepe Fagoaga
625384ad6d feat(network-acls): include checks in networking and internetexposed checks 2021-04-24 13:38:36 +02:00
Pepe Fagoaga
056190cfc9 feat(network-acls): change textFail to textInfo because NACLs are stateless 2021-04-24 13:24:33 +02:00
Pepe Fagoaga
8f784a4548 feat(network-acls): include checks to test NetworkACLs open to 22, 3389 and any port 2021-04-24 13:13:41 +02:00
Pepe Fagoaga
f1185213e8 Merge branch 'master' of github.com:toniblyx/prowler 2021-04-22 18:30:48 +02:00
Pepe Fagoaga
cb60085779 New Networking checks for FTP, Telnet, SQL Server and Kafka (#2)
* feat(aws-securitygroups): include new control to test ingress from 0.0.0.0/0 or ::/0 to FTP ports 20 or 21

* feat(aws-securitygroups): include extra control 7134 in extra group

* feat(aws-securitygroups): include new control to test ingress from 0.0.0.0/0 or ::/0 to Kafka port 9092

* feat(aws-securitygroups): include new control to test ingress from 0.0.0.0/0 or ::/0 to Telnet port 23

* feat(aws-securitygroups): include new control to test ingress from 0.0.0.0/0 or ::/0 to Microsoft SQL Server ports 1433 or 1434

* feat(aws-securitygroups): include extra controls 7135, 7136 and 7137 in extra and internet-exposed groups
2021-04-22 18:29:12 +02:00
Toni de la Fuente
0e33e066cd Added 4 new checks to look for FTP, Telnet, SQL Server and Kafka open ports @jfagoagas
Added 4 new checks to look for FTP, Telnet, SQL Server and Kafka open ports @jfagoagas
2021-04-20 17:23:48 +02:00
Pepe Fagoaga
672f3833fc feat(aws-securitygroups): include extra controls 7135, 7136 and 7137 in extra and internet-exposed groups 2021-04-19 19:31:06 +02:00
Pepe Fagoaga
4327333d00 feat(aws-securitygroups): include new control to test ingress from 0.0.0.0/0 or ::/0 to Microsoft SQL Server ports 1433 or 1434 2021-04-19 19:28:10 +02:00
Pepe Fagoaga
ab43a8b717 feat(aws-securitygroups): include new control to test ingress from 0.0.0.0/0 or ::/0 to Telnet port 23 2021-04-19 19:26:10 +02:00
Pepe Fagoaga
595bcba1d9 feat(aws-securitygroups): include new control to test ingress from 0.0.0.0/0 or ::/0 to Kafka port 9092 2021-04-19 19:24:31 +02:00
Pepe Fagoaga
68b3e1fa06 feat(aws-securitygroups): include extra control 7134 in extra group 2021-04-19 19:19:24 +02:00
Pepe Fagoaga
2ac96cf29a feat(aws-securitygroups): include new control to test ingress from 0.0.0.0/0 or ::/0 to FTP ports 20 or 21 2021-04-19 19:18:23 +02:00
Toni de la Fuente
49533de21b Added support for custom output folder and S3 bucket 2021-04-15 23:51:21 +02:00
Toni de la Fuente
583cffaefb 2.4.1 @toniblyx
2.4.1 @toniblyx
2021-04-15 10:22:00 +02:00
Toni de la Fuente
721b15d105 Fixed issue #776 2021-04-15 09:30:31 +02:00
Toni de la Fuente
53117819fc Fixed credentials renew issue #775 2021-04-14 11:47:38 +02:00
Toni de la Fuente
2552f2977d Fixed issue #775 2021-04-12 21:23:28 +02:00
Toni de la Fuente
8a04f40a80 Fixed issue #774 2021-04-12 20:20:04 +02:00
Toni de la Fuente
b0fd6ce60f Merge pull request #773 from toniblyx/2.4
v2.4
2021-04-09 15:51:44 +02:00
Toni de la Fuente
e4edc2fa2c Improved feature to refresh assume role credentials before it expires 2021-04-09 15:13:13 +02:00
Toni de la Fuente
10d062960e Updated screenshots 2021-04-08 00:35:12 +02:00
Toni de la Fuente
7f24aab715 Updated README 2021-04-08 00:22:07 +02:00
Toni de la Fuente
3dfca9c9dd Improved html output with scoring information 2021-04-08 00:14:24 +02:00
Toni de la Fuente
dacfea6b32 Included Risk, Remediation and Link support for CSV and HTML outputs 2021-04-07 18:42:44 +02:00
Toni de la Fuente
574a9c94b0 Added Risk, Remediation and Link to html report 2021-04-07 18:40:50 +02:00
Toni de la Fuente
7bace94e08 Fixed servicename variable in extra72 2021-04-07 18:39:14 +02:00
Toni de la Fuente
778910eff3 Added new logo to README.md header 2021-04-06 17:32:55 +02:00
Toni de la Fuente
755f7d952f Added new logo 2021-04-06 17:15:33 +02:00
Toni de la Fuente
d02e1967dc Improved PublicIP discovery used in Shodan check_extra7102 @as-km
Improved PublicIP discovery used in Shodan check_extra7102 @as-km
2021-04-06 13:05:27 +02:00
Mateusz
d77001356a use describe-network-interfaces instead of describe-addresses in order to get public IPs #768 2021-04-06 12:57:11 +02:00
Toni de la Fuente
e85d8b2a9d Add check23 to group17_internetexposed group @RyanJarv
Add check23 to group17_internetexposed group @RyanJarv
2021-04-06 12:01:52 +02:00
Toni de la Fuente
4f16c8dec5 Merge pull request #766 from toniblyx/revert-765-patch-2
Revert "Add check23 to group17_internetexposed group"
2021-04-05 21:17:35 +02:00
Toni de la Fuente
236ce1fb21 Revert "Add check23 to group17_internetexposed group" 2021-04-05 21:16:58 +02:00
Toni de la Fuente
15230ae6f3 Add check23 to group17_internetexposed @RyanJarv
Add check23 to group17_internetexposed @RyanJarv
2021-04-05 21:16:54 +02:00
Ryan Gerstenkorn
6c5776106f Add check23 to group17_internetexposed group
This add's the following check to group17.

* 2.3 [check23] Ensure the S3 bucket CloudTrail logs to is not publicly accessible (Scored)
2021-04-05 12:07:08 -07:00
Toni de la Fuente
4100d1dbfd Replace empty space with '\s' in check43 regex @frannovo
Replace empty space with '\s' in check43 regex @frannovo
2021-04-05 15:49:04 +02:00
Toni de la Fuente
abcd299559 Add get_regions function in order to call after assume_role @HG00
Add get_regions function in order to call after assume_role @HG00
2021-04-05 15:35:54 +02:00
Toni de la Fuente
f6049a0597 Merge branch '2.4' into master 2021-04-05 15:27:31 +02:00
HG00
bb397baa8a Add get_regions function in order to call after assume_role 2021-03-30 11:53:24 +00:00
Toni de la Fuente
c0f3265754 Better handle permissions and errors 2021-03-24 15:41:51 +01:00
Toni de la Fuente
9614b6fc82 Merge branch '2.4' of https://github.com/toniblyx/prowler into 2.4 2021-03-24 15:12:48 +01:00
Toni de la Fuente
a9d56be81a Added risk, remediation, doc link and caf epic to checks 742 to 7133 2021-03-24 15:12:32 +01:00
Toni de la Fuente
0c4111efda Moved assume role before listing regions fixes issue #744 2021-03-24 15:11:00 +01:00
Toni de la Fuente
5fb2e496a9 Added risk, remediation, doc link and caf epics to controls 1 to 741 @pablopagani
Added risk, remediation, doc link and caf epics to controls 1 to 741 @pablopagani
2021-03-24 14:36:54 +01:00
Pablo Pagani
7b4dae634e Merge branch '2.4' of https://github.com/pablopagani/prowler into 2.4 2021-03-24 10:23:04 -03:00
Pablo Pagani
35a22a71cd added risk remediation doc and epics to controls 1 to 741 2021-03-24 10:22:29 -03:00
Toni de la Fuente
21f817b087 Removed textInfo extra information on extra712 2021-03-24 12:30:59 +01:00
Toni de la Fuente
923dc3403b Added risk, remediation, doc link and epics to first 3 checks @pablopagani
Added risk, remediation, doc link and epics to first 3 checks
2021-03-24 09:08:19 +01:00
Pablo Pagani
68d240939c added risk, remediation doc and epics to firts 3 checks 2021-03-23 15:23:55 -03:00
Pablo Pagani
a9d0649122 added risk, remediation doc and epics to firts 3 checks 2021-03-23 15:19:23 -03:00
Fran Novo
3eeba2ef4e Replace empty space with '\s' in check43 regex 2021-03-15 17:45:49 +01:00
Toni de la Fuente
806eaa0b98 Updated ProwlerExecRoleAdditionalViewPrivileges Policy with lambda:GetFunction
Updated ProwlerExecRoleAdditionalViewPrivileges Policy with lambda:GetFunction
2021-03-11 14:27:52 +01:00
Pepe Fagoaga
2cd8d15410 Merge pull request #1 from toniblyx/master
Include missing AWS function policy to check AWS Lambda
2021-03-11 13:33:11 +01:00
Toni de la Fuente
d8473cfe87 Include missing AWS function lambda:GetFunction policy in prowler-additions-policy.json to check AWS Lambda @jfagoagas
Include missing AWS function lambda:GetFunction policy in prowler-additions-policy.json to check AWS Lambda @jfagoagas
2021-03-11 13:13:06 +01:00
Pepe Fagoaga
34625ff4e7 fix: include lambda:GetFunction in prowler policy to check AWS Lambda related controls: extra720,extra759,extra760,extra762,extra798 2021-03-11 12:48:32 +01:00
Toni de la Fuente
097ddbb957 Added extra7133 RDS multi-AZ 2021-03-04 20:29:40 +01:00
Toni de la Fuente
db1380422f Added high level architecture 2021-02-25 11:56:45 +01:00
Toni de la Fuente
669cb6f1a9 Added IAM to extra7100 title 2021-02-25 11:56:22 +01:00
Toni de la Fuente
fa2a40f5c0 Fix output on extra731 2021-02-23 18:27:38 +01:00
Toni de la Fuente
80b94eb667 Fix output on extra731 2021-02-23 18:24:26 +01:00
Toni de la Fuente
b633ec8bef Added more checks mappings to ISO27001 group and reordered the list @mario-platt
Added more checks mappings to ISO27001 group and reordered the list @mario-platt
2021-02-22 23:21:32 +01:00
Toni de la Fuente
a6ee7922c6 Cloudtrail metrics (check3x) pass if found on any, not every, cloudtrail log @zfLQ2qx2
Cloudtrail metrics (check3x) pass if found on any, not every, cloudtrail log @zfLQ2qx2
2021-02-22 23:18:31 +01:00
Toni de la Fuente
2883de016e Ensure check28 only looks at symmetric keys 2021-02-22 23:15:06 +01:00
Toni de la Fuente
f94bf38bdc Merge pull request #752 from toniblyx/revert-742-check28-asymmetric-keys
Revert "check28 only look at symmetric keys"
2021-02-22 23:05:52 +01:00
Toni de la Fuente
5d7d9efa69 Revert "check28 only look at symmetric keys" 2021-02-22 23:05:05 +01:00
Toni de la Fuente
1d0887ac89 Make check28 only look at symmetric keys @mdop-wh
Make check28 only look at symmetric keys @mdop-wh. Asymmetric keys don't support automatic rotation.
2021-02-22 22:36:53 +01:00
Toni de la Fuente
e0dbfaaa37 Merge branch 'master' into check28-asymmetric-keys 2021-02-22 22:35:32 +01:00
Toni de la Fuente
b68cf876bc Merge pull request #751 from toniblyx/revert-736-universal_epoch_time
Revert "Implement OS neutral method of converting rfc3339 dates to epoch"
2021-02-22 21:54:08 +01:00
Toni de la Fuente
97a7471f24 Revert "Implement OS neutral method of converting rfc3339 dates to epoch" 2021-02-22 21:52:19 +01:00
Toni de la Fuente
5d3c526ba7 Implement OS neutral method of converting rfc3339 dates to epoch @zfLQ2qx2
Implement OS neutral method of converting rfc3339 dates to epoch
2021-02-22 21:47:06 +01:00
Toni de la Fuente
3d834fae42 Fix typos and add to extras extra7132 2021-02-22 21:44:48 +01:00
Toni de la Fuente
aa3f8a6b5c Add check for RDS enhanced monitoring @mpratsch
Add check for RDS enhanced monitoring @mpratsch
2021-02-22 21:41:24 +01:00
Toni de la Fuente
bddf71d5e6 Add access checks for several checks @zfLQ2qx2
Add access checks for several checks @zfLQ2qx2 (21,22,23,24,25,26,27,28,29,720,725)
2021-02-22 21:38:39 +01:00
Toni de la Fuente
8a32d8ae5f Force default AWS CLI output issue #696 @Kirizan
Force default AWS CLI output issue #696 @Kirizan
2021-02-22 21:31:32 +01:00
Mario Platt
78c2cacfd9 added more checks mappings to ISO27001 group, and reordered the list of comment mappings to go from lower to highest requirements in ISO 2021-02-19 14:23:26 +00:00
C.J
7e6291c51d Cloudtrail metrics pass if found on any, not every, cloudtrail log 2021-02-09 12:29:43 -05:00
Toni de la Fuente
138ece153e Adjusted severity to secrets and Shodan checks 2021-02-05 08:39:02 +01:00
Toni de la Fuente
5d04febf81 Adjusted severity like in Security Hub 2021-02-05 08:34:34 +01:00
Martina Rath
696a776e2e Move extra7132 to rd group and add CHECK_SERVICENAME to check 2021-02-05 08:32:06 +01:00
Martina Rath
073d2ab727 Add check if Enhanced monitoring is enabled on RDS instances 2021-02-05 08:12:11 +01:00
Michael Dop
7e8de8adb8 check28 only look at symmetric keys
AWS doesn't support the automatic rotation of asymmetric keys
2021-02-04 10:07:27 -05:00
C.J
de87de3b39 Add access checks for several checks 2021-02-03 17:07:02 -05:00
Toni de la Fuente
e91e2cfee6 Updated extra73 with service name
Updated extra73 with service name
2021-02-03 14:55:15 +01:00
Toni de la Fuente
d33c82cd00 Merge branch 'master' into patch-1 2021-02-03 14:54:22 +01:00
Toni de la Fuente
0e3e4a9227 Updated
added CHECK_SERVICENAME_extra73="s3"
2021-02-03 14:51:11 +01:00
Toni de la Fuente
bea84ad6d3 Fix title grammar in check_extra73 @CenturionGamer
Fix title grammar in check_extra73 @CenturionGamer
2021-02-03 14:49:35 +01:00
Toni de la Fuente
79c4a65ba8 Improved to consider services and severity 2021-02-02 17:36:35 +01:00
Toni de la Fuente
e6d175d62e Check for errors generating credential report, limit loop iterations @zfLQ2qx2
Check for errors generating credential report, limit loop iterations @zfLQ2qx2
2021-02-02 15:28:32 +01:00
CenturionGamer
880523880d Update check_extra73
Fixed the grammar by removing "the" in the description.
2021-01-28 13:06:44 -05:00
C.J
cbcc8c61a5 Implement OS neutral method of converting rfc3339 dates to epoch 2021-01-26 14:54:27 -05:00
Toni de la Fuente
f9c2e0cf26 Revert PR #718 2021-01-22 16:17:26 +01:00
Toni de la Fuente
6f371744dc Added AWS service name to json, csv and html outputs 2021-01-22 10:56:59 +01:00
Toni de la Fuente
dfdff6e863 Added service name to all checks 2021-01-22 00:23:53 +01:00
Toni de la Fuente
8ed40791ad Added service name to sample check 2021-01-22 00:21:26 +01:00
Toni de la Fuente
f85845c26b Added service name to all checks 2021-01-22 00:19:45 +01:00
Toni de la Fuente
73cac580f3 Added severity field to CSV and HTML output reports 2021-01-21 22:42:40 +01:00
Toni de la Fuente
6bb49fd162 Merge branch 'master' of https://github.com/toniblyx/prowler 2021-01-21 22:40:50 +01:00
Toni de la Fuente
478cb4aa54 Adjusted severity variable 2021-01-21 22:40:25 +01:00
Toni de la Fuente
47aa6998f4 Update check_extra7130 profile parameter was not set @soffensive
Update check_extra7130 profile parameter was not set @soffensive
2021-01-18 17:07:00 +01:00
soffensive
f7e4a1f6a4 Update check_extra7130
Profile was not set
2021-01-18 16:41:18 +01:00
Toni de la Fuente
b1332f1154 Fix regex in check43 @ilyas28
Fix regex in check43 @ilyas28
2021-01-15 13:05:29 +01:00
İlyas Apaydın
8e35e63359 fix regex in check43 2021-01-14 13:38:33 +03:00
C.J
be3e771454 Check for errors generating credential report, limit loop iterations 2021-01-14 04:41:16 -05:00
Toni de la Fuente
f5b26387f0 Clear AWS_DEFAULT_OUTPUT on start @zfLQ2qx2
Clear AWS_DEFAULT_OUTPUT on start @zfLQ2qx2
2021-01-14 10:19:07 +01:00
C.J
ed0f01b617 Clear AWS_DEFAULT_OUTPUT on start 2021-01-14 04:01:40 -05:00
Toni de la Fuente
d047cd807a Fix check extra73 fail message omits bucket name @zfLQ2qx2
Fix check extra73 fail message omits bucket name @zfLQ2qx2
2021-01-14 09:28:44 +01:00
C.J
6a9a47e549 Fix for issue 713 2021-01-13 19:16:48 -05:00
Toni de la Fuente
6cbee3b16c Fix log metric filter check3x with multiple trails @bridgecrewio
Fix log metric filter check3x with multiple trails @bridgecrewio
2021-01-13 23:08:17 +01:00
Toni de la Fuente
a53aeff0e8 Catch errors assuming role and describing regions @zfLQ2qx2
Catch errors assuming role and describing regions @zfLQ2qx2
2021-01-13 22:50:11 +01:00
Toni de la Fuente
81787d1946 Add check for AccessDenied when calling GetBucketLocation in extra73,extra734,extra764 @zfLQ2qx2
Add check for AccessDenied when calling GetBucketLocation in extra73,extra734,extra764 @zfLQ2qx2
2021-01-13 22:35:20 +01:00
Toni de la Fuente
b23f9b3b5d Fix changes made in check27 2021-01-13 22:21:45 +01:00
Toni de la Fuente
51d6fc99ed Handle shadow CloudTrails more gracefully in checks check21,check22,check24,check27 @zfLQ2qx2
Handle shadow CloudTrails more gracefully in checks check21,check22,check24,check27 @zfLQ2qx2
2021-01-13 21:35:07 +01:00
Toni de la Fuente
0d4988b874 Additional check for location of awscli @zfLQ2qx2
Additional check for location of awscli @zfLQ2qx2
2021-01-13 21:25:04 +01:00
Toni de la Fuente
17c0409d35 Fix date command for busybox @zfLQ2qx2
Fix date command for busybox @zfLQ2qx2
2021-01-13 21:19:07 +01:00
C.J
1d9c1eaece Catch errors assuming role and describing regions 2021-01-13 09:44:15 -05:00
Toni de la Fuente
d77f1ea651 Add new check extra7131 RDS minor version upgrade 2021-01-13 12:58:23 +01:00
Toni de la Fuente
2bc3fcf7ee Add new check extra7131 RDS minor version upgrade 2021-01-13 12:57:08 +01:00
Toni de la Fuente
bcdd12bf84 Add new check extra7131 RDS minor version upgrade 2021-01-13 12:51:49 +01:00
C.J
733c99c1e0 Add check for AccessDenied when calling GetBucetLocation 2021-01-12 15:38:47 -05:00
C.J
ecc08722e1 Handle shadow cloudtrails more gracefully 2021-01-12 13:37:30 -05:00
C.J
f53a32ae26 Additional check for location of awscli 2021-01-12 11:03:30 -05:00
C.J
bf1bd505c5 Fix for busybox date command 2021-01-12 09:11:52 -05:00
Toni de la Fuente
eac59cade8 Add new check extra_7130 to check encryption of a SNS topic @mpratsch
Add new check extra_7130 to check encryption of a SNS topic @mpratsch
2021-01-08 13:54:55 +01:00
Martina Rath
994abe8fa3 Add check7130 to group7_extras and fix some issues 2021-01-08 13:43:46 +01:00
Toni de la Fuente
6ad1816e37 Fix EKS related checks regarding us-west-1 @njgibbon
Fix EKS related checks regarding us-west-1 @njgibbon
2021-01-07 19:29:22 +01:00
Toni de la Fuente
20b8b1eb1f Enhance check extra792 to accept current most restrictive TLSv1.2 @bazbremner
Enhance check extra792 to accept current most restrictive TLSv1.2 @bazbremner
2021-01-07 19:22:20 +01:00
Martina Rath
9a060a3c43 Add new extras check (7130) to check encryption of a SNS topic 2020-12-30 08:46:13 +01:00
Barrie Bremner
75e5de9c37 Accept current most restrictive TLSv1.2-only ALB security policy as secure
The `ELBSecurityPolicy-FS-1-2-Res-2020-10` policy is the most
restrictive TLS v1.2 only SSL/TLS security policy available, and is a
subset of the already accepted `ELBSecurityPolicy-FS-1-2-Res-2019-08`
policy - this commit adds `ELBSecurityPolicy-FS-1-2-Res-2020-10` to
the list of acceptable "secure" security policies.

`ELBSecurityPolicy-FS-1-2-Res-2020-10` has a very limited set of
ciphers, is TLS v1.2 only and supports Forward Secrecy.

Current SSL Labs tests gives it an "A" rating for another source of
confirmation.
2020-12-24 16:52:01 +00:00
njgibbon
4adc7f5864 feat - fix - taking out eks check condition because california region 2020-12-24 00:00:06 +00:00
Toni de la Fuente
0ddb045ca2 Update README.md 2020-12-18 15:27:59 +01:00
Toni de la Fuente
297eeea783 Label version 2.3.0-18122020 2020-12-18 13:09:47 +01:00
Toni de la Fuente
d540cefc23 Fix FreeBSD $OSTYPE check @ring-pete
Fix FreeBSD $OSTYPE check @ring-pete
2020-12-18 10:24:48 +01:00
Toni de la Fuente
953bdf3034 Merge branch 'master' into master 2020-12-18 10:24:25 +01:00
Toni de la Fuente
823c7d4b61 Enhanced check extra740: reworked to consider all snapshots, use JMESPath query @pacohope
Enhanced check extra740: reworked to consider all snapshots, use JMESPath query
2020-12-18 10:17:52 +01:00
Toni de la Fuente
e298158bcd Enhanced error handling without credentials 2020-12-17 17:15:17 +01:00
Toni de la Fuente
810801fb3d Fix error handling for SubscriptionRequiredException in extra77 2020-12-17 16:52:18 +01:00
Toni de la Fuente
91ce905a5a Fix issue assuming role in regions with STS disabled 2020-12-17 16:34:10 +01:00
Toni de la Fuente
6ed6a47f8f Add sleep to extra7102 to avoid Shodan API limits 2020-12-17 15:27:00 +01:00
Toni de la Fuente
347872a6de Refresh assumed role credentials to avoid role chaining limitations @michael-dickinson-sainsburys
Refresh assumed role credentials to avoid role chaining limitations @michael-dickinson-sainsburys
2020-12-17 15:24:06 +01:00
Toni de la Fuente
8c19583ac7 Update prowler
Adapted execute_check to renew creds
2020-12-17 15:21:50 +01:00
Toni de la Fuente
5c620949f0 Update os_detector
Change above is because epoch time generator in BSD is 1h less than in Linux
2020-12-17 15:20:20 +01:00
Toni de la Fuente
5be38a15d9 Update os_detector bsd_convert_date_to_timestamp 2020-12-17 10:24:25 +01:00
Toni de la Fuente
5e38c61286 Refresh assumed role credentials to avoid role chaining limitations @michael-dickinson-sainsburys
Refresh assumed role credentials to avoid role chaining limitations @michael-dickinson-sainsburys
2020-12-16 20:04:21 +00:00
Toni de la Fuente
de3e2c3a2b Added support to run inside AWS CloudShell 2020-12-16 13:41:54 +01:00
Toni de la Fuente
687cfd0a34 Merge pull request #709 from toniblyx/revert-694-master
Revert "Refresh assumed role credentials to avoid role chaining limitations"
2020-12-15 17:38:00 +01:00
Toni de la Fuente
aa0440e426 Revert "Refresh assumed role credentials to avoid role chaining limitations" 2020-12-15 17:37:42 +01:00
Toni de la Fuente
31182059e4 Refresh assumed role credentials to avoid role chaining limitations @michael-dickinson-sainsburys
Refresh assumed role credentials to avoid role chaining limitations @michael-dickinson-sainsburys
2020-12-15 17:29:11 +01:00
Toni de la Fuente
e047dc8764 Added latest checks to extras group 2020-12-15 15:10:33 +01:00
Toni de la Fuente
7f1df739c4 Added -N <shodan_api_key> support for extra7102 2020-12-15 12:25:47 +01:00
Toni de la Fuente
9ed576b09d Fix issue in extra776 when ECR Scanning imageDigest @adamcanzuk
Fix issue in extra776 when ECR Scanning imageDigest @adamcanzuk
2020-12-14 12:59:19 +01:00
Paco Hope
f3dbecbe89 reworked check740 to consider all snapshots, use JMESPath query, and to limit its output according to max-items 2020-12-10 09:27:43 -05:00
Toni de la Fuente
3d62aedf29 New RC6 including ENS as a new compliance type all formats 2020-12-01 10:03:59 +01:00
Toni de la Fuente
30937c3275 Updated ENS group with new checks 2020-12-01 09:56:08 +01:00
Toni de la Fuente
63040e1c07 New 7 checks required for ENS 2020-12-01 09:55:20 +01:00
Michael Dickinson
30eb447919 docs: Update Organizations command to only incude active accounts 2020-11-23 21:05:27 +00:00
Michael Dickinson
5da54467b5 fix: Refresh assumed role credentials if session is nearing expiration 2020-11-23 21:05:20 +00:00
Michael Dickinson
8ab91e9f8e fix: Store assumed role expiry time for later checking 2020-11-23 21:05:11 +00:00
mikeurbanski1
4fddb7fa63 Fix log metric filter checks (#33)
* debug statements for issue demonstration

* use separate array elements

* add debug and comments

* clean up debug statements
2020-11-23 09:26:44 -06:00
Pete Wright
65bbdfdd83 Fix FreeBSD $OSTYPE check
As per this bug report:
https://github.com/toniblyx/prowler/issues/693

Add detection for freebsd releases which should be similar to darwin
in that it will use GNU coreutils for date and base64.
2020-11-20 13:29:21 -08:00
nikirby
013b106564 Merge branch 'master' of github.com:Kirizan/prowler 2020-11-20 15:22:31 -05:00
nikirby
fa72e7c21f Ensures JSON is the default AWS command output. 2020-11-20 15:16:22 -05:00
Toni de la Fuente
25a04cd59e Merge branch 'master' of https://github.com/toniblyx/prowler into master 2020-11-20 15:07:48 +01:00
Toni de la Fuente
72303ea126 Fixed syntax typo 2020-11-20 15:04:47 +01:00
Toni de la Fuente
600a7c9f2f Adapt check119 to exclude instances shutting down @stku1985
Adapt check119 to exclude instances shutting down @stku1985
2020-11-18 15:30:57 +01:00
Toni de la Fuente
53e95ac9f3 Improved CodeBuild CFN template with scheduler and documentation 2020-11-18 15:12:44 +01:00
Toni de la Fuente
1f6931a591 Merge branch 'master' of https://github.com/toniblyx/prowler into master 2020-11-18 14:48:47 +01:00
Toni de la Fuente
fdc8c1ce36 Added session durantion option to 12h 2020-11-18 14:48:34 +01:00
Toni de la Fuente
a8fed14cea Fixed extra7116 extra7117 outputs and added to extras @ramondiez
Fixed extra7116 extra7117 outputs and added to extras @ramondiez
2020-11-18 13:41:12 +01:00
Toni de la Fuente
f3d4cc8514 Fixed extra7116 extra7117 outputs and added to extras 2020-11-18 13:31:20 +01:00
Stefan Kunkel
7397126794 adapt check119 to exclude instances shutting down
brain fart: used logical 'or' instead of correct '&&'
2020-11-18 13:25:28 +01:00
Toni de la Fuente
11bf35d993 Enhancement check119 to exclude instances shutting-down @stku1985
Enhancement check119 to exclude instances shutting-down in addition to terminated ones
2020-11-18 13:21:52 +01:00
Stefan Kunkel
147fac0777 adapt check119 to exclude instances shutting down 2020-11-18 13:20:55 +01:00
Ramon Diez
49423dee4a fixing check_extra7116 and check_extra7117 2020-11-18 12:42:01 +01:00
Toni de la Fuente
345a8d48c4 Added group for ENS - Spanish Esquema Nacional de Seguridad 2020-11-18 11:45:07 +01:00
Toni de la Fuente
1576f2ba39 Added start build automatically 2020-11-16 20:15:41 +01:00
Toni de la Fuente
0bd1fefd7d Glue checks additional @dlpzx
Glue checks additional  @dlpzx
2020-11-16 18:32:09 +01:00
Toni de la Fuente
c2a2e393cb Merge branch 'master' into dlpzx-master 2020-11-16 18:31:18 +01:00
Toni de la Fuente
7cd1413c93 Glue grup 2 corrections 2020-11-16 18:29:16 +01:00
Toni de la Fuente
9c39f69210 Glue checks part 1 @ramondiez
Glue checks part 1 @ramondiez
2020-11-16 17:55:50 +01:00
Toni de la Fuente
6e604e1834 Some corrections for glue related checks 2020-11-16 17:51:53 +01:00
Toni de la Fuente
b702990ea6 Fix: Security Hub eventual consistency + PREFIX query bug + Archive PASSED @xeroxnir
Fix: Security Hub eventual consistency + PREFIX query bug + Archive PASSED
2020-11-13 19:16:58 +01:00
Toni de la Fuente
594215661d Fix for check_extra764 @grzegorznittner
Fix for check_extra764 fix #680
2020-11-13 19:10:41 +01:00
Toni de la Fuente
b32538b7e5 Glue review 2 2020-11-13 19:05:19 +01:00
Toni de la Fuente
8c9d843813 Glue review 1 2020-11-13 19:02:26 +01:00
Toni de la Fuente
c934e788b7 Center logo in html report 2020-11-13 18:22:09 +01:00
Grzegorz Nittner
c9ca8d48b1 #680 - fix for check_extra764 2020-11-13 14:56:22 +00:00
Joaquin Rinaudo
f6d17ba6e0 fix(securityhub): consistency + prefix bug + PASSED
fix(securityhub): consistency + prefix bug + PASSED
2020-11-12 21:48:21 +01:00
Ramon Diez
0bfa263ad9 Fixing some descriptions 2020-11-12 12:30:22 +01:00
dlpzx
943b096f35 checks for glue - 7119, 7121, 7123 2020-11-12 12:06:43 +01:00
dlpzx
888133e986 checks for glue - 7119, 7121, 7123,7124,7125 2020-11-10 13:06:03 +01:00
dlpzx
39a7c3b18e checks for glue - 7119, 7121, 7123,7124,7125 2020-11-10 13:05:22 +01:00
dlpzx
ebe2594456 checks for glue - 7119, 7121, 7123,7124,7125 2020-11-09 19:17:00 +01:00
dlpzx
e0a8e0f318 checks for glue - 7119, 7121, 7123,7124,7125 2020-11-09 18:48:11 +01:00
Toni de la Fuente
7dbed63143 Added CodeBuild deployment section 2020-11-05 21:49:05 +01:00
Toni de la Fuente
2304d14f28 Added CodeBuild template - original from @stevecjones 2020-11-05 00:35:05 +01:00
Ramon Diez
954848c6e8 Glue checks part 1 2020-11-04 10:44:43 +01:00
Toni de la Fuente
97055e84b4 Fix quotes in check extra78 for public RDS instances @goldfiglabs
Fix quotes in check extra78 for public RDS instances @goldfiglabs
2020-11-03 23:31:44 +01:00
Toni de la Fuente
6188021e63 Adding fix to generate test summary so reports display graphs correctly @stevecjones
Adding fix to generate test summary so reports display graphs correctly @stevecjones
2020-11-03 21:14:05 +01:00
dlpzx
65c63d5bdd checks for glue - 7119,7121,7123,7124. 7125 not done yet 2020-11-03 19:18:40 +01:00
Toni de la Fuente
180f12d625 Fix extra7111 parser error 2020-11-03 13:48:39 +01:00
Toni de la Fuente
62fcbf2f05 Fix extra7103 parser error 2020-11-03 13:44:24 +01:00
Toni de la Fuente
3844c2151b Merge branch 'master' of https://github.com/toniblyx/prowler into master 2020-11-03 13:34:05 +01:00
Toni de la Fuente
5d4648c812 Fix extra7108 parser error 2020-11-03 13:33:51 +01:00
Stephen Jones
e7f837eb7b Correct typo and simplify count 2020-11-03 22:45:27 +11:00
Toni de la Fuente
f0949f6ec6 Enable Security Hub official integration and version 2.3.0RC5 @toniblyx
Enable Security Hub official integration and version 2.3.0RC5 @toniblyx
2020-10-30 19:36:45 +01:00
Stephen Jones
87f91cf467 Removing gnarly code and add refined counters for summary metrics in output 2020-10-30 22:51:11 +11:00
Toni de la Fuente
ae1d7be7f2 Enable Security Hub official integration 2020-10-29 22:40:38 +01:00
Greg Soltis
7585ad7d57 Fix check for public rds instances 2020-10-26 11:39:37 -07:00
Stephen Jones
2756f16c87 Adding fix to generate test summary so reports display graphs correctly 2020-10-22 02:15:15 +11:00
Toni de la Fuente
d6760f15b7 fix extra7110 title 2020-10-20 13:30:26 +02:00
Toni de la Fuente
b8e1ef6b33 Fix check_extra7107 condition 2020-10-20 13:20:15 +02:00
Toni de la Fuente
79808fbe30 Fix syntax in extra7110 2020-10-20 09:29:30 +02:00
Toni de la Fuente
c34535f585 Fix report metadata in html output 2020-10-15 22:01:28 +02:00
Toni de la Fuente
fa925bdef2 Fix account id in output file name 2020-10-15 21:56:44 +02:00
Toni de la Fuente
a05aba84e1 Added GovCloud usage information 2020-10-14 22:29:51 +02:00
Toni de la Fuente
19b894c14b Added extra7113: Check RDS instances deletion protection @gchib297
Added extra7113: Check RDS instances deletion protection @gchib297
2020-10-08 22:46:31 +02:00
gchib
23df3dd8d0 Add extra7113: Check RDS deletion protection 2020-10-08 17:21:26 +05:30
gchib
5994700c09 Add check extra7113 2020-10-08 17:19:58 +05:30
gchib
ba7c3a3124 Add extra7113: Check RDS deletion protection 2020-10-08 17:18:56 +05:30
Toni de la Fuente
b512585d80 Added all new Sagemaker checks to extras 2020-10-06 16:43:21 +02:00
Toni de la Fuente
645ea25ddc New group for Sagemaker with 10 new controls 2020-10-06 16:40:19 +02:00
Toni de la Fuente
923267c3e5 extra7102 increased severity to medium 2020-10-06 16:39:39 +02:00
Toni de la Fuente
2fb9588883 Add extra7102 to groups extras and internetexposed 2020-10-02 19:14:37 +02:00
Toni de la Fuente
ffcb6a0b69 Added extra7102 ElasticIP Shodan integration 2020-10-02 19:10:00 +02:00
Toni de la Fuente
ad45035ad3 Updated README.md 2020-09-30 23:43:48 +02:00
Toni de la Fuente
62a87d961c Add SOC2 compliance group @gchib297
Add SOC2 compliance group @gchib297
2020-09-30 22:59:51 +02:00
Toni de la Fuente
6aa8dd643d Add check extra798 to gdpr and pci groups @gchib297
Add check extra798 to gdpr and pci groups @gchib297
2020-09-30 22:58:28 +02:00
Toni de la Fuente
f674868dd9 Add check extra798 to iso27001 @gchib297
Add check extra798 to iso27001 @gchib297
2020-09-30 22:57:35 +02:00
Toni de la Fuente
859951a63c Add FFIEC cybersecurity assessment group @gchib297
Add FFIEC cybersecurity assessment group @gchib297
2020-09-30 22:56:37 +02:00
gchib
a3a71f499c Add SOC2 compliance group 2020-09-30 17:44:19 +05:30
gchib
cf62f2bb05 Add check extra798 to PCI 2020-09-30 17:36:20 +05:30
gchib
dd05575508 Add check extra798 to GDPR 2020-09-30 17:33:41 +05:30
gchib
ff19182cf1 Add check extra798 to iso27001 2020-09-30 17:19:06 +05:30
gchib
58c4af98d1 Add FFIEC group
Add FFIEC Cybersecurity assessment checks
2020-09-30 17:10:56 +05:30
Toni de la Fuente
8e1fac1b7c Added checks about EKS to groups internet-exposed and forensics 2020-09-28 09:41:40 +02:00
Toni de la Fuente
d620754bae Added extra796 EKS control plane access to internet-exposed group 2020-09-28 09:36:04 +02:00
Toni de la Fuente
cf926e6f5a Added coreutils to Dockerfile 2020-09-24 14:58:10 +02:00
Toni de la Fuente
60c741a202 Merge branch 'master' of https://github.com/toniblyx/prowler into master 2020-09-24 14:55:20 +02:00
Toni de la Fuente
c14799915c Fix issue #659 2020-09-24 14:55:10 +02:00
Toni de la Fuente
9165d3a8ba Fix SecurityHub: other os/check fixes + batch in 100 findings @xeroxnir
fix(securityhub): other os/check fixes + batch in 100 findings
2020-09-24 10:29:04 +02:00
Joaquin Rinaudo
321401f755 fix(securityhub): other os/check fixes + batch in 100 findings 2020-09-24 09:34:09 +02:00
Toni de la Fuente
5182403041 Improved documentation about SecurityHub integration and region filter 2020-09-23 15:30:08 +02:00
Toni de la Fuente
4d9473881f Fixed title id for eks-cis 2020-09-18 18:47:14 +02:00
Toni de la Fuente
88e67cc42d Merge branch 'master' of https://github.com/toniblyx/prowler into master 2020-09-18 18:44:11 +02:00
Toni de la Fuente
0f84181d89 Added new check [extra7101] Check if Amazon Elasticsearch Service (ES) domains have audit logging enabled 2020-09-18 18:44:01 +02:00
Toni de la Fuente
4c0dd42214 Fix security-hub integration: Race condition timestamp xeroxnir
Fix(security-hub): Race condition timestamp
2020-09-18 18:19:50 +02:00
Joaquin Rinaudo
660bbf5676 fix(security-hub): race condition timestamp 2020-09-18 18:14:05 +02:00
Toni de la Fuente
a9b946b4e6 Merge branch 'master' of https://github.com/toniblyx/prowler into master 2020-09-18 15:29:12 +02:00
Toni de la Fuente
903840970b Merge pull request #657 from xeroxnir/master
Security Hub: Bugfix missing ","
2020-09-18 15:28:18 +02:00
Joaquin Rinaudo
65638af6a1 bugfix(securityhub): missing , 2020-09-18 15:25:51 +02:00
Toni de la Fuente
a6bd8a59bf Security Hub: Mark as ARCHIVED + fix race condition @xeroxnir
Security Hub: Mark as ARCHIVED + fix race condition @xeroxnir
2020-09-18 15:19:12 +02:00
Joaquin Rinaudo
09212add77 fix(debug): resolveSecurityHubPreviousFails 2020-09-18 15:09:38 +02:00
Joaquin Rinaudo
b7c1823ec9 fix(securityhub): add RecordState outputs 2020-09-18 14:59:28 +02:00
Joaquin Rinaudo
c1b09b6b9d bugfix(securityhub): race condition fix 2020-09-18 14:52:32 +02:00
Joaquin Rinaudo
0f3e6ee90b feature(security-hub): archive finding instead of mark as PASSED 2020-09-18 14:07:00 +02:00
Toni de la Fuente
70aed72aff Added parameters and made the template parameterised @pacohope
Added parameters and made the template parameterised @pacohope
2020-09-18 11:57:35 +02:00
Paco Hope
d012342422 added parameters and made the template parameterised. 2020-09-17 12:06:33 -04:00
Toni de la Fuente
7bfeebe2a2 Title adjustments for internetexposed iso27001 and eks-cis groups 2020-09-17 16:51:48 +02:00
Toni de la Fuente
448f506882 Merge pull request #654 from marcjay/patch-1
Add GetFindings action to example IAM policy for Security Hub
2020-09-17 09:39:45 +02:00
Marc Jay
7e2110dc4e Add GetFindings action to example IAM policy for Security Hub
Following the merge of #651, prowler now calls the GetFindings API when using Security Hub integration - this action needs to be added to the required policy
2020-09-17 01:37:45 +01:00
Toni de la Fuente
0dc4c316a2 Merge branch 'master' of https://github.com/toniblyx/prowler into master 2020-09-16 23:32:28 +02:00
Toni de la Fuente
392da158e7 Labeled 2.3.0RC4, time for a final GA version... 2020-09-16 23:32:13 +02:00
Toni de la Fuente
ac0d90cee7 Whitelist feature improvements @QuinnStevens
Whitelist feature improvements @QuinnStevens
2020-09-16 23:28:40 +02:00
Toni de la Fuente
d66a8d0ac6 Fix execute_group_by_id @xeroxnir
Fix execute_group_by_id @xeroxnir
2020-09-16 23:26:33 +02:00
Toni de la Fuente
7eff48715c Security Hub integration improvement and adding severity for checks @xeroxnir
Security Hub integration improvement and adding severity for checks @xeroxnir
2020-09-16 23:19:06 +02:00
Toni de la Fuente
66a9525d23 Support custom folder checks when running all checks @xeroxnir
Support custom folder checks when running all checks @xeroxnir
2020-09-16 23:13:24 +02:00
Toni de la Fuente
7e9a5dc8f5 Allow list checks and groups without credentials 2020-09-16 23:11:33 +02:00
Joaquin Rinaudo
24c80c8548 Fix: If is never called (also under execute_check) 2020-09-07 16:33:45 +02:00
Joaquin Rinaudo
e1fb89838a Fix execute_group_by_id
* All other group checks for IAM have no credential report.
* ${GROUP_ID[$1]} is invalid as first parameter is group_id
2020-09-07 16:09:10 +02:00
Joaquin Rinaudo
69609b08c2 Fix: Json output 2020-09-07 14:26:02 +02:00
Quinn Stevens
801be49523 Return default behaviour to previous, remove distinction between strict & non-strict matching 2020-09-04 13:20:21 +01:00
Quinn Stevens
28b3604b1c Improve whitelisting to allow regexes and fuzzy/strict matching 2020-09-04 13:19:00 +01:00
Joaquin Rinaudo
7b634de36b Update securityhub_integration 2020-09-03 16:57:59 +02:00
Joaquin Rinaudo
981497e0e2 Update securityhub_integration 2020-09-03 16:55:07 +02:00
Joaquin Rinaudo
ebf5d5f449 Update securityhub_integration 2020-09-03 16:53:26 +02:00
Joaquin Rinaudo
054e296501 Update outputs 2020-09-03 15:32:46 +02:00
Joaquin Rinaudo
f642926f50 fix(severity): missing check 2020-09-03 08:23:17 +02:00
Joaquin Rinaudo
e93bb654f8 cleanup outputs 2020-09-03 08:09:52 +02:00
Joaquin Rinaudo
dce3cb0ead cleanup: working 2020-09-03 08:08:11 +02:00
Joaquin Rinaudo
0f3994a135 fix(error-handling): security-hub 2020-09-03 08:05:49 +02:00
Joaquin Rinaudo
ecbe997084 severity+security_hub 2020-09-03 08:04:13 +02:00
Joaquin Rinaudo
20decaafd5 fix(security_hub): remove echo 2020-09-02 12:05:39 +02:00
Joaquin Rinaudo
c53804a3eb fixes(security_hub): missing region and rename variables 2020-09-02 12:04:24 +02:00
Joaquin Rinaudo
bed61c9ee7 remove comment 2020-09-01 17:08:47 +02:00
Joaquin Rinaudo
ea914e47d7 remove debug statements 2020-09-01 17:07:53 +02:00
Joaquin Rinaudo
ae4940a7d8 revert-custom-branch 2020-09-01 17:05:37 +02:00
Joaquin Rinaudo
ebc3c4d4e4 WIP remove comments 2020-09-01 17:04:30 +02:00
Joaquin Rinaudo
2a4cebaa1e WIP: security hub integration 2020-09-01 17:03:25 +02:00
Joaquin Rinaudo
6c0e1a13e3 feature: Only when custom checks are set 2020-09-01 16:36:07 +02:00
Joaquin Rinaudo
0eab753620 feature: Execute custom checks in execute_all 2020-09-01 16:34:19 +02:00
Joaquin Rinaudo
118ff0819e Merge branch 'master' of github.com:xeroxnir/prowler 2020-09-01 16:32:34 +02:00
Joaquin Rinaudo
9baa6d6ae9 revert: master 2020-09-01 16:26:16 +02:00
Joaquin Rinaudo
43f3365bb4 revert: master 2020-09-01 16:22:32 +02:00
Joaquin Rinaudo
580523fde4 fix(all_checks): also run custom folder 2020-09-01 16:17:19 +02:00
Toni de la Fuente
2186f648c8 Ensure that checks are sorted numerically when listing checks @marcjay
Ensure that checks are sorted numerically when listing checks @marcjay
2020-09-01 09:13:04 +02:00
Marc Jay
e3ecee83af Ensure that checks are sorted numerically when listing checks
Sort first by section, then by check within each section
Fix group IDs in documentation

Relates to #545 and #561
2020-09-01 00:21:48 +01:00
Joaquin Rinaudo
17e74a355f Merge branch 'master' of https://github.com/toniblyx/prowler 2020-08-28 07:13:16 +02:00
Joaquin Rinaudo
9283fb59b4 Merge branch 'master' of github.com:xeroxnir/prowler 2020-08-27 17:09:16 +02:00
Joaquin Rinaudo
c65fc3b989 fix(security-hub): unique finding id, if status not changed, comment otherwise resolve older findings 2020-08-27 17:08:37 +02:00
Toni de la Fuente
7f03ef0e7e Adding back extra798 2020-08-27 16:50:48 +02:00
Toni de la Fuente
1496e3ab60 New check 7.98 [extra798] Ensure that no custom policies exist which allow permissive role assumption (e.g. sts:AssumeRole on *) @nickmalcolm
New check 7.98 [extra798] Ensure that no custom policies exist which allow permissive role assumption (e.g. sts:AssumeRole on *) @nickmalcolm
2020-08-27 16:31:18 +02:00
Toni de la Fuente
36a291c4a9 Rename check_extra798 to check_extra7100 2020-08-27 16:30:20 +02:00
Toni de la Fuente
0b9d3e39d4 Merge branch 'master' into master 2020-08-27 16:28:35 +02:00
Toni de la Fuente
1d4563f60d Added extra799 and extra7100 to group extras
Added extra799 and extra7100 to group extras
2020-08-27 16:23:08 +02:00
Toni de la Fuente
565edf7b4b Change check ID to extra7100
Change check ID to extra7100
2020-08-27 16:21:56 +02:00
Toni de la Fuente
5552ea1eb6 Fix getops OPTARG for custom checks @xeroxnir
Fix getops OPTARG for custom checks @xeroxnir
2020-08-27 16:12:59 +02:00
Joaquin Rinaudo
7868904c3b Fix getops OPTARG for custom checks
Custom checks in folder are not being sourced. `./prowler -c extra800 -x custom` results in empty EXTERNAL_CHECKS_PATH variables due to missing colon.

The fix was tested in both OSX and toniblyx/prowler:latest Docker.

Regards,
2020-08-26 23:59:02 +02:00
Toni de la Fuente
9647d80fc1 Fix check12 when MFA is enabled and user contains true in the name @xeroxnir
Fix check12 when MFA is enabled and user contains true in the name @xeroxnir
2020-08-26 18:41:51 +02:00
Toni de la Fuente
89db9d4b70 Update check12 2020-08-26 18:40:11 +02:00
Toni de la Fuente
553faf72ec Added [extra736] Check exposed KMS keys to group internet-exposed 2020-08-26 16:57:20 +02:00
Toni de la Fuente
33a53663db Added [extra799] Check if Security Hub is enabled and its standard subscriptions 2020-08-25 19:54:57 +02:00
Toni de la Fuente
ca471700c2 Added [extra798] Check if Lambda functions have resource-based policy set as Public 2020-08-25 19:06:06 +02:00
Toni de la Fuente
03b1d898a6 Added AWS partition variable to the ASFF output format 2020-08-25 16:54:22 +02:00
Toni de la Fuente
97e6a80bdc Added AWS partition variable to the ASFF output format 2020-08-25 16:49:20 +02:00
Joaquin Rinaudo
024190dd8a [Check12] Bugfix: Remove $ from grep
Check is failing to detect users without MFA, solved by removing `$` sign addresses the issue.
2020-08-21 10:35:50 +02:00
Nick Malcolm
ba87f437d5 This check will identify IAM Policies which allow an IAM Principal (a Role or User) to escalate their privileges due to insecure STS permissions. It is AWS best practice to only use explicitly defined Resources (Role ARNs) for an sts:AssumeRole action.
See more: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_permissions-to-switch.html#roles-usingrole-createpolicy
2020-08-20 21:08:00 +12:00
Toni de la Fuente
cd0b5d29dd Added html to -M in usage 2020-08-18 11:59:53 +02:00
Toni de la Fuente
c1992ef2a7 Added html to -M in usage 2020-08-18 11:52:49 +02:00
Toni de la Fuente
7aa0864bd2 Adding EKS checks to eks-cis and extras group @jonjozwiak
Adding EKS checks to eks-cis and extras group @jonjozwiak
2020-08-05 19:03:55 +02:00
Jon Jozwiak
022df45ae1 Adding EKS checks to eks-cis and extras group 2020-08-03 08:02:21 -05:00
Toni de la Fuente
f5ec2bceda Adding 4 new EKS checks @jonjozwiak
Adding 4 new EKS checks @jonjozwiak
2020-07-31 21:40:38 +02:00
Toni de la Fuente
85efe3e342 Fixed extra737 now doesn't fail for keys scheduled for deletion @QuinnStevens
Fixed extra737 now doesn't fail for keys scheduled for deletion @QuinnStevens
2020-07-31 21:33:06 +02:00
Quinn Stevens
93c89530ff Explicitly set output --json for aws call 2020-07-31 20:30:20 +01:00
Toni de la Fuente
4a02d54ec1 Add additional GDPR checks to GDPR group @gchib297
Add additional GDPR checks to GDPR group @gchib297
2020-07-31 21:15:30 +02:00
jonjozwiak
a2c92c2e7b Adding 4 EKS checks 2020-07-31 10:42:16 -05:00
gchib
04fae53da5 Add additional GDPR checks
Added checks:
check11,check110,check111,check112,check116,check120,check122,check13,check14,check15,check16,check17,check18,check19,check28,check29,check31,check310,check311,check312,check313,check314,check32,check33,check34,check36,check37,check38,check41,check42,extra711,extra72,extra723,extra730,extra739,extra76,extra763,extra778,extra78,extra792
2020-07-24 22:26:09 +05:30
Toni de la Fuente
43d95ac18c Set version label PROWLER_VERSION=2.3.0RC3 2020-07-24 15:22:28 +02:00
Toni de la Fuente
19c68980fe fix typo on title group18 2020-07-24 15:18:46 +02:00
Toni de la Fuente
19bd281c78 Added group18 for ISO27001 thanks to @gchib297 issue #637 2020-07-24 15:16:35 +02:00
Toni de la Fuente
9eb6a6d1fe Add additional checks to HIPAA group @gchib297
Add additional checks to HIPAA group @gchib297
2020-07-24 14:58:29 +02:00
Quinn Stevens
e58d8cbc8d Don't fail check extra737 for keys scheduled for deletion 2020-07-24 12:44:57 +01:00
gchib
a8026ba3c3 Add additional HIPAA checks
Added checks:
check112,check13,check15,check16,check17,check18,check19,check21,check24,check28,check31,check310,check311,check312,check313,check314,check32,check33,check34,check35,check36,check37,check39,extra792.
2020-07-23 19:10:17 +05:30
Toni de la Fuente
9b1c152607 New check extra793 for SSL listeners on load balancers @jonjozwiak
New check extra793 for SSL listeners on load balancers
2020-07-21 16:57:20 +02:00
jonjozwiak
6ba9be46fb Adding check for SSL load balancers 2020-07-17 09:59:53 -05:00
Toni de la Fuente
b3a2f850cf extra792 - skip check if no HTTPS/SSL Listener plus add NLB Support @jonjozwiak
extra792 - skip check if no HTTPS/SSL Listener plus add NLB Support
2020-07-17 11:48:28 +02:00
jonjozwiak
1c970b0387 extra792 skip check if no HTTPS/SSL Listener and add NLB support 2020-07-16 16:08:33 -05:00
Toni de la Fuente
206b675179 Added group for pci-dss as reference 2020-07-13 17:33:07 +02:00
Toni de la Fuente
c3c5971ff2 Fix listing configurations if default output format is not JSON check119,extra742,extra75 and extra772 @anthirian
Fix listing configurations if default output format is not JSON
2020-07-08 15:48:05 +02:00
Toni de la Fuente
1fefc11d8e CFN template helper for role 2020-06-29 15:06:54 +02:00
Toni de la Fuente
9732e5be70 Reduce needed actions in additions policy @ 2020-06-29 13:59:19 +02:00
Geert Smelt
d3553b642e Fix listing Elastic IPs if default output format is not JSON 2020-06-26 12:50:09 +02:00
Geert Smelt
63d06212db Fix listing CloudFormation stacks if default output format is not JSON 2020-06-26 11:55:12 +02:00
Geert Smelt
a0c58e1cb2 Fix listing EC2 Security Groups if default output format is not JSON 2020-06-26 11:25:16 +02:00
Geert Smelt
0878511abf Fix listing EC2 instances if default output format is not JSON 2020-06-26 11:16:59 +02:00
Toni de la Fuente
01be8520b9 Merge branch 'master' of https://github.com/toniblyx/prowler 2020-06-25 15:16:14 +02:00
Toni de la Fuente
9e9535def8 Delete _config.yml 2020-06-25 15:15:59 +02:00
Toni de la Fuente
64a617d26d delete _config.yml 2020-06-25 15:15:14 +02:00
Toni de la Fuente
4a593df142 Merge branch 'master' of https://github.com/toniblyx/prowler 2020-06-25 15:13:47 +02:00
Toni de la Fuente
8686547ebb Allow list All findings in single view in html report 2020-06-25 15:03:45 +02:00
Toni de la Fuente
6acde2c843 Set theme jekyll-theme-hacker 2020-06-23 20:18:33 +02:00
Toni de la Fuente
facc2a7b30 Added script to generate html report from multiple csv outputs 2020-06-23 20:08:12 +02:00
Toni de la Fuente
dac24b3aa8 Fix issue #624 ID of check_extra792 2020-06-23 19:34:41 +02:00
Toni de la Fuente
84060db013 Added group internet-exposed 2020-06-16 18:01:14 +02:00
Toni de la Fuente
2d927f333a Fixed profile and region settings for extra792 - ELB SSL ciphers @jonjozwiak
Fixing profile and region settings for extra792 - ELB SSL ciphers
2020-06-11 09:05:50 +02:00
jonjozwiak
4db109bb26 Fixing profile and region settings for check_extra792 - ELB SSL ciphers 2020-06-10 15:46:34 -05:00
Toni de la Fuente
f1690e8ddc Added old multiaccount sample info to util/other-contrib folder 2020-06-08 13:27:19 +02:00
Toni de la Fuente
acab5d11ed Update README.md with link to new org-multi-account 2020-06-08 13:23:15 +02:00
Toni de la Fuente
f42358f361 AWS Organizational Prowler Deployment @tekdj7
AWS Organizational Prowler Deployment
2020-06-08 13:16:42 +02:00
Julio Delgado Jr
9e2580cc34 removed ansi2html, added -M html 2020-06-05 12:06:33 -04:00
Toni de la Fuente
7a46d23820 Import Security Hub finding into the same region as the related resource @marcjay
Import Security Hub finding into the same region as the related resource
2020-06-05 15:07:11 +02:00
Marc Jay
4dac3aab55 Import Security Hub finding into the same region as the related resource
Force the batch-import-findings AWS CLI call to be directed at the region the currently reporting resource is located in, as Security Hub enforces this requirement

When checking that Security Hub is enabled, check for all regions that are in scope, e.g. all regions, unless '-f <region>' is used

Fixes #618
2020-06-05 12:55:53 +01:00
Toni de la Fuente
26665a4645 Fix extra734 - handle us-east-1 @nimrodkor
Fix extra734 - handle us-east-1
2020-06-05 11:09:44 +02:00
Toni de la Fuente
94378726bc Fix extra764 - handle us-east-1 & check validity of policy @nimrodkor
Fix extra764 - handle us-east-1 & check validity of policy
2020-06-05 10:48:28 +02:00
Nimrod Kor
4dae0718c1 Fix extra764 - handle us-east-1 & check validity of policy
(cherry picked from commit 89bd8a90d5)
2020-06-04 23:18:08 +03:00
Nimrod Kor
ef4d2d33be Fix extra734 - handle us-east-1
(cherry picked from commit 5f2eb7f82e)
2020-06-04 23:15:21 +03:00
Toni de la Fuente
99d1de8c15 Improved whitelisting by splitting ignores by newline instead of spaces only @urjitbhatia
Split ignores by newline instead of spaces only
2020-05-29 11:40:44 +02:00
Julio Delgado Jr
a58ee251b5 adhoc & switch user in session manager 2020-05-28 13:43:55 -04:00
Urjit Singh Bhatia
2fca2a49fd Split ignores by newline instead of spaces only 2020-05-27 13:58:55 -07:00
Toni de la Fuente
e69b079220 Fix typo on PR #601 2020-05-27 10:02:32 +02:00
Toni de la Fuente
75cd911b0f Removed ansi2html from Pipfile, Dockerfile and README 2020-05-27 09:55:17 +02:00
Toni de la Fuente
2dda3f1ec1 Removed ansi2html from Pipfile 2020-05-27 09:52:34 +02:00
Toni de la Fuente
46a8a3ca82 Adding support for IRSA @GabrielCastro
Adding support for IRSA
2020-05-27 09:44:52 +02:00
Toni de la Fuente
69e2e19e7d Added extra791 and extra792 to group extras 2020-05-27 09:37:10 +02:00
Toni de la Fuente
b7c8f7a7ef New checks for insecure SSL in CloudFront and ELB @jonjozwiak
Adding insecure SSL checks for CloudFront and ELB, extra791 and extra792
2020-05-27 09:32:13 +02:00
Adam
ad1d4874c4 add fixes for none digest and multi-value digest return 2020-05-26 17:16:14 -04:00
Jon Jozwiak
06e81a7f33 Update check_extra792 ASFF resource tye 2020-05-26 09:35:48 -05:00
Jon Jozwiak
70337ecd84 Add ASFF resource type 2020-05-26 09:34:37 -05:00
jonjozwiak
df15388577 Adding insecure SSL checks for CloudFront and CLB/ALB
(cherry picked from commit c9a60c07a2)
2020-05-26 16:33:18 +03:00
Toni de la Fuente
485b7d90bc Added native html report - upgrade to 21st century ;) 2020-05-25 21:29:29 +02:00
Toni de la Fuente
78b26a022a Added native html report - upgrade to 21st century ;) 2020-05-25 21:24:33 +02:00
Gabriel Castro
3e19ed44e5 Feature: add support for IRSA
IAM roles for service accounts (IRSA) allows prowler to be used from
inside a kubernetes cluster.
2020-05-25 13:14:15 -04:00
Toni de la Fuente
3e6f29c3fd Support Ctrl-C/SIG INT stopping Prowler when running in Docker @marcjay
Support Ctrl-C/SIG INT stopping Prowler when running in Docker
2020-05-21 18:08:00 +02:00
Toni de la Fuente
e5ce06e761 Write output files to a directory relative to Prowler @marcjay
Write output files to a directory relative to Prowler
2020-05-21 18:06:46 +02:00
Toni de la Fuente
e3d5b89531 Delete prowler-logo.png 2020-05-21 14:40:06 +02:00
Toni de la Fuente
7987ee3011 Added Prowler logo to util/html/ 2020-05-21 14:38:33 +02:00
Toni de la Fuente
2b336d08de Added ENV to output when credentials are env variables 2020-05-19 15:06:57 +02:00
Toni de la Fuente
c7ed6a6693 Improved region handing for extra734 and extra764 2020-05-19 15:03:42 +02:00
Toni de la Fuente
48b6c290b1 Enhance handing region on assume role when default is not us-east-1 2020-05-11 16:32:43 +02:00
Toni de la Fuente
e0c2ca2436 Fixed issue #596 for extra71 2020-05-11 13:21:06 +02:00
Toni de la Fuente
38fb596e94 Merge branch 'master' of https://github.com/toniblyx/prowler 2020-05-11 13:16:53 +02:00
Toni de la Fuente
c79d346961 Fixed issue #596 on check114 2020-05-11 13:16:38 +02:00
Marc Jay
0f9783791b Support Ctrl-C/SIG INT stopping Prowler when running in Docker
Trap Ctrl-C/SIG INT, call cleanup function and then exit, using the appropriate exit code

Fixes #594
2020-05-08 12:34:03 +01:00
Marc Jay
802d1151c2 Write output files to a directory relative to Prowler
Write output files (CSV, JSON, etc.) to an `output` directory that is relative to prowler itself, no matter where prowler is invoked from.
Simplify Dockerfile by specifying a WORKDIR
Replace ADD command with the more recommended COPY command
Update README to cover how to run in Docker and access saved reports
Add a .dockerignore file to ignore .git and output directories

This partially addresses #570 - previously, within Docker, Prowler was attempting to write
reports to the root `/` directory in the container, which it did not have permission to do.
Instead, reports are now written to a path relative to Prowler
2020-05-08 11:46:53 +01:00
Toni de la Fuente
2a9f6c67a8 Change value of FAIL to FAILED for jsonAsff output type @wildtangent
Change value of FAIL to FAILED for jsonAsff output type
2020-05-07 17:55:01 +02:00
Stephen Connor
2a54a180da Change value of FAIL to FAILED for jsonAsff output type (incompatible with AWS Security Hub) 2020-05-07 14:47:09 +01:00
Toni de la Fuente
7ab9962e08 Show failures that are ignored due to whitelisting as skipped checks in JUnit output @marcjay
Show failures that are ignored due to whitelisting as skipped checks in JUnit output
2020-05-07 09:22:48 +02:00
Marc Jay
6279dc1517 Show failures that are ignored due to whitelisting as skipped checks in JUnit output
Continue to show (unwhitelisted) failed checks as failures in JUnit output, but rather than exclude failing whitelisted checks from JUnit, mark them as skipped

Fixes #590
2020-05-07 01:00:42 +01:00
Julio Delgado Jr
d6033e287d encryption of ebs volume 2020-05-06 10:55:42 -04:00
Julio Delgado Jr
49456424fa example 2020-05-03 13:02:46 -04:00
Julio Delgado Jr
d095ea75d8 intro 2020-05-03 12:14:36 -04:00
Julio Delgado Jr
23dc8ce883 . 2020-05-03 12:12:57 -04:00
Julio Delgado Jr
378dd88808 . 2020-05-03 12:09:29 -04:00
Julio Delgado Jr
8fd2c17b5d . 2020-05-03 12:08:56 -04:00
Julio Delgado Jr
d2503ad1d3 more links, formatting 2020-05-03 12:07:31 -04:00
Julio Delgado Jr
159ae3ac32 removed ingress rule 2020-05-03 12:07:15 -04:00
Julio Delgado Jr
bb46702d37 updates 2020-05-03 11:50:05 -04:00
Julio Delgado Jr
95135305d7 updated links 2020-05-03 11:48:44 -04:00
Julio Delgado Jr
8728815704 . 2020-05-03 11:46:37 -04:00
Julio Delgado Jr
f4af505270 better markdown for code, more documentation 2020-05-03 11:45:20 -04:00
Julio Delgado Jr
25cb42e3c4 added parallel_accounts variable 2020-05-03 11:44:50 -04:00
Julio Delgado Jr
29378a1339 Updated Patterns,Defaults,Tags,BucketPolicy 2020-05-03 11:43:50 -04:00
Julio Delgado Jr
ac5212990a Updated Patterns,Descriptions,Defaults,Tags 2020-05-03 11:42:56 -04:00
Julio Delgado Jr
1be68b1e00 Updated Patterns,Descriptions,Defaults,Tags 2020-05-03 11:42:30 -04:00
Julio Delgado Jr
4230e9dc13 added elapsed times, support run prower parallel 2020-04-30 20:12:19 -04:00
Julio Delgado Jr
36e9f5174d reduced sts calls, updated comments 2020-04-30 17:24:00 -04:00
Julio Delgado Jr
d716cf2664 more documentation and links 2020-04-30 17:23:28 -04:00
Julio Delgado Jr
299cb7e541 Renamed Parameters, Updated Descriptions 2020-04-30 17:22:29 -04:00
Julio Delgado Jr
7816fd0648 Renamed Parameters, Updated Descriptions 2020-04-30 17:21:52 -04:00
Julio Delgado Jr
0cf97a99b3 Renamed Parameters, Updated Descriptions 2020-04-30 17:21:42 -04:00
Julio Delgado Jr
129a22e9c3 updated cron job settings 2020-04-28 18:53:04 -04:00
Julio Delgado Jr
e0b6d4a21d Added Adhoc: Run Prowler Interactively 2020-04-28 18:33:29 -04:00
Julio Delgado Jr
94b978a934 renamed 2020-04-28 12:36:10 -04:00
Julio Delgado Jr
09e4feb095 stopped embedding script into CF, download script 2020-04-28 12:35:57 -04:00
Julio Delgado Jr
200bbf9a7d org-multi-account initial commit 2020-04-28 00:47:42 -04:00
1700 changed files with 132470 additions and 9789 deletions

1
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1 @@
* @prowler-cloud/prowler-oss

97
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@@ -0,0 +1,97 @@
name: 🐞 Bug Report
description: Create a report to help us improve
title: "[Bug]: "
labels: ["bug", "status/needs-triage"]
body:
- type: textarea
id: reproduce
attributes:
label: Steps to Reproduce
description: Steps to reproduce the behavior
placeholder: |-
1. What command are you running?
2. Cloud provider you are launching
3. Environment you have, like single account, multi-account, organizations, multi or single subscription, etc.
4. See error
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: textarea
id: actual
attributes:
label: Actual Result with Screenshots or Logs
description: If applicable, add screenshots to help explain your problem. Also, you can add logs (anonymize them first!). Here a command that may help to share a log `prowler <your arguments> --log-level DEBUG --log-file $(date +%F)_debug.log` then attach here the log file.
validations:
required: true
- type: dropdown
id: type
attributes:
label: How did you install Prowler?
options:
- Cloning the repository from github.com (git clone)
- From pip package (pip install prowler)
- From brew (brew install prowler)
- Docker (docker pull toniblyx/prowler)
validations:
required: true
- type: textarea
id: environment
attributes:
label: Environment Resource
description: From where are you running Prowler?
placeholder: |-
1. EC2 instance
2. Fargate task
3. Docker container locally
4. EKS
5. Cloud9
6. CodeBuild
7. Workstation
8. Other(please specify)
validations:
required: true
- type: textarea
id: os
attributes:
label: OS used
description: Which OS are you using?
placeholder: |-
1. Amazon Linux 2
2. MacOS
3. Alpine Linux
4. Windows
5. Other(please specify)
validations:
required: true
- type: input
id: prowler-version
attributes:
label: Prowler version
description: Which Prowler version are you using?
placeholder: |-
prowler --version
validations:
required: true
- type: input
id: pip-version
attributes:
label: Pip version
description: Which pip version are you using?
placeholder: |-
pip --version
validations:
required: true
- type: textarea
id: additional
attributes:
description: Additional context
label: Context
validations:
required: false

1
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1 @@
blank_issues_enabled: false

View File

@@ -0,0 +1,36 @@
name: 💡 Feature Request
description: Suggest an idea for this project
labels: ["enhancement", "status/needs-triage"]
body:
- type: textarea
id: Problem
attributes:
label: New feature motivation
description: Is your feature request related to a problem? Please describe
placeholder: |-
1. A clear and concise description of what the problem is. Ex. I'm always frustrated when
validations:
required: true
- type: textarea
id: Solution
attributes:
label: Solution Proposed
description: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: Alternatives
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: true
- type: textarea
id: Context
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
validations:
required: false

15
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
target-branch: master
labels:
- "dependencies"
- "pip"

View File

@@ -1 +1,13 @@
### Context
Please include relevant motivation and context for this PR.
### Description
Please include a summary of the change and which issue is fixed. List any dependencies that are required for this change.
### License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

View File

@@ -0,0 +1,117 @@
name: build-lint-push-containers
on:
push:
branches:
- "master"
paths-ignore:
- ".github/**"
- "README.md"
- "docs/**"
release:
types: [published]
env:
AWS_REGION_STG: eu-west-1
AWS_REGION_PLATFORM: eu-west-1
AWS_REGION: us-east-1
IMAGE_NAME: prowler
LATEST_TAG: latest
STABLE_TAG: stable
TEMPORARY_TAG: temporary
DOCKERFILE_PATH: ./Dockerfile
PYTHON_VERSION: 3.9
jobs:
# Build Prowler OSS container
container-build-push:
# needs: dockerfile-linter
runs-on: ubuntu-latest
env:
POETRY_VIRTUALENVS_CREATE: "false"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup python (release)
if: github.event_name == 'release'
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies (release)
if: github.event_name == 'release'
run: |
pipx install poetry
pipx inject poetry poetry-bumpversion
- name: Update Prowler version (release)
if: github.event_name == 'release'
run: |
poetry version ${{ github.event.release.tag_name }}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Public ECR
uses: docker/login-action@v2
with:
registry: public.ecr.aws
username: ${{ secrets.PUBLIC_ECR_AWS_ACCESS_KEY_ID }}
password: ${{ secrets.PUBLIC_ECR_AWS_SECRET_ACCESS_KEY }}
env:
AWS_REGION: ${{ env.AWS_REGION }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push container image (latest)
if: github.event_name == 'push'
uses: docker/build-push-action@v2
with:
push: true
tags: |
${{ secrets.DOCKER_HUB_REPOSITORY }}/${{ env.IMAGE_NAME }}:${{ env.LATEST_TAG }}
${{ secrets.PUBLIC_ECR_REPOSITORY }}/${{ env.IMAGE_NAME }}:${{ env.LATEST_TAG }}
file: ${{ env.DOCKERFILE_PATH }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push container image (release)
if: github.event_name == 'release'
uses: docker/build-push-action@v2
with:
# Use local context to get changes
# https://github.com/docker/build-push-action#path-context
context: .
push: true
tags: |
${{ secrets.DOCKER_HUB_REPOSITORY }}/${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }}
${{ secrets.DOCKER_HUB_REPOSITORY }}/${{ env.IMAGE_NAME }}:${{ env.STABLE_TAG }}
${{ secrets.PUBLIC_ECR_REPOSITORY }}/${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }}
${{ secrets.PUBLIC_ECR_REPOSITORY }}/${{ env.IMAGE_NAME }}:${{ env.STABLE_TAG }}
file: ${{ env.DOCKERFILE_PATH }}
cache-from: type=gha
cache-to: type=gha,mode=max
dispatch-action:
needs: container-build-push
runs-on: ubuntu-latest
steps:
- name: Get latest commit info
if: github.event_name == 'push'
run: |
LATEST_COMMIT_HASH=$(echo ${{ github.event.after }} | cut -b -7)
echo "LATEST_COMMIT_HASH=${LATEST_COMMIT_HASH}" >> $GITHUB_ENV
- name: Dispatch event for latest
if: github.event_name == 'push'
run: |
curl https://api.github.com/repos/${{ secrets.DISPATCH_OWNER }}/${{ secrets.DISPATCH_REPO }}/dispatches -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.ACCESS_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" --data '{"event_type":"dispatch","client_payload":{"version":"latest", "tag": "${{ env.LATEST_COMMIT_HASH }}"}}'
- name: Dispatch event for release
if: github.event_name == 'release'
run: |
curl https://api.github.com/repos/${{ secrets.DISPATCH_OWNER }}/${{ secrets.DISPATCH_REPO }}/dispatches -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.ACCESS_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" --data '{"event_type":"dispatch","client_payload":{"version":"release", "tag":"${{ github.event.release.tag_name }}"}}'

57
.github/workflows/codeql.yml vendored Normal file
View File

@@ -0,0 +1,57 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ "master", prowler-2, prowler-3.0-dev ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '00 12 * * *'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"

18
.github/workflows/find-secrets.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: find-secrets
on: pull_request
jobs:
trufflehog:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: TruffleHog OSS
uses: trufflesecurity/trufflehog@v3.4.4
with:
path: ./
base: ${{ github.event.repository.default_branch }}
head: HEAD

64
.github/workflows/pull-request.yml vendored Normal file
View File

@@ -0,0 +1,64 @@
name: pr-lint-test
on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: |
python -m pip install --upgrade pip
pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install dependencies
run: |
poetry install
poetry run pip list
VERSION=$(curl --silent "https://api.github.com/repos/hadolint/hadolint/releases/latest" | \
grep '"tag_name":' | \
sed -E 's/.*"v([^"]+)".*/\1/' \
) && curl -L -o /tmp/hadolint "https://github.com/hadolint/hadolint/releases/download/v${VERSION}/hadolint-Linux-x86_64" \
&& chmod +x /tmp/hadolint
- name: Poetry check
run: |
poetry lock --check
- name: Lint with flake8
run: |
poetry run flake8 . --ignore=E266,W503,E203,E501,W605,E128 --exclude contrib
- name: Checking format with black
run: |
poetry run black --check .
- name: Lint with pylint
run: |
poetry run pylint --disable=W,C,R,E -j 0 -rn -sn prowler/
- name: Bandit
run: |
poetry run bandit -q -lll -x '*_test.py,./contrib/' -r .
- name: Safety
run: |
poetry run safety check
- name: Vulture
run: |
poetry run vulture --exclude "contrib" --min-confidence 100 .
- name: Hadolint
run: |
/tmp/hadolint Dockerfile --ignore=DL3013
- name: Test with pytest
run: |
poetry run pytest tests -n auto

77
.github/workflows/pypi-release.yml vendored Normal file
View File

@@ -0,0 +1,77 @@
name: pypi-release
on:
release:
types: [published]
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
jobs:
release-prowler-job:
runs-on: ubuntu-latest
env:
POETRY_VIRTUALENVS_CREATE: "false"
name: Release Prowler to PyPI
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Install dependencies
run: |
pipx install poetry
pipx inject poetry poetry-bumpversion
- name: setup python
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: 'poetry'
- name: Change version and Build package
run: |
poetry version ${{ env.RELEASE_TAG }}
git config user.name "github-actions"
git config user.email "<noreply@github.com>"
git add prowler/config/config.py pyproject.toml
git commit -m "chore(release): ${{ env.RELEASE_TAG }}" --no-verify
git tag -fa ${{ env.RELEASE_TAG }} -m "chore(release): ${{ env.RELEASE_TAG }}"
git push -f origin ${{ env.RELEASE_TAG }}
poetry build
- name: Publish prowler package to PyPI
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
poetry publish
# Create pull request with new version
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.PROWLER_ACCESS_TOKEN }}
commit-message: "chore(release): update Prowler Version to ${{ env.RELEASE_TAG }}."
branch: release-${{ env.RELEASE_TAG }}
labels: "status/waiting-for-revision, severity/low"
title: "chore(release): update Prowler Version to ${{ env.RELEASE_TAG }}"
body: |
### Description
This PR updates Prowler Version to ${{ env.RELEASE_TAG }}.
### License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
- name: Replicate PyPi Package
run: |
rm -rf ./dist && rm -rf ./build && rm -rf prowler.egg-info
pip install toml
python util/replicate_pypi_package.py
poetry build
- name: Publish prowler-cloud package to PyPI
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
poetry publish
# Create pull request to github.com/Homebrew/homebrew-core to update prowler formula
- name: Bump Homebrew formula
uses: mislav/bump-homebrew-formula-action@v2
with:
formula-name: prowler
base-branch: release-${{ env.RELEASE_TAG }}
env:
COMMITTER_TOKEN: ${{ secrets.PROWLER_ACCESS_TOKEN }}

View File

@@ -0,0 +1,67 @@
# This is a basic workflow to help you get started with Actions
name: Refresh regions of AWS services
on:
schedule:
- cron: "0 9 * * *" #runs at 09:00 UTC everyday
env:
GITHUB_BRANCH: "master"
AWS_REGION_DEV: us-east-1
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
permissions:
id-token: write
pull-requests: write
contents: write
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
ref: ${{ env.GITHUB_BRANCH }}
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.9 #install the python needed
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install boto3
- name: Configure AWS Credentials -- DEV
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: ${{ env.AWS_REGION_DEV }}
role-to-assume: ${{ secrets.DEV_IAM_ROLE_ARN }}
role-session-name: refresh-AWS-regions-dev
# Runs a single command using the runners shell
- name: Run a one-line script
run: python3 util/update_aws_services_regions.py
# Create pull request
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.PROWLER_ACCESS_TOKEN }}
commit-message: "feat(regions_update): Update regions for AWS services."
branch: "aws-services-regions-updated-${{ github.sha }}"
labels: "status/waiting-for-revision, severity/low"
title: "chore(regions_update): Changes in regions for AWS services."
body: |
### Description
This PR updates the regions for AWS services.
### License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

20
.gitignore vendored
View File

@@ -5,6 +5,13 @@
[._]ss[a-gi-z]
[._]sw[a-p]
# Python code
__pycache__
venv/
build/
dist/
*.egg-info/
# Session
Session.vim
Sessionx.vim
@@ -14,6 +21,7 @@ Sessionx.vim
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~
@@ -21,10 +29,20 @@ tags
*.DS_Store
# Prowler output
prowler-output-*
output/
# Prowler found secrets
secrets-*/
# JUnit Reports
junit-reports/
# VSCode files
.vscode/
# Terraform
.terraform*
*.tfstate
# .env
.env*

99
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,99 @@
repos:
## GENERAL
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: check-yaml
args: ["--unsafe"]
- id: check-json
- id: end-of-file-fixer
- id: trailing-whitespace
- id: no-commit-to-branch
- id: pretty-format-json
args: ["--autofix", --no-sort-keys, --no-ensure-ascii]
## TOML
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.7.0
hooks:
- id: pretty-format-toml
args: [--autofix]
files: pyproject.toml
## BASH
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.9.0
hooks:
- id: shellcheck
## PYTHON
- repo: https://github.com/myint/autoflake
rev: v2.0.1
hooks:
- id: autoflake
args:
[
"--in-place",
"--remove-all-unused-imports",
"--remove-unused-variable",
]
- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
exclude: contrib
args: ["--ignore=E266,W503,E203,E501,W605"]
- repo: https://github.com/python-poetry/poetry
rev: 1.4.0 # add version here
hooks:
- id: poetry-check
- id: poetry-lock
- repo: https://github.com/hadolint/hadolint
rev: v2.12.1-beta
hooks:
- id: hadolint
args: ["--ignore=DL3013"]
- repo: local
hooks:
- id: pylint
name: pylint
entry: bash -c 'pylint --disable=W,C,R,E -j 0 -rn -sn prowler/'
language: system
- id: pytest-check
name: pytest-check
entry: bash -c 'pytest tests -n auto'
language: system
- id: bandit
name: bandit
description: "Bandit is a tool for finding common security issues in Python code"
entry: bash -c 'bandit -q -lll -x '*_test.py,./contrib/' -r .'
language: system
- id: safety
name: safety
description: "Safety is a tool that checks your installed dependencies for known security vulnerabilities"
entry: bash -c 'safety check'
language: system
- id: vulture
name: vulture
description: "Vulture finds unused code in Python programs."
entry: bash -c 'vulture --exclude "contrib" --min-confidence 100 .'
language: system

23
.readthedocs.yaml Normal file
View File

@@ -0,0 +1,23 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
build:
os: "ubuntu-22.04"
tools:
python: "3.9"
jobs:
post_create_environment:
# Install poetry
# https://python-poetry.org/docs/#installing-manually
- pip install poetry
# Tell poetry to not use a virtual environment
- poetry config virtualenvs.create false
post_install:
- poetry install -E docs
mkdocs:
configuration: mkdocs.yml

33
Dockerfile Normal file
View File

@@ -0,0 +1,33 @@
FROM python:3.9-alpine
LABEL maintainer="https://github.com/prowler-cloud/prowler"
# Update system dependencies
RUN apk --no-cache upgrade
# Create nonroot user
RUN mkdir -p /home/prowler && \
echo 'prowler:x:1000:1000:prowler:/home/prowler:' > /etc/passwd && \
echo 'prowler:x:1000:' > /etc/group && \
chown -R prowler:prowler /home/prowler
USER prowler
# Copy necessary files
WORKDIR /home/prowler
COPY prowler/ /home/prowler/prowler/
COPY pyproject.toml /home/prowler
COPY README.md /home/prowler
# Install dependencies
ENV HOME='/home/prowler'
ENV PATH="$HOME/.local/bin:$PATH"
#hadolint ignore=DL3013
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir .
# Remove Prowler directory and build files
USER 0
RUN rm -rf /home/prowler/prowler /home/prowler/pyproject.toml /home/prowler/README.md /home/prowler/build /home/prowler/prowler.egg-info
USER prowler
ENTRYPOINT ["prowler"]

205
LICENSE
View File

@@ -1,6 +1,201 @@
All CIS based checks in the checks folder are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License.
The link to the license terms can be found at
https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Any other piece of code is licensed as Apache License 2.0 as specified in each file. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2018 Netflix, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -1,201 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -1,360 +0,0 @@
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
Public License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution-NonCommercial-ShareAlike 4.0 International Public License
("Public License"). To the extent this Public License may be
interpreted as a contract, You are granted the Licensed Rights in
consideration of Your acceptance of these terms and conditions, and the
Licensor grants You such rights in consideration of benefits the
Licensor receives from making the Licensed Material available under
these terms and conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. BY-NC-SA Compatible License means a license listed at
creativecommons.org/compatiblelicenses, approved by Creative
Commons as essentially the equivalent of this Public License.
d. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
e. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
f. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
g. License Elements means the license attributes listed in the name
of a Creative Commons Public License. The License Elements of this
Public License are Attribution, NonCommercial, and ShareAlike.
h. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
i. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
j. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
k. NonCommercial means not primarily intended for or directed towards
commercial advantage or monetary compensation. For purposes of
this Public License, the exchange of the Licensed Material for
other material subject to Copyright and Similar Rights by digital
file-sharing or similar means is NonCommercial provided there is
no payment of monetary compensation in connection with the
exchange.
l. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
m. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
n. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part, for NonCommercial purposes only; and
b. produce, reproduce, and Share Adapted Material for
NonCommercial purposes only.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. Additional offer from the Licensor -- Adapted Material.
Every recipient of Adapted Material from You
automatically receives an offer from the Licensor to
exercise the Licensed Rights in the Adapted Material
under the conditions of the Adapter's License You apply.
c. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties, including when
the Licensed Material is used other than for NonCommercial
purposes.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
b. ShareAlike.
In addition to the conditions in Section 3(a), if You Share
Adapted Material You produce, the following conditions also apply.
1. The Adapter's License You apply must be a Creative Commons
license with the same License Elements, this version or
later, or a BY-NC-SA Compatible License.
2. You must include the text of, or the URI or hyperlink to, the
Adapter's License You apply. You may satisfy this condition
in any reasonable manner based on the medium, means, and
context in which You Share Adapted Material.
3. You may not offer or impose any additional or different terms
or conditions on, or apply any Effective Technological
Measures to, Adapted Material that restrict exercise of the
rights granted under the Adapter's License You apply.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database for NonCommercial purposes
only;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material,
including for purposes of Section 3(b); and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.

View File

@@ -1,5 +0,0 @@
```
./prowler -l # to see all available checks and their groups.
./prowler -L # to see all available groups only.
./prowler -l -g groupname # to see checks in a particular group
```

40
Makefile Normal file
View File

@@ -0,0 +1,40 @@
.DEFAULT_GOAL:=help
##@ Testing
test: ## Test with pytest
pytest -n auto -vvv -s -x
coverage: ## Show Test Coverage
coverage run --skip-covered -m pytest -v && \
coverage report -m && \
rm -rf .coverage
##@ Linting
format: ## Format Code
@echo "Running black..."
black .
lint: ## Lint Code
@echo "Running flake8..."
flake8 . --ignore=E266,W503,E203,E501,W605,E128 --exclude contrib
@echo "Running black... "
black --check .
@echo "Running pylint..."
pylint --disable=W,C,R,E -j 0 providers lib util config
##@ PyPI
pypi-clean: ## Delete the distribution files
rm -rf ./dist && rm -rf ./build && rm -rf prowler.egg-info
pypi-build: ## Build package
$(MAKE) pypi-clean && \
poetry build
pypi-upload: ## Upload package
python3 -m twine upload --repository pypi dist/*
##@ Help
help: ## Show this help.
@echo "Prowler Makefile"
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

14
Pipfile
View File

@@ -1,14 +0,0 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
boto3 = ">=1.9.188"
ansi2html = ">=1.5.2"
detect-secrets = ">=0.12.4"
[requires]
python_version = "3.7"

762
README.md
View File

@@ -1,631 +1,251 @@
# Prowler: AWS CIS Benchmark Tool
## Table of Contents
- [Description](#description)
- [Features](#features)
- [Requirements and Installation](#requirements-and-installation)
- [Usage](#usage)
- [Advanced Usage](#advanced-usage)
- [Security Hub integration](#security-hub-integration)
- [Fix](#fix)
- [Screenshots](#screenshots)
- [Troubleshooting](#troubleshooting)
- [Extras](#extras)
- [Forensics Ready Checks](#forensics-ready-checks)
- [GDPR Checks](#gdpr-checks)
- [HIPAA Checks](#hipaa-checks)
- [Trust Boundaries Checks](#trust-boundaries-checks)
- [Add Custom Checks](#add-custom-checks)
- [Third Party Integrations](#third-party-integrations)
- [Full list of checks and groups](/LIST_OF_CHECKS_AND_GROUPS.md)
- [License](#license)
## Description
Prowler is a command line tool for AWS Security Best Practices Assessment, Auditing, Hardening and Forensics Readiness Tool.
It follows guidelines of the CIS Amazon Web Services Foundations Benchmark (49 checks) and has 40 additional checks including related to GDPR and HIPAA.
Read more about [CIS Amazon Web Services Foundations Benchmark v1.2.0 - 05-23-2018](https://d0.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf)
## Features
~140 checks controls covering security best practices across all AWS regions and most of AWS services and related to the next groups:
- Identity and Access Management [group1]
- Logging [group2]
- Monitoring (14 checks) [group3]
- Networking (4 checks) [group4]
- CIS Level 1 [cislevel1]
- CIS Level 2 [cislevel2]
- Extras (39 checks) *see Extras section* [extras]
- Forensics related group of checks [forensics-ready]
- GDPR [gdpr] Read more [here](#gdpr-checks)
- HIPAA [hipaa] Read more [here](#hipaa-checks)
- Trust Boundaries [trustboundaries] Read more [here](#trustboundaries-checks)
With Prowler you can:
- get a colorful or monochrome report
- a CSV, JSON or JSON ASFF format report
- send findings directly to Security Hub
- run specific checks
- check multiple AWS accounts in parallel or sequentially
- and more! Read examples below
## Requirements and Installation
This script has been written in bash using AWS-CLI and it works in Linux and OSX.
- Make sure the latest version of AWS-CLI is installed on your workstation, and other components needed, with Python pip already installed:
```sh
pip install awscli ansi2html detect-secrets
```
AWS-CLI can be also installed it using "brew", "apt", "yum" or manually from <https://aws.amazon.com/cli/>, but `ansi2html` and `detect-secrets` has to be installed using `pip`. You will need to install `jq` to get more accuracy in some checks.
- Make sure jq is installed (example below with "apt" but use a valid package manager for your OS):
```sh
sudo apt install jq
```
- Previous steps, from your workstation:
```sh
git clone https://github.com/toniblyx/prowler
cd prowler
```
- Make sure you have properly configured your AWS-CLI with a valid Access Key and Region or declare AWS variables properly (or intance profile):
```sh
aws configure
```
or
```sh
export AWS_ACCESS_KEY_ID="ASXXXXXXX"
export AWS_SECRET_ACCESS_KEY="XXXXXXXXX"
export AWS_SESSION_TOKEN="XXXXXXXXX"
```
- Those credentials must be associated to a user or role with proper permissions to do all checks. To make sure, add the AWS managed policies, SecurityAudit and ViewOnlyAccess, to the user or role being used. Policy ARNs are:
```sh
arn:aws:iam::aws:policy/SecurityAudit
arn:aws:iam::aws:policy/job-function/ViewOnlyAccess
```
> Additional permissions needed: to make sure Prowler can scan all services included in the group *Extras*, make sure you attach also the custom policy [prowler-additions-policy.json](https://github.com/toniblyx/prowler/blob/master/iam/prowler-additions-policy.json) to the role you are using. If you want Prowler to send findings to [AWS Security Hub](https://aws.amazon.com/security-hub), make sure you also attach the custom policy [prowler-security-hub.json](https://github.com/toniblyx/prowler/blob/master/iam/prowler-security-hub.json).
## Usage
1. Run the `prowler` command without options (it will use your environment variable credentials if they exist or will default to using the `~/.aws/credentials` file and run checks over all regions when needed. The default region is us-east-1):
```sh
./prowler
```
Use `-l` to list all available checks and the groups (sections) that reference them
If you want to avoid installing dependencies run it using Docker:
```sh
docker run -ti --rm --name prowler --env AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY --env AWS_SESSION_TOKEN toniblyx/prowler:latest
```
1. For custom AWS-CLI profile and region, use the following: (it will use your custom profile and run checks over all regions when needed):
```sh
./prowler -p custom-profile -r us-east-1
```
1. For a single check use option `-c`:
```sh
./prowler -c check310
```
With Docker:
```sh
docker run -ti --rm --name prowler --env AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY --env AWS_SESSION_TOKEN toniblyx/prowler:latest "-c check310"
```
or multiple checks separated by comma:
```sh
./prowler -c check310,check722
```
or all checks but some of them:
```sh
./prowler -E check42,check43
```
or for custom profile and region:
```sh
./prowler -p custom-profile -r us-east-1 -c check11
```
or for a group of checks use group name:
```sh
./prowler -g group1 # for iam related checks
```
or exclude some checks in the group:
```sh
./prowler -g group4 -E check42,check43
```
Valid check numbers are based on the AWS CIS Benchmark guide, so 1.1 is check11 and 3.10 is check310
### Save your reports
1. If you want to save your report for later analysis thare are different ways, natively (supported text, mono, csv, json, json-asff and junit-xml see note below for more info):
```sh
./prowler -M csv
```
or with multiple formats at the same time:
```sh
./prowler -M csv,json,json-asff
```
or just a group of checks in multiple formats:
```sh
./prowler -g gdpr -M csv,json,json-asff
```
Now `-M` creates a file inside the prowler root directory named `prowler-output-AWSACCOUNTID-YYYYMMDDHHMMSS.format`. You don't have to specify anything else, no pipes, no redirects.
or just saving the output to a file like below:
```sh
./prowler -M mono > prowler-report.txt
```
or if you want a coloured HTML report do:
```sh
pip install ansi2html
./prowler | ansi2html -la > report.html
```
To generate JUnit report files, include the junit-xml format. This can be combined with any other format. Files are written inside a prowler root directory named `junit-reports`:
```sh
./prowler -M text,junit-xml
```
>Note about output formats to use with `-M`: "text" is the default one with colors, "mono" is like default one but monochrome, "csv" is comma separated values, "json" plain basic json (without comma between lines) and "json-asff" is also json with Amazon Security Finding Format that you can ship to Security Hub using `-S`.
or save your report in a S3 bucket (this only works for text or mono, for csv, json or json-asff it has to be copied afterwards):
```sh
./prowler -M mono | aws s3 cp - s3://bucket-name/prowler-report.txt
```
1. To perform an assessment based on CIS Profile Definitions you can use cislevel1 or cislevel2 with `-g` flag, more information about this [here, page 8](https://d0.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf):
```sh
./prowler -g cislevel1
```
1. If you want to run Prowler to check multiple AWS accounts in parallel (runs up to 4 simultaneously `-P 4`):
```sh
grep -E '^\[([0-9A-Aa-z_-]+)\]' ~/.aws/credentials | tr -d '][' | shuf | \
xargs -n 1 -L 1 -I @ -r -P 4 ./prowler -p @ -M csv 2> /dev/null >> all-accounts.csv
```
1. For help use:
```
./prowler -h
USAGE:
prowler [ -p <profile> -r <region> -h ]
-p <profile> specify your AWS profile to use (i.e.: default)
-r <region> specify an AWS region to direct API requests to
(i.e.: us-east-1), all regions are checked anyway if the check requires it
-c <check_id> specify one or multiple check ids separated by commas, to see all available checks use -l option
(i.e.: check11 for check 1.1 or extra71,extra72 for extra check 71 and extra check 72)
-g <group_id> specify a group of checks by id, to see all available group of checks use -L
(i.e.: check3 for entire section 3, level1 for CIS Level 1 Profile Definitions or forensics-ready)
-f <filterregion> specify an AWS region to run checks against
(i.e.: us-west-1)
-m <maxitems> specify the maximum number of items to return for long-running requests (default: 100)
-M <mode> output mode: text (default), mono, json, json-asff, junit-xml, csv. They can be used combined comma separated.
(separator is ,; data is on stdout; progress on stderr).
-k keep the credential report
-n show check numbers to sort easier
(i.e.: 1.01 instead of 1.1)
-l list all available checks only (does not perform any check). Add -g <group_id> to only list checks within the specified group
-L list all groups (does not perform any check)
-e exclude group extras
-E execute all tests except a list of specified checks separated by comma (i.e. check21,check31)
-b do not print Prowler banner
-s show scoring report
-S send check output to AWS Security Hub - only valid when the output mode is json-asff (i.e. -M json-asff -S)
-x specify external directory with custom checks (i.e. /my/own/checks, files must start by check)
-q suppress info messages and passing test output
-A account id for the account where to assume a role, requires -R and -T
(i.e.: 123456789012)
-R role name to assume in the account, requires -A and -T
(i.e.: ProwlerRole)
-T session duration given to that role credentials in seconds, default 1h (3600) recommended 12h, requires -R and -T
(i.e.: 43200)
-I External ID to be used when assuming roles (not mandatory), requires -A and -R
-w whitelist file. See whitelist_sample.txt for reference and format
(i.e.: whitelist_sample.txt)
-V show version number & exit
-h this help
```
## Advanced Usage
### Assume Role:
Prowler uses the AWS CLI underneath so it uses the same authentication methods. However, there are few ways to run Prowler against multiple accounts using IAM Assume Role feature depending on eachg use case. You can just set up your custom profile inside `~/.aws/config` with all needed information about the role to assume then call it with `./prowler -p your-custom-profile`. Additionally you can use `-A 123456789012` and `-R RemoteRoleToAssume` and Prowler will get those temporary credentials using `aws sts assume-role`, set them up as environment variables and run against that given account.
```sh
./prowler -A 123456789012 -R ProwlerRole
<p align="center">
<img align="center" src="https://github.com/prowler-cloud/prowler/blob/62c1ce73bbcdd6b9e5ba03dfcae26dfd165defd9/docs/img/prowler-pro-dark.png?raw=True#gh-dark-mode-only" width="150" height="36">
<img align="center" src="https://github.com/prowler-cloud/prowler/blob/62c1ce73bbcdd6b9e5ba03dfcae26dfd165defd9/docs/img/prowler-pro-light.png?raw=True#gh-light-mode-only" width="15%" height="15%">
</p>
<p align="center">
<b><i>See all the things you and your team can do with ProwlerPro at <a href="https://prowler.pro">prowler.pro</a></i></b>
</p>
<hr>
<p align="center">
<img src="https://user-images.githubusercontent.com/3985464/113734260-7ba06900-96fb-11eb-82bc-d4f68a1e2710.png" />
</p>
<p align="center">
<a href="https://join.slack.com/t/prowler-workspace/shared_invite/zt-1hix76xsl-2uq222JIXrC7Q8It~9ZNog"><img alt="Slack Shield" src="https://img.shields.io/badge/slack-prowler-brightgreen.svg?logo=slack"></a>
<a href="https://pypi.org/project/prowler-cloud/"><img alt="Python Version" src="https://img.shields.io/pypi/v/prowler.svg"></a>
<a href="https://pypi.python.org/pypi/prowler-cloud/"><img alt="Python Version" src="https://img.shields.io/pypi/pyversions/prowler.svg"></a>
<a href="https://pypistats.org/packages/prowler"><img alt="PyPI Prowler Downloads" src="https://img.shields.io/pypi/dw/prowler.svg?label=prowler%20downloads"></a>
<a href="https://pypistats.org/packages/prowler-cloud"><img alt="PyPI Prowler-Cloud Downloads" src="https://img.shields.io/pypi/dw/prowler-cloud.svg?label=prowler-cloud%20downloads"></a>
<a href="https://formulae.brew.sh/formula/prowler#default"><img alt="Brew Prowler Downloads" src="https://img.shields.io/homebrew/installs/dm/prowler?label=brew%20downloads"></a>
<a href="https://hub.docker.com/r/toniblyx/prowler"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/toniblyx/prowler"></a>
<a href="https://hub.docker.com/r/toniblyx/prowler"><img alt="Docker" src="https://img.shields.io/docker/cloud/build/toniblyx/prowler"></a>
<a href="https://hub.docker.com/r/toniblyx/prowler"><img alt="Docker" src="https://img.shields.io/docker/image-size/toniblyx/prowler"></a>
<a href="https://gallery.ecr.aws/prowler-cloud/prowler"><img width="120" height=19" alt="AWS ECR Gallery" src="https://user-images.githubusercontent.com/3985464/151531396-b6535a68-c907-44eb-95a1-a09508178616.png"></a>
</p>
<p align="center">
<a href="https://github.com/prowler-cloud/prowler"><img alt="Repo size" src="https://img.shields.io/github/repo-size/prowler-cloud/prowler"></a>
<a href="https://github.com/prowler-cloud/prowler/issues"><img alt="Issues" src="https://img.shields.io/github/issues/prowler-cloud/prowler"></a>
<a href="https://github.com/prowler-cloud/prowler/releases"><img alt="Version" src="https://img.shields.io/github/v/release/prowler-cloud/prowler?include_prereleases"></a>
<a href="https://github.com/prowler-cloud/prowler/releases"><img alt="Version" src="https://img.shields.io/github/release-date/prowler-cloud/prowler"></a>
<a href="https://github.com/prowler-cloud/prowler"><img alt="Contributors" src="https://img.shields.io/github/contributors-anon/prowler-cloud/prowler"></a>
<a href="https://github.com/prowler-cloud/prowler"><img alt="License" src="https://img.shields.io/github/license/prowler-cloud/prowler"></a>
<a href="https://twitter.com/ToniBlyx"><img alt="Twitter" src="https://img.shields.io/twitter/follow/toniblyx?style=social"></a>
<a href="https://twitter.com/prowlercloud"><img alt="Twitter" src="https://img.shields.io/twitter/follow/prowlercloud?style=social"></a>
</p>
# Description
`Prowler` is an Open Source security tool to perform AWS and Azure security best practices assessments, audits, incident response, continuous monitoring, hardening and forensics readiness.
It contains hundreds of controls covering CIS, PCI-DSS, ISO27001, GDPR, HIPAA, FFIEC, SOC2, AWS FTR, ENS and custom security frameworks.
# 📖 Documentation
The full documentation can now be found at [https://docs.prowler.cloud](https://docs.prowler.cloud)
## Looking for Prowler v2 documentation?
For Prowler v2 Documentation, please go to https://github.com/prowler-cloud/prowler/tree/2.12.1.
# ⚙️ Install
## Pip package
Prowler is available as a project in [PyPI](https://pypi.org/project/prowler-cloud/), thus can be installed using pip with Python >= 3.9:
```console
pip install prowler
prowler -v
```
More details at https://docs.prowler.cloud
```sh
./prowler -A 123456789012 -R ProwlerRole -I 123456
```
## Containers
> *NOTE 1 about Session Duration*: By default it gets credentials valid for 1 hour (3600 seconds). Depending on the mount of checks you run and the size of your infrastructure, Prowler may require more than 1 hour to finish. Use option `-T <seconds>` to allow up to 12h (43200 seconds). To allow more than 1h you need to modify *"Maximum CLI/API session duration"* for that particular role, read more [here](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session).
The available versions of Prowler are the following:
> *NOTE 2 about Session Duration*: Bear in mind that if you are using roles assumed by role chaining there is a hard limit of 1 hour so consider not using role chaining if possible, read more about that, in foot note 1 below the table [here](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html).
- `latest`: in sync with master branch (bear in mind that it is not a stable version)
- `<x.y.z>` (release): you can find the releases [here](https://github.com/prowler-cloud/prowler/releases), those are stable releases.
- `stable`: this tag always point to the latest release.
The container images are available here:
For example, if you want to get only the fails in CSV format from all checks regarding RDS without banner from the AWS Account 123456789012 assuming the role RemoteRoleToAssume and set a fixed session duration of 1h:
- [DockerHub](https://hub.docker.com/r/toniblyx/prowler/tags)
- [AWS Public ECR](https://gallery.ecr.aws/prowler-cloud/prowler)
```sh
./prowler -A 123456789012 -R RemoteRoleToAssume -T 3600 -b -M cvs -q -g rds
```
## From Github
```sh
./prowler -A 123456789012 -R RemoteRoleToAssume -T 3600 -I 123456 -b -M cvs -q -g rds
```
### Assume Role and across all accounts in AWS Organizations:
If you want to run Prowler or just a check or a group across all accounts of AWS Organizations you can do this:
First get a list of accounts:
```
ACCOUNTS_IN_ORGS=$(aws organizations list-accounts --query Accounts[*].Id --output text)
```
Then run Prowler to assume a role (same in all members) per each account, in this example it is just running one particular check:
```
for accountId in $ACCOUNTS_IN_ORGS; do ./prowler -A $accountId -R RemoteRoleToAssume -c extra79; done
```
### Custom folder for custom checks
Flag `-x /my/own/checks` will include any check in that particular directory. To see how to write checks see [Add Custom Checks](#add-custom-checks) section.
### Show or log only FAILs
In order to remove noise and get only FAIL findings there is a `-q` flag that makes Prowler to show and log only FAILs. It can be combined with any other option.
```sh
./prowler -q -M csv -b
```
### Set the entropy limit for detect-secrets
Sets the entropy limit for high entropy base64 strings from environment variable `BASE64_LIMIT`. Value must be between 0.0 and 8.0, defaults is 4.5.
Sets the entropy limit for high entropy hex strings from environment variable `HEX_LIMIT`. Value must be between 0.0 and 8.0, defaults is 3.0.
```sh
export BASE64_LIMIT=4.5
export HEX_LIMIT=3.0
```
## Security Hub integration
Since version v2.3, Prowler supports natively sending findings to [AWS Security Hub](https://aws.amazon.com/security-hub). This integration allows Prowler to import its findings to AWS Security Hub. With Security Hub, you now have a single place that aggregates, organizes, and prioritizes your security alerts, or findings, from multiple AWS services, such as Amazon GuardDuty, Amazon Inspector, Amazon Macie, AWS Identity and Access Management (IAM) Access Analyzer, and AWS Firewall Manager, as well as from AWS Partner solutions and now from Prowler. It is as simple as running the command below:
```sh
./prowler -M json-asff -S
```
There are two requirements:
1. Security Hub must be enabled for the active region from where you are calling Prowler (if no region is used with `-r` then `us-east-1` is used). It can be enabled by calling `aws securityhub enable-security-hub`
2. As mentioned in section "Custom IAM Policy", to allow Prowler to import its findings to AWS Security Hub you need to add the policy below to the role or user running Prowler:
- [iam/prowler-security-hub.json](iam/prowler-security-hub.json)
>Note: to have updated findings in Security Hub you have to run Prowler periodically. Once a day or every certain amount of hours.
## Whitelist or remove FAIL from resources
Sometimes you may find resources that are intentionally configured in a certain way that may be a bad practice but it is all right with it, for example an S3 bucket open to the internet hosting a web site, or a security group with an open port needed in your use case. Now you can use `-w whitelist_sample.txt` and add your resources as `checkID:resourcename` as in this command:
Python >= 3.9 is required with pip and poetry:
```
./prowler -w whitelist_sample.txt
git clone https://github.com/prowler-cloud/prowler
cd prowler
poetry shell
poetry install
python prowler.py -v
```
Whitelist option works along with other options and adds a `WARNING` instead of `INFO`, `PASS` or `FAIL` to any output format except for `json-asff`.
# 📐✏️ High level architecture
## How to fix every FAIL
You can run Prowler from your workstation, an EC2 instance, Fargate or any other container, Codebuild, CloudShell and Cloud9.
Check your report and fix the issues following all specific guidelines per check in <https://d0.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf>
![Architecture](https://github.com/prowler-cloud/prowler/blob/62c1ce73bbcdd6b9e5ba03dfcae26dfd165defd9/docs/img/architecture.png?raw=True)
## Screenshots
# 📝 Requirements
- Sample screenshot of report first lines:
Prowler has been written in Python using the [AWS SDK (Boto3)](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html#) and [Azure SDK](https://azure.github.io/azure-sdk-for-python/).
## AWS
<img width="1125" alt="screenshot 2016-09-13 16 05 42" src="https://cloud.githubusercontent.com/assets/3985464/18489640/50fe6824-79cc-11e6-8a9c-e788b88a8a6b.png">
Since Prowler uses AWS Credentials under the hood, you can follow any authentication method as described [here](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html#cli-configure-quickstart-precedence).
Make sure you have properly configured your AWS-CLI with a valid Access Key and Region or declare AWS variables properly (or instance profile/role):
- Sample screenshot of single check for check 3.3:
```console
aws configure
```
<img width="1006" alt="screenshot 2016-09-14 13 20 46" src="https://cloud.githubusercontent.com/assets/3985464/18522590/a04ca9a6-7a7e-11e6-8730-b545c9204990.png">
or
## Troubleshooting
```console
export AWS_ACCESS_KEY_ID="ASXXXXXXX"
export AWS_SECRET_ACCESS_KEY="XXXXXXXXX"
export AWS_SESSION_TOKEN="XXXXXXXXX"
```
### STS expired token
Those credentials must be associated to a user or role with proper permissions to do all checks. To make sure, add the following AWS managed policies to the user or role being used:
If you are using an STS token for AWS-CLI and your session is expired you probably get this error:
- arn:aws:iam::aws:policy/SecurityAudit
- arn:aws:iam::aws:policy/job-function/ViewOnlyAccess
```sh
A client error (ExpiredToken) occurred when calling the GenerateCredentialReport operation: The security token included in the request is expired
> Moreover, some read-only additional permissions are needed for several checks, make sure you attach also the custom policy [prowler-additions-policy.json](https://github.com/prowler-cloud/prowler/blob/master/permissions/prowler-additions-policy.json) to the role you are using.
> If you want Prowler to send findings to [AWS Security Hub](https://aws.amazon.com/security-hub), make sure you also attach the custom policy [prowler-security-hub.json](https://github.com/prowler-cloud/prowler/blob/master/permissions/prowler-security-hub.json).
## Azure
Prowler for Azure supports the following authentication types:
- Service principal authentication by environment variables (Enterprise Application)
- Current az cli credentials stored
- Interactive browser authentication
- Managed identity authentication
### Service Principal authentication
To allow Prowler assume the service principal identity to start the scan, it is needed to configure the following environment variables:
```console
export AZURE_CLIENT_ID="XXXXXXXXX"
export AZURE_TENANT_ID="XXXXXXXXX"
export AZURE_CLIENT_SECRET="XXXXXXX"
```
To fix it, please renew your token by authenticating again to the AWS API, see next section below if you use MFA.
If you try to execute Prowler with the `--sp-env-auth` flag and those variables are empty or not exported, the execution is going to fail.
### AZ CLI / Browser / Managed Identity authentication
### Run Prowler with MFA protected credentials
The other three cases do not need additional configuration, `--az-cli-auth` and `--managed-identity-auth` are automated options, `--browser-auth` needs the user to authenticate using the default browser to start the scan.
To run Prowler using a profile that requires MFA you just need to get the session token before hand. Just make sure you use this command:
### Permissions
```sh
aws --profile <YOUR_AWS_PROFILE> sts get-session-token --duration 129600 --serial-number <ARN_OF_MFA> --token-code <MFA_TOKEN_CODE> --output text
To use each one, you need to pass the proper flag to the execution. Prowler for Azure handles two types of permission scopes, which are:
- **Azure Active Directory permissions**: Used to retrieve metadata from the identity assumed by Prowler and future AAD checks (not mandatory to have access to execute the tool)
- **Subscription scope permissions**: Required to launch the checks against your resources, mandatory to launch the tool.
#### Azure Active Directory scope
Azure Active Directory (AAD) permissions required by the tool are the following:
- `Directory.Read.All`
- `Policy.Read.All`
#### Subscriptions scope
Regarding the subscription scope, Prowler by default scans all the subscriptions that is able to list, so it is required to add the following RBAC builtin roles per subscription to the entity that is going to be assumed by the tool:
- `Security Reader`
- `Reader`
# 💻 Basic Usage
To run prowler, you will need to specify the provider (e.g aws or azure):
```console
prowler <provider>
```
Once you get your token you can export it as environment variable:
![Prowler Execution](https://github.com/prowler-cloud/prowler/blob/b91b0103ff38e66a915c8a0ed84905a07e4aae1d/docs/img/short-display.png?raw=True)
```sh
export AWS_PROFILE=YOUR_AWS_PROFILE
export AWS_SESSION_TOKEN=YOUR_NEW_TOKEN
AWS_SECRET_ACCESS_KEY=YOUR_SECRET
export AWS_ACCESS_KEY_ID=YOUR_KEY
> Running the `prowler` command without options will use your environment variable credentials.
By default, prowler will generate a CSV, a JSON and a HTML report, however you can generate JSON-ASFF (only for AWS Security Hub) report with `-M` or `--output-modes`:
```console
prowler <provider> -M csv json json-asff html
```
or set manually up your `~/.aws/credentials` file properly.
The html report will be located in the `output` directory as the other files and it will look like:
There are some helpfull tools to save time in this process like [aws-mfa-script](https://github.com/asagage/aws-mfa-script) or [aws-cli-mfa](https://github.com/sweharris/aws-cli-mfa).
![Prowler Execution](https://github.com/prowler-cloud/prowler/blob/62c1ce73bbcdd6b9e5ba03dfcae26dfd165defd9/docs/img/html-output.png?raw=True)
### AWS Managed IAM Policies
You can use `-l`/`--list-checks` or `--list-services` to list all available checks or services within the provider.
[ViewOnlyAccess](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_job-functions.html#jf_view-only-user)
- Use case: This user can view a list of AWS resources and basic metadata in the account across all services. The user cannot read resource content or metadata that goes beyond the quota and list information for resources.
- Policy description: This policy grants List*, Describe*, Get*, View*, and Lookup* access to resources for most AWS services. To see what actions this policy includes for each service, see [ViewOnlyAccess Permissions](https://console.aws.amazon.com/iam/home#policies/arn:aws:iam::aws:policy/job-function/ViewOnlyAccess)
[SecurityAudit](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_job-functions.html#jf_security-auditor)
- Use case: This user monitors accounts for compliance with security requirements. This user can access logs and events to investigate potential security breaches or potential malicious activity.
- Policy description: This policy grants permissions to view configuration data for many AWS services and to review their logs. To see what actions this policy includes for each service, see [SecurityAudit Permissions](https://console.aws.amazon.com/iam/home#policies/arn:aws:iam::aws:policy/SecurityAudit)
### Custom IAM Policy
[Prowler-Additions-Policy](iam/prowler-additions-policy.json)
Some new and specific checks require Prowler to inherit more permissions than SecurityAudit and ViewOnlyAccess to work properly. In addition to the AWS managed policies, "SecurityAudit" and "ViewOnlyAccess", the user/role you use for checks may need to be granted a custom policy with a few more read-only permissions (to support additional services mostly). Here is an example policy with the additional rights, "Prowler-Additions-Policy" (see below bootstrap script for set it up):
- [iam/prowler-additions-policy.json](iam/prowler-additions-policy.json)
[Prowler-Security-Hub Policy](iam/prowler-security-hub.json)
Allows Prowler to import its findings to [AWS Security Hub](https://aws.amazon.com/security-hub). More information in [Security Hub integration](#security-hub-integration):
- [iam/prowler-security-hub.json](iam/prowler-security-hub.json)
### Bootstrap Script
Quick bash script to set up a "prowler" IAM user with "SecurityAudit" and "ViewOnlyAccess" group with the required permissions (including "Prowler-Additions-Policy"). To run the script below, you need user with administrative permissions; set the `AWS_DEFAULT_PROFILE` to use that account:
```sh
export AWS_DEFAULT_PROFILE=default
export ACCOUNT_ID=$(aws sts get-caller-identity --query 'Account' | tr -d '"')
aws iam create-group --group-name Prowler
aws iam create-policy --policy-name Prowler-Additions-Policy --policy-document file://$(pwd)/iam/prowler-additions-policy.json
aws iam attach-group-policy --group-name Prowler --policy-arn arn:aws:iam::aws:policy/SecurityAudit
aws iam attach-group-policy --group-name Prowler --policy-arn arn:aws:iam::aws:policy/job-function/ViewOnlyAccess
aws iam attach-group-policy --group-name Prowler --policy-arn arn:aws:iam::${ACCOUNT_ID}:policy/Prowler-Additions-Policy
aws iam create-user --user-name prowler
aws iam add-user-to-group --user-name prowler --group-name Prowler
aws iam create-access-key --user-name prowler
unset ACCOUNT_ID AWS_DEFAULT_PROFILE
```console
prowler <provider> --list-checks
prowler <provider> --list-services
```
The `aws iam create-access-key` command will output the secret access key and the key id; keep these somewhere safe, and add them to `~/.aws/credentials` with an appropriate profile name to use them with prowler. This is the only time they secret key will be shown. If you lose it, you will need to generate a replacement.
For executing specific checks or services you can use options `-c`/`--checks` or `-s`/`--services`:
## Extras
We are adding additional checks to improve the information gather from each account, these checks are out of the scope of the CIS benchmark for AWS but we consider them very helpful to get to know each AWS account set up and find issues on it.
Some of these checks look for publicly facing resources may not actually be fully public due to other layered controls like S3 Bucket Policies, Security Groups or Network ACLs.
To list all existing checks please run the command below:
```sh
./prowler -l
```console
prowler aws --checks s3_bucket_public_access
prowler aws --services s3 ec2
```
>There are some checks not included in that list, they are experimental or checks that takes long to run like `extra759` and `extra760` (search for secrets in Lambda function variables and code).
Also, checks and services can be excluded with options `-e`/`--excluded-checks` or `--excluded-services`:
To check all extras in one command:
```sh
./prowler -g extras
```console
prowler aws --excluded-checks s3_bucket_public_access
prowler aws --excluded-services s3 ec2
```
or to run just one of the checks:
You can always use `-h`/`--help` to access to the usage information and all the possible options:
```sh
./prowler -c extraNUMBER
```console
prowler -h
```
or to run multiple extras in one go:
```sh
./prowler -c extraNumber,extraNumber
## Checks Configurations
Several Prowler's checks have user configurable variables that can be modified in a common **configuration file**.
This file can be found in the following path:
```
prowler/config/config.yaml
```
## AWS
## Forensics Ready Checks
Use a custom AWS profile with `-p`/`--profile` and/or AWS regions which you want to audit with `-f`/`--filter-region`:
With this group of checks, Prowler looks if each service with logging or audit capabilities has them enabled to ensure all needed evidences are recorded and collected for an eventual digital forensic investigation in case of incident. List of checks part of this group (you can also see all groups with `./prowler -L`). The list of checks can be seen in the group file at:
[groups/group8_forensics](groups/group8_forensics)
The `forensics-ready` group of checks uses existing and extra checks. To get a forensics readiness report, run this command:
```sh
./prowler -g forensics-ready
```console
prowler aws --profile custom-profile -f us-east-1 eu-south-2
```
> By default, `prowler` will scan all AWS regions.
## GDPR Checks
## Azure
With this group of checks, Prowler shows result of checks related to GDPR, more information [here](https://github.com/toniblyx/prowler/issues/189). The list of checks can be seen in the group file at:
With Azure you need to specify which auth method is going to be used:
[groups/group9_gdpr](groups/group9_gdpr)
The `gdpr` group of checks uses existing and extra checks. To get a GDPR report, run this command:
```sh
./prowler -g gdpr
```console
prowler azure [--sp-env-auth, --az-cli-auth, --browser-auth, --managed-identity-auth]
```
> By default, `prowler` will scan all Azure subscriptions.
## HIPAA Checks
# 🎉 New Features
With this group of checks, Prowler shows results of controls related to the "Security Rule" of the Health Insurance Portability and Accountability Act aka [HIPAA](https://www.hhs.gov/hipaa/for-professionals/security/index.html) as defined in [45 CFR Subpart C - Security Standards for the Protection of Electronic Protected Health Information](https://www.law.cornell.edu/cfr/text/45/part-164/subpart-C) within [PART 160 - GENERAL ADMINISTRATIVE REQUIREMENTS](https://www.law.cornell.edu/cfr/text/45/part-160) and [Subpart A](https://www.law.cornell.edu/cfr/text/45/part-164/subpart-A) and [Subpart C](https://www.law.cornell.edu/cfr/text/45/part-164/subpart-C) of PART 164 - SECURITY AND PRIVACY
- Python: we got rid of all bash and it is now all in Python.
- Faster: huge performance improvements (same account from 2.5 hours to 4 minutes).
- Developers and community: we have made it easier to contribute with new checks and new compliance frameworks. We also included unit tests.
- Multi-cloud: in addition to AWS, we have added Azure, we plan to include GCP and OCI soon, let us know if you want to contribute!
More information on the original PR is [here](https://github.com/toniblyx/prowler/issues/227).
# 📃 License
### Note on Business Associate Addendum's (BAA)
Under the HIPAA regulations, cloud service providers (CSPs) such as AWS are considered business associates. The Business Associate Addendum (BAA) is an AWS contract that is required under HIPAA rules to ensure that AWS appropriately safeguards protected health information (PHI). The BAA also serves to clarify and limit, as appropriate, the permissible uses and disclosures of PHI by AWS, based on the relationship between AWS and our customers, and the activities or services being performed by AWS. Customers may use any AWS service in an account designated as a HIPAA account, but they should only process, store, and transmit protected health information (PHI) in the HIPAA-eligible services defined in the Business Associate Addendum (BAA). For the latest list of HIPAA-eligible AWS services, see [HIPAA Eligible Services Reference](https://aws.amazon.com/compliance/hipaa-eligible-services-reference/).
More information on AWS & HIPAA can be found [here](https://aws.amazon.com/compliance/hipaa-compliance/)
The list of checks showed by this group is as follows, they will be mostly relevant for Subsections [164.306 Security standards: General rules](https://www.law.cornell.edu/cfr/text/45/164.306) and [164.312 Technical safeguards](https://www.law.cornell.edu/cfr/text/45/164.312). Prowler is only able to make checks in the spirit of the technical requirements outlined in these Subsections, and cannot cover all procedural controls required. They be found in the group file at:
[groups/group10_hipaa](groups/group10_hipaa)
The `hipaa` group of checks uses existing and extra checks. To get a HIPAA report, run this command:
```sh
./prowler -g hipaa
```
## Trust Boundaries Checks
### Definition and Terms
The term "trust boundary" is originating from the threat modelling process and the most popular contributor Adam Shostack and author of "Threat Modeling: Designing for Security" defines it as following ([reference](https://adam.shostack.org/uncover.html)):
> Trust boundaries are perhaps the most subjective of all: these represent the border between trusted and untrusted elements. Trust is complex. You might trust your mechanic with your car, your dentist with your teeth, and your banker with your money, but you probably don't trust your dentist to change your spark plugs.
AWS is made to be flexible for service links within and between different AWS accounts, we all know that.
This group of checks helps to analyse a particular AWS account (subject) on existing links to other AWS accounts across various AWS services, in order to identify untrusted links.
### Run
To give it a quick shot just call:
```sh
./prowler -g trustboundaries
```
### Scenarios
Currently this check group supports two different scenarios:
1. Single account environment: no action required, the configuration is happening automatically for you.
2. Multi account environment: in case you environment has multiple trusted and known AWS accounts you maybe want to append them manually to [groups/group16_trustboundaries](groups/group16_trustboundaries) as a space separated list into `GROUP_TRUSTBOUNDARIES_TRUSTED_ACCOUNT_IDS` variable, then just run prowler.
### Coverage
Current coverage of Amazon Web Service (AWS) taken from [here](https://docs.aws.amazon.com/whitepapers/latest/aws-overview/introduction.html):
| Topic | Service | Trust Boundary |
|---------------------------------|------------|---------------------------------------------------------------------------|
| Networking and Content Delivery | Amazon VPC | VPC endpoints connections ([extra786](checks/check_extra786)) |
| | | VPC endpoints whitelisted principals ([extra787](checks/check_extra787)) |
All ideas or recommendations to extend this group are very welcome [here](https://github.com/toniblyx/prowler/issues/new/choose).
### Detailed Explanation of the Concept
The diagrams depict two common scenarios, single account and multi account environments.
Every circle represents one AWS account.
The dashed line represents the trust boundary, that separates trust and untrusted AWS accounts.
The arrow simply describes the direction of the trust, however the data can potentially flow in both directions.
Single Account environment assumes that only the AWS account subject to this analysis is trusted. However there is a chance that two VPCs are existing within that one AWS account which are still trusted as a self reference.
![single-account-environment](/docs/images/prowler-single-account-environment.png)
Multi Account environments assumes a minimum of two trusted or known accounts. For this particular example all trusted and known accounts will be tested. Therefore `GROUP_TRUSTBOUNDARIES_TRUSTED_ACCOUNT_IDS` variable in [groups/group16_trustboundaries](groups/group16_trustboundaries) should include all trusted accounts Account #A, Account #B, Account #C, and Account #D in order to finally raise Account #E and Account #F for being untrusted or unknown.
![multi-account-environment](/docs/images/prowler-multi-account-environment.png)
## Add Custom Checks
In order to add any new check feel free to create a new extra check in the extras group or other group. To do so, you will need to follow these steps:
1. Follow structure in file `checks/check_sample`
2. Name your check with a number part of an existing group or a new one
3. Save changes and run it as `./prowler -c extraNN`
4. Send me a pull request! :)
## Add Custom Groups
1. Follow structure in file `groups/groupN_sample`
1. Name your group with a non existing number
1. Save changes and run it as `./prowler -g extraNN`
1. Send me a pull request! :)
- You can also create a group with only the checks that you want to perform in your company, for instance a group named `group9_mycompany` with only the list of checks that you care or your particular compliance applies.
## Third Party Integrations
### AWS Security Hub
There is a blog post about that integration in the AWS Security blog here <https://aws.amazon.com/blogs/security/use-aws-fargate-prowler-send-security-configuration-findings-about-aws-services-security-hub/>
### Telegram
Javier Pecete has done an awesome job integrating Prowler with Telegram, you have more details here <https://github.com/i4specete/ServerTelegramBot>
### Cloud Security Suite
The guys of SecurityFTW have added Prowler in their Cloud Security Suite along with other cool security tools <https://github.com/SecurityFTW/cs-suite>
## License
All CIS based checks in the checks folder are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License.
The link to the license terms can be found at
<https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode>
Any other piece of code is licensed as Apache License 2.0 as specified in each file. You may obtain a copy of the License at
Prowler is licensed as Apache License 2.0 as specified in each file. You may obtain a copy of the License at
<http://www.apache.org/licenses/LICENSE-2.0>
NOTE: If you are interested in using Prowler for commercial purposes remember that due to the CC4.0 license “The distributors or partners that are interested and using Prowler would need to enroll as CIS SecureSuite Members to incorporate this product, which includes references to CIS resources, in their offering.". Information about CIS pricing for vendors here: <https://www.cisecurity.org/cis-securesuite/pricing-and-categories/product-vendor/>
**I'm not related anyhow with CIS organization, I just write and maintain Prowler to help companies over the world to make their cloud infrastructure more secure.**
If you want to contact me visit <https://blyx.com/contact>

23
SECURITY.md Normal file
View File

@@ -0,0 +1,23 @@
# Security Policy
## Software Security
As an **AWS Partner** and we have passed the [AWS Foundation Technical Review (FTR)](https://aws.amazon.com/partners/foundational-technical-review/) and we use the following tools and automation to make sure our code is secure and dependencies up-to-dated:
- `bandit` for code security review.
- `safety` and `dependabot` for dependencies.
- `hadolint` and `dockle` for our containers security.
- `snyk` in Docker Hub.
- `clair` in Amazon ECR.
- `vulture`, `flake8`, `black` and `pylint` for formatting and best practices.
## Reporting a Vulnerability
If you would like to report a vulnerability or have a security concern regarding Prowler Open Source or ProwlerPro service, please submit the information by contacting to help@prowler.pro.
The information you share with Verica as part of this process is kept confidential within Verica and the Prowler team. We will only share this information with a third party if the vulnerability you report is found to affect a third-party product, in which case we will share this information with the third-party product's author or manufacturer. Otherwise, we will only share this information as permitted by you.
We will review the submitted report, and assign it a tracking number. We will then respond to you, acknowledging receipt of the report, and outline the next steps in the process.
You will receive a non-automated response to your initial contact within 24 hours, confirming receipt of your reported vulnerability.
We will coordinate public notification of any validated vulnerability with you. Where possible, we prefer that our respective public disclosures be posted simultaneously.

View File

@@ -1,38 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check11="1.1"
CHECK_TITLE_check11="[check11] Avoid the use of the root account (Scored)"
CHECK_SCORED_check11="SCORED"
CHECK_TYPE_check11="LEVEL1"
CHECK_ASFF_TYPE_check11="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ALTERNATE_check101="check11"
check11(){
# "Avoid the use of the root account (Scored)."
MAX_DAYS=-1
last_login_dates=$(cat $TEMP_REPORT_FILE | awk -F, '{ print $1,$5,$11,$16 }' | grep '<root_account>' | cut -d' ' -f2,3,4)
failures=0
for date in $last_login_dates; do
if [[ ${date%T*} =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]];then
days_not_in_use=$(how_many_days_from_today ${date%T*})
if [ "$days_not_in_use" -gt "$MAX_DAYS" ];then
failures=1
textFail "Root user in the account was last accessed ${MAX_DAYS#-} day ago"
break
fi
fi
done
if [[ $failures == 0 ]]; then
textPass "Root user in the account wasn't accessed in the last ${MAX_DAYS#-} days"
fi
}

View File

@@ -1,30 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check110="1.10"
CHECK_TITLE_check110="[check110] Ensure IAM password policy prevents password reuse: 24 or greater (Scored)"
CHECK_SCORED_check110="SCORED"
CHECK_TYPE_check110="LEVEL1"
CHECK_ASFF_TYPE_check110="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ALTERNATE_check110="check110"
check110(){
# "Ensure IAM password policy prevents password reuse: 24 or greater (Scored)"
COMMAND110=$($AWSCLI iam get-account-password-policy $PROFILE_OPT --region $REGION --query 'PasswordPolicy.PasswordReusePrevention' --output text 2> /dev/null)
if [[ $COMMAND110 ]];then
if [[ $COMMAND110 -gt "23" ]];then
textPass "Password Policy limits reuse"
else
textFail "Password Policy has weak reuse requirement (lower than 24)"
fi
else
textFail "Password Policy missing reuse requirement"
fi
}

View File

@@ -1,30 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check111="1.11"
CHECK_TITLE_check111="[check111] Ensure IAM password policy expires passwords within 90 days or less (Scored)"
CHECK_SCORED_check111="SCORED"
CHECK_TYPE_check111="LEVEL1"
CHECK_ASFF_TYPE_check111="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ALTERNATE_check111="check111"
check111(){
# "Ensure IAM password policy expires passwords within 90 days or less (Scored)"
COMMAND111=$($AWSCLI iam get-account-password-policy $PROFILE_OPT --region $REGION --query PasswordPolicy.MaxPasswordAge --output text 2> /dev/null)
if [[ $COMMAND111 == [0-9]* ]];then
if [[ "$COMMAND111" -le "90" ]];then
textPass "Password Policy includes expiration (Value: $COMMAND111)"
else
textFail "Password expiration is set greater than 90 days"
fi
else
textFail "Password expiration is not set"
fi
}

View File

@@ -1,33 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check112="1.12"
CHECK_TITLE_check112="[check112] Ensure no root account access key exists (Scored)"
CHECK_SCORED_check112="SCORED"
CHECK_TYPE_check112="LEVEL1"
CHECK_ASFF_TYPE_check112="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ALTERNATE_check112="check112"
check112(){
# "Ensure no root account access key exists (Scored)"
# ensure the access_key_1_active and access_key_2_active fields are set to FALSE.
ROOTKEY1=$(cat $TEMP_REPORT_FILE |grep root_account|awk -F',' '{ print $9 }')
ROOTKEY2=$(cat $TEMP_REPORT_FILE |grep root_account|awk -F',' '{ print $14 }')
if [ "$ROOTKEY1" == "false" ];then
textPass "No access key 1 found for root"
else
textFail "Found access key 1 for root"
fi
if [ "$ROOTKEY2" == "false" ];then
textPass "No access key 2 found for root"
else
textFail "Found access key 2 for root"
fi
}

View File

@@ -1,26 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check113="1.13"
CHECK_TITLE_check113="[check113] Ensure MFA is enabled for the root account (Scored)"
CHECK_SCORED_check113="SCORED"
CHECK_TYPE_check113="LEVEL1"
CHECK_ASFF_TYPE_check113="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ALTERNATE_check113="check113"
check113(){
# "Ensure MFA is enabled for the root account (Scored)"
COMMAND113=$($AWSCLI iam get-account-summary $PROFILE_OPT --region $REGION --output json --query 'SummaryMap.AccountMFAEnabled')
if [ "$COMMAND113" == "1" ]; then
textPass "Virtual MFA is enabled for root"
else
textFail "MFA is not ENABLED for root account"
fi
}

View File

@@ -1,31 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check114="1.14"
CHECK_TITLE_check114="[check114] Ensure hardware MFA is enabled for the root account (Scored)"
CHECK_SCORED_check114="SCORED"
CHECK_TYPE_check114="LEVEL2"
CHECK_ASFF_TYPE_check114="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ALTERNATE_check114="check114"
check114(){
# "Ensure hardware MFA is enabled for the root account (Scored)"
COMMAND113=$($AWSCLI iam get-account-summary $PROFILE_OPT --region $REGION --output json --query 'SummaryMap.AccountMFAEnabled')
if [ "$COMMAND113" == "1" ]; then
COMMAND114=$($AWSCLI iam list-virtual-mfa-devices $PROFILE_OPT --region $REGION --output text --assignment-status Assigned --query 'VirtualMFADevices[*].[SerialNumber]' | grep '^arn:${AWS_PARTITION}:iam::[0-9]\{12\}:mfa/root-account-mfa-device$')
if [[ "$COMMAND114" ]]; then
textFail "Only Virtual MFA is enabled for root"
else
textPass "Hardware MFA is enabled for root"
fi
else
textFail "MFA is not ENABLED for root account"
fi
}

View File

@@ -1,23 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check115="1.15"
CHECK_TITLE_check115="[check115] Ensure security questions are registered in the AWS account (Not Scored)"
CHECK_SCORED_check115="NOT_SCORED"
CHECK_TYPE_check115="LEVEL1"
CHECK_ASFF_TYPE_check115="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ALTERNATE_check115="check115"
check115(){
# "Ensure security questions are registered in the AWS account (Not Scored)"
textInfo "No command available for check 1.15 "
textInfo "Login to the AWS Console as root & click on the Account "
textInfo "Name -> My Account -> Configure Security Challenge Questions "
}

View File

@@ -1,38 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check116="1.16"
CHECK_TITLE_check116="[check116] Ensure IAM policies are attached only to groups or roles (Scored)"
CHECK_SCORED_check116="SCORED"
CHECK_TYPE_check116="LEVEL1"
CHECK_ASFF_TYPE_check116="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check116="AwsIamUser"
CHECK_ALTERNATE_check116="check116"
check116(){
# "Ensure IAM policies are attached only to groups or roles (Scored)"
LIST_USERS=$($AWSCLI iam list-users --query 'Users[*].UserName' --output text $PROFILE_OPT --region $REGION)
C116_NUM_USERS=0
for user in $LIST_USERS;do
USER_POLICY=$($AWSCLI iam list-attached-user-policies --output text $PROFILE_OPT --region $REGION --user-name $user)
if [[ $USER_POLICY ]]; then
textFail "$user has managed policy directly attached"
C116_NUM_USERS=$(expr $C116_NUM_USERS + 1)
fi
USER_POLICY=$($AWSCLI iam list-user-policies --output text $PROFILE_OPT --region $REGION --user-name $user)
if [[ $USER_POLICY ]]; then
textFail "$user has inline policy directly attached"
C116_NUM_USERS=$(expr $C116_NUM_USERS + 1)
fi
done
if [[ $C116_NUM_USERS -eq 0 ]]; then
textPass "No policies attached to users"
fi
}

View File

@@ -1,23 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check117="1.17"
CHECK_TITLE_check117="[check117] Maintain current contact details (Not Scored)"
CHECK_SCORED_check117="NOT_SCORED"
CHECK_TYPE_check117="LEVEL1"
CHECK_ASFF_TYPE_check117="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ALTERNATE_check117="check117"
check117(){
# "Maintain current contact details (Scored)"
# No command available
textInfo "No command available for check 1.17 "
textInfo "See section 1.17 on the CIS Benchmark guide for details "
}

View File

@@ -1,23 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check118="1.18"
CHECK_TITLE_check118="[check118] Ensure security contact information is registered (Not Scored)"
CHECK_SCORED_check118="NOT_SCORED"
CHECK_TYPE_check118="LEVEL1"
CHECK_ASFF_TYPE_check118="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ALTERNATE_check118="check118"
check118(){
# "Ensure security contact information is registered (Scored)"
# No command available
textInfo "No command available for check 1.18 "
textInfo "See section 1.18 on the CIS Benchmark guide for details "
}

View File

@@ -1,40 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check119="1.19"
CHECK_TITLE_check119="[check119] Ensure IAM instance roles are used for AWS resource access from instances (Not Scored)"
CHECK_SCORED_check119="NOT_SCORED"
CHECK_TYPE_check119="LEVEL2"
CHECK_ASFF_TYPE_check119="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check119="AwsEc2Instance"
CHECK_ALTERNATE_check119="check119"
check119(){
for regx in $REGIONS; do
EC2_DATA=$($AWSCLI ec2 describe-instances $PROFILE_OPT --region $regx --query 'Reservations[].Instances[].[InstanceId, IamInstanceProfile.Arn, State.Name]')
EC2_DATA=$(echo $EC2_DATA | jq '.[]|{InstanceId: .[0], ProfileArn: .[1], StateName: .[2]}')
INSTANCE_LIST=$(echo $EC2_DATA | jq -r '.InstanceId')
if [[ $INSTANCE_LIST ]]; then
for instance in $INSTANCE_LIST; do
STATE_NAME=$(echo $EC2_DATA | jq -r --arg i "$instance" 'select(.InstanceId==$i)|.StateName')
if [[ $STATE_NAME != "terminated" ]]; then
PROFILEARN=$(echo $EC2_DATA | jq -r --arg i "$instance" 'select(.InstanceId==$i)|.ProfileArn')
if [[ $PROFILEARN == "null" ]]; then
textFail "$regx: Instance $instance not associated with an instance role" $regx
else
textPass "$regx: Instance $instance associated with role ${PROFILEARN##*/}" $regx
fi
fi
done
else
textInfo "$regx: No EC2 instances found" $regx
fi
done
}

View File

@@ -1,34 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check12="1.2"
CHECK_TITLE_check12="[check12] Ensure multi-factor authentication (MFA) is enabled for all IAM users that have a console password (Scored)"
CHECK_SCORED_check12="SCORED"
CHECK_TYPE_check12="LEVEL1"
CHECK_ASFF_TYPE_check12="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check12="AwsIamUser"
CHECK_ALTERNATE_check102="check12"
check12(){
# "Ensure multi-factor authentication (MFA) is enabled for all IAM users that have a console password (Scored)"
# List users with password enabled
COMMAND12_LIST_USERS_WITH_PASSWORD_ENABLED=$(cat $TEMP_REPORT_FILE|awk -F, '{ print $1,$4 }' |grep -F ' true$' | awk '{ print $1 }')
COMMAND12=$(
for i in $COMMAND12_LIST_USERS_WITH_PASSWORD_ENABLED; do
cat $TEMP_REPORT_FILE|awk -F, '{ print $1,$8 }' |grep "^$i " |grep false | awk '{ print $1 }'
done)
if [[ $COMMAND12 ]]; then
for u in $COMMAND12; do
textFail "User $u has Password enabled but MFA disabled"
done
else
textPass "No users found with Password enabled and MFA disabled"
fi
}

View File

@@ -1,39 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check120="1.20"
CHECK_TITLE_check120="[check120] Ensure a support role has been created to manage incidents with AWS Support (Scored)"
CHECK_SCORED_check120="SCORED"
CHECK_TYPE_check120="LEVEL1"
CHECK_ASFF_TYPE_check120="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check120="AwsIamRole"
CHECK_ALTERNATE_check120="check120"
check120(){
# "Ensure a support role has been created to manage incidents with AWS Support (Scored)"
SUPPORTPOLICYARN=$($AWSCLI iam list-policies --query "Policies[?PolicyName == 'AWSSupportAccess'].Arn" $PROFILE_OPT --region $REGION --output text)
if [[ $SUPPORTPOLICYARN ]];then
for policyarn in $SUPPORTPOLICYARN;do
POLICYROLES=$($AWSCLI iam list-entities-for-policy --policy-arn $SUPPORTPOLICYARN $PROFILE_OPT --region $REGION --output text | awk -F$'\t' '{ print $3 }')
if [[ $POLICYROLES ]];then
for name in $POLICYROLES; do
textPass "Support Policy attached to $name"
done
# for user in $(echo "$POLICYUSERS" | grep UserName | cut -d'"' -f4) ; do
# textInfo "User $user has support access via $policyarn"
# done
else
textFail "Support Policy not applied to any Role"
fi
done
else
textFail "No Support Policy found"
fi
}

View File

@@ -1,44 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check121="1.21"
CHECK_TITLE_check121="[check121] Do not setup access keys during initial user setup for all IAM users that have a console password (Not Scored)"
CHECK_SCORED_check121="NOT_SCORED"
CHECK_TYPE_check121="LEVEL1"
CHECK_ASFF_TYPE_check121="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check121="AwsIamUser"
CHECK_ALTERNATE_check121="check121"
check121(){
# "Do not setup access keys during initial user setup for all IAM users that have a console password (Not Scored)"
LIST_USERS=$($AWSCLI iam list-users --query 'Users[*].UserName' --output text $PROFILE_OPT --region $REGION)
# List of USERS with KEY1 last_used_date as N/A
LIST_USERS_KEY1_NA=$(for user in $LIST_USERS; do grep "^${user}," $TEMP_REPORT_FILE|awk -F, '{ print $1,$11 }'|grep N/A |awk '{ print $1 }'; done)
# List of USERS with KEY1 active, last_used_date as N/A and have a console password
LIST_USERS_KEY1_ACTIVE=$(for user in $LIST_USERS_KEY1_NA; do grep "^${user}," $TEMP_REPORT_FILE|awk -F, '{ print $1,$4,$9 }'|grep "true true$"|awk '{ print $1 }'|sed 's/[[:blank:]]+/,/g' ; done)
if [[ $LIST_USERS_KEY1_ACTIVE ]]; then
for user in $LIST_USERS_KEY1_ACTIVE; do
textFail "User $user has never used access key 1"
done
else
textPass "No users found with access key 1 never used"
fi
# List of USERS with KEY2 last_used_date as N/A
LIST_USERS_KEY2_NA=$(for user in $LIST_USERS; do grep "^${user}," $TEMP_REPORT_FILE|awk -F, '{ print $1,$16 }'|grep N/A |awk '{ print $1 }' ; done)
# List of USERS with KEY2 active, last_used_date as N/A and have a console password
LIST_USERS_KEY2_ACTIVE=$(for user in $LIST_USERS_KEY2_NA; do grep "^${user}," $TEMP_REPORT_FILE|awk -F, '{ print $1,$4,$14 }'|grep "true true$" |awk '{ print $1 }' ; done)
if [[ $LIST_USERS_KEY2_ACTIVE ]]; then
for user in $LIST_USERS_KEY2_ACTIVE; do
textFail "User $user has never used access key 2"
done
else
textPass "No users found with access key 2 never used"
fi
}

View File

@@ -1,43 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check122="1.22"
CHECK_TITLE_check122="[check122] Ensure IAM policies that allow full \"*:*\" administrative privileges are not created (Scored)"
CHECK_SCORED_check122="SCORED"
CHECK_TYPE_check122="LEVEL1"
CHECK_ASFF_TYPE_check122="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check122="AwsIamPolicy"
CHECK_ALTERNATE_check122="check122"
check122(){
# "Ensure IAM policies that allow full \"*:*\" administrative privileges are not created (Scored)"
LIST_CUSTOM_POLICIES=$($AWSCLI iam list-policies --output text $PROFILE_OPT --region $REGION --scope Local --query 'Policies[*].[Arn,DefaultVersionId]' | grep -v -e '^None$' | awk -F '\t' '{print $1","$2"\n"}')
if [[ $LIST_CUSTOM_POLICIES ]]; then
textInfo "Looking for custom policies: (skipping default policies - it may take few seconds...)"
for policy in $LIST_CUSTOM_POLICIES; do
POLICY_ARN=$(echo $policy | awk -F ',' '{print $1}')
POLICY_VERSION=$(echo $policy | awk -F ',' '{print $2}')
POLICY_WITH_FULL=$($AWSCLI iam get-policy-version --output text --policy-arn $POLICY_ARN --version-id $POLICY_VERSION --query "[PolicyVersion.Document.Statement] | [] | [?Action!=null] | [?Effect == 'Allow' && Resource == '*' && Action == '*']" $PROFILE_OPT --region $REGION)
if [[ $POLICY_WITH_FULL ]]; then
POLICIES_ALLOW_LIST="$POLICIES_ALLOW_LIST $POLICY_ARN"
fi
done
if [[ $POLICIES_ALLOW_LIST ]]; then
textInfo "List of custom policies: "
for policy in $POLICIES_ALLOW_LIST; do
textFail "Policy $policy allows \"*:*\""
done
else
textPass "No custom policy found that allow full \"*:*\" administrative privileges"
fi
else
textPass "No custom policies found"
fi
}

View File

@@ -1,21 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check13="1.3"
CHECK_TITLE_check13="[check13] Ensure credentials unused for 90 days or greater are disabled (Scored)"
CHECK_SCORED_check13="SCORED"
CHECK_TYPE_check13="LEVEL1"
CHECK_ASFF_TYPE_check13="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check13="AwsIamUser"
CHECK_ALTERNATE_check103="check13"
check13(){
check_creds_used_in_last_days 90
}

View File

@@ -1,61 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check14="1.4"
CHECK_TITLE_check14="[check14] Ensure access keys are rotated every 90 days or less (Scored)"
CHECK_SCORED_check14="SCORED"
CHECK_TYPE_check14="LEVEL1"
CHECK_ASFF_TYPE_check14="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check14="AwsIamUser"
CHECK_ALTERNATE_check104="check14"
check14(){
# "Ensure access keys are rotated every 90 days or less (Scored)" # also checked by Security Monkey
LIST_OF_USERS_WITH_ACCESS_KEY1=$(cat $TEMP_REPORT_FILE| awk -F, '{ print $1, $9 }' |grep "\ true" | awk '{ print $1 }')
LIST_OF_USERS_WITH_ACCESS_KEY2=$(cat $TEMP_REPORT_FILE| awk -F, '{ print $1, $14 }' |grep "\ true" | awk '{ print $1 }')
C14_NUM_USERS1=0
C14_NUM_USERS2=0
if [[ $LIST_OF_USERS_WITH_ACCESS_KEY1 ]]; then
# textFail "Users with access key 1 older than 90 days:"
for user in $LIST_OF_USERS_WITH_ACCESS_KEY1; do
# check access key 1
DATEROTATED1=$(cat $TEMP_REPORT_FILE | grep -v user_creation_time | grep "^${user},"| awk -F, '{ print $10 }' | grep -v "N/A" | awk -F"T" '{ print $1 }')
HOWOLDER=$(how_older_from_today $DATEROTATED1)
if [ $HOWOLDER -gt "90" ];then
textFail "$user has not rotated access key 1 in over 90 days"
C14_NUM_USERS1=$(expr $C14_NUM_USERS1 + 1)
fi
done
if [[ $C14_NUM_USERS1 -eq 0 ]]; then
textPass "No users with access key 1 older than 90 days"
fi
else
textPass "No users with access key 1"
fi
if [[ $LIST_OF_USERS_WITH_ACCESS_KEY2 ]]; then
# textFail "Users with access key 2 older than 90 days:"
for user in $LIST_OF_USERS_WITH_ACCESS_KEY2; do
# check access key 2
DATEROTATED2=$(cat $TEMP_REPORT_FILE | grep -v user_creation_time | grep "^${user},"| awk -F, '{ print $15 }' | grep -v "N/A" | awk -F"T" '{ print $1 }')
HOWOLDER=$(how_older_from_today $DATEROTATED2)
if [ $HOWOLDER -gt "90" ];then
textFail "$user has not rotated access key 2 in over 90 days"
C14_NUM_USERS2=$(expr $C14_NUM_USERS2 + 1)
fi
done
if [[ $C14_NUM_USERS2 -eq 0 ]]; then
textPass "No users with access key 2 older than 90 days"
fi
else
textPass "No users with access key 2"
fi
}

View File

@@ -1,26 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check15="1.5"
CHECK_TITLE_check15="[check15] Ensure IAM password policy requires at least one uppercase letter (Scored)"
CHECK_SCORED_check15="SCORED"
CHECK_TYPE_check15="LEVEL1"
CHECK_ASFF_TYPE_check15="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ALTERNATE_check105="check15"
check15(){
# "Ensure IAM password policy requires at least one uppercase letter (Scored)"
COMMAND15=$($AWSCLI iam get-account-password-policy $PROFILE_OPT --region $REGION --output json --query 'PasswordPolicy.RequireUppercaseCharacters' 2> /dev/null) # must be true
if [[ "$COMMAND15" == "true" ]];then
textPass "Password Policy requires upper case"
else
textFail "Password Policy missing upper-case requirement"
fi
}

View File

@@ -1,26 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check16="1.6"
CHECK_TITLE_check16="[check16] Ensure IAM password policy require at least one lowercase letter (Scored)"
CHECK_SCORED_check16="SCORED"
CHECK_TYPE_check16="LEVEL1"
CHECK_ASFF_TYPE_check16="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ALTERNATE_check106="check16"
check16(){
# "Ensure IAM password policy require at least one lowercase letter (Scored)"
COMMAND16=$($AWSCLI iam get-account-password-policy $PROFILE_OPT --region $REGION --output json --query 'PasswordPolicy.RequireLowercaseCharacters' 2> /dev/null) # must be true
if [[ "$COMMAND16" == "true" ]];then
textPass "Password Policy requires lower case"
else
textFail "Password Policy missing lower-case requirement"
fi
}

View File

@@ -1,26 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check17="1.7"
CHECK_TITLE_check17="[check17] Ensure IAM password policy require at least one symbol (Scored)"
CHECK_SCORED_check17="SCORED"
CHECK_TYPE_check17="LEVEL1"
CHECK_ASFF_TYPE_check17="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ALTERNATE_check107="check17"
check17(){
# "Ensure IAM password policy require at least one symbol (Scored)"
COMMAND17=$($AWSCLI iam get-account-password-policy $PROFILE_OPT --region $REGION --output json --query 'PasswordPolicy.RequireSymbols' 2> /dev/null) # must be true
if [[ "$COMMAND17" == "true" ]];then
textPass "Password Policy requires symbol"
else
textFail "Password Policy missing symbol requirement"
fi
}

View File

@@ -1,26 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check18="1.8"
CHECK_TITLE_check18="[check18] Ensure IAM password policy require at least one number (Scored)"
CHECK_SCORED_check18="SCORED"
CHECK_TYPE_check18="LEVEL1"
CHECK_ASFF_TYPE_check18="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ALTERNATE_check108="check18"
check18(){
# "Ensure IAM password policy require at least one number (Scored)"
COMMAND18=$($AWSCLI iam get-account-password-policy $PROFILE_OPT --region $REGION --output json --query 'PasswordPolicy.RequireNumbers' 2> /dev/null) # must be true
if [[ "$COMMAND18" == "true" ]];then
textPass "Password Policy requires number"
else
textFail "Password Policy missing number requirement"
fi
}

View File

@@ -1,26 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check19="1.9"
CHECK_TITLE_check19="[check19] Ensure IAM password policy requires minimum length of 14 or greater (Scored)"
CHECK_SCORED_check19="SCORED"
CHECK_TYPE_check19="LEVEL1"
CHECK_ASFF_TYPE_check19="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ALTERNATE_check109="check19"
check19(){
# "Ensure IAM password policy requires minimum length of 14 or greater (Scored)"
COMMAND19=$($AWSCLI iam get-account-password-policy $PROFILE_OPT --region $REGION --output json --query 'PasswordPolicy.MinimumPasswordLength' 2> /dev/null)
if [[ $COMMAND19 -gt "13" ]];then
textPass "Password Policy requires more than 13 characters"
else
textFail "Password Policy missing or weak length requirement"
fi
}

View File

@@ -1,45 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check21="2.1"
CHECK_TITLE_check21="[check21] Ensure CloudTrail is enabled in all regions (Scored)"
CHECK_SCORED_check21="SCORED"
CHECK_TYPE_check21="LEVEL1"
CHECK_ASFF_TYPE_check21="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check21="AwsCloudTrailTrail"
CHECK_ALTERNATE_check201="check21"
check21(){
trail_count=0
# "Ensure CloudTrail is enabled in all regions (Scored)"
for regx in $REGIONS; do
LIST_OF_TRAILS=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region $regx --query 'trailList[*].Name' --output text --no-include-shadow-trails)
if [[ $LIST_OF_TRAILS ]];then
for trail in $LIST_OF_TRAILS;do
trail_count=$((trail_count + 1))
MULTIREGION_TRAIL_STATUS=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region $regx --query 'trailList[*].IsMultiRegionTrail' --output text --trail-name-list $trail)
if [[ "$MULTIREGION_TRAIL_STATUS" == 'False' ]];then
textFail "$trail trail in $regx is not enabled in multi region mode"
else
textPass "$trail trail in $regx is enabled for all regions"
fi
done
fi
done
if [[ $trail_count == 0 ]]; then
ORG_TRAIL=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region us-east-1 | jq '.trailList[] | select(.IsMultiRegionTrail and .IsOrganizationTrail) | .Name' | sed 's/"//g')
if [[ $ORG_TRAIL != "" ]]; then
textPass "$ORG_TRAIL trail in $regx is enabled for all regions"
else
textFail "No CloudTrail trails were found in the account"
fi
fi
}

View File

@@ -1,35 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check22="2.2"
CHECK_TITLE_check22="[check22] Ensure CloudTrail log file validation is enabled (Scored)"
CHECK_SCORED_check22="SCORED"
CHECK_TYPE_check22="LEVEL2"
CHECK_ASFF_TYPE_check22="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check22="AwsCloudTrailTrail"
CHECK_ALTERNATE_check202="check22"
check22(){
# "Ensure CloudTrail log file validation is enabled (Scored)"
for regx in $REGIONS; do
LIST_OF_TRAILS=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region $regx --query 'trailList[*].Name' --output text --no-include-shadow-trails)
if [[ $LIST_OF_TRAILS ]];then
for trail in $LIST_OF_TRAILS;do
LOGFILEVALIDATION_TRAIL_STATUS=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region $regx --query 'trailList[*].LogFileValidationEnabled' --output text --trail-name-list $trail)
if [[ "$LOGFILEVALIDATION_TRAIL_STATUS" == 'False' ]];then
textFail "$trail trail in $regx has not log file validation enabled"
else
textPass "$trail trail in $regx has log file validation enabled"
fi
done
fi
done
}

View File

@@ -1,38 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check23="2.3"
CHECK_TITLE_check23="[check23] Ensure the S3 bucket CloudTrail logs to is not publicly accessible (Scored)"
CHECK_SCORED_check23="SCORED"
CHECK_TYPE_check23="LEVEL1"
CHECK_ASFF_TYPE_check23="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check23="AwsS3Bucket"
CHECK_ALTERNATE_check203="check23"
check23(){
# "Ensure the S3 bucket CloudTrail logs to is not publicly accessible (Scored)"
CLOUDTRAILBUCKET=$($AWSCLI cloudtrail describe-trails --query 'trailList[*].S3BucketName' --output text $PROFILE_OPT --region $REGION)
if [[ $CLOUDTRAILBUCKET ]]; then
for bucket in $CLOUDTRAILBUCKET;do
CLOUDTRAILBUCKET_HASALLPERMISIONS=$($AWSCLI s3api get-bucket-acl --bucket $bucket --query 'Grants[?Grantee.URI==`http://acs.amazonaws.com/groups/global/AllUsers`]' $PROFILE_OPT --region $REGION --output text 2>&1)
if [[ $(echo "$CLOUDTRAILBUCKET_HASALLPERMISIONS" | grep AccessDenied) ]]; then
textInfo "Access Denied Trying to Get Bucket Acl for $bucket"
continue
fi
if [[ $CLOUDTRAILBUCKET_HASALLPERMISIONS ]]; then
textFail "check your $bucket CloudTrail bucket ACL and Policy!"
else
textPass "Bucket $bucket is set correctly"
fi
done
else
textFail "No CloudTrail bucket found!"
fi
}

View File

@@ -1,42 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check24="2.4"
CHECK_TITLE_check24="[check24] Ensure CloudTrail trails are integrated with CloudWatch Logs (Scored)"
CHECK_SCORED_check24="SCORED"
CHECK_TYPE_check24="LEVEL1"
CHECK_ASFF_TYPE_check24="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check24="AwsCloudTrailTrail"
CHECK_ALTERNATE_check204="check24"
check24(){
# "Ensure CloudTrail trails are integrated with CloudWatch Logs (Scored)"
TRAILS_AND_REGIONS=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region $REGION --query 'trailList[*].{Name:Name, HomeRegion:HomeRegion}' --output text | tr " " ',')
if [[ $TRAILS_AND_REGIONS ]];then
for reg_trail in $TRAILS_AND_REGIONS;do
trail=$(echo $reg_trail | cut -d',' -f2)
TRAIL_REGION=$(echo $reg_trail | cut -d',' -f1)
LATESTDELIVERY_TIMESTAMP=$($AWSCLI cloudtrail get-trail-status --name $trail $PROFILE_OPT --region $TRAIL_REGION --query 'LatestCloudWatchLogsDeliveryTime' --output text|grep -v None)
if [[ ! $LATESTDELIVERY_TIMESTAMP ]];then
textFail "$trail trail is not logging in the last 24h or not configured (it is in $TRAIL_REGION)"
else
LATESTDELIVERY_DATE=$(timestamp_to_date $LATESTDELIVERY_TIMESTAMP)
HOWOLDER=$(how_older_from_today $LATESTDELIVERY_DATE)
if [ $HOWOLDER -gt "1" ];then
textFail "$trail trail is not logging in the last 24h or not configured (it is in $TRAIL_REGION)"
else
textPass "$trail trail has been logging during the last 24h (it is in $TRAIL_REGION)"
fi
fi
done
else
textFail "No CloudTrail trails found!"
fi
}

View File

@@ -1,28 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check25="2.5"
CHECK_TITLE_check25="[check25] Ensure AWS Config is enabled in all regions (Scored)"
CHECK_SCORED_check25="SCORED"
CHECK_TYPE_check25="LEVEL1"
CHECK_ASFF_TYPE_check25="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ALTERNATE_check205="check25"
check25(){
# "Ensure AWS Config is enabled in all regions (Scored)"
for regx in $REGIONS; do
CHECK_AWSCONFIG_STATUS=$($AWSCLI configservice get-status $PROFILE_OPT --region $regx --output json| grep "recorder: ON")
if [[ $CHECK_AWSCONFIG_STATUS ]];then
textPass "Region $regx has AWS Config recorder: ON" "$regx"
else
textFail "Region $regx has AWS Config disabled or not configured" "$regx"
fi
done
}

View File

@@ -1,53 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check26="2.6"
CHECK_TITLE_check26="[check26] Ensure S3 bucket access logging is enabled on the CloudTrail S3 bucket (Scored)"
CHECK_SCORED_check26="SCORED"
CHECK_TYPE_check26="LEVEL1"
CHECK_ASFF_TYPE_check26="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check26="AwsS3Bucket"
CHECK_ALTERNATE_check206="check26"
check26(){
# "Ensure S3 bucket access logging is enabled on the CloudTrail S3 bucket (Scored)"
CLOUDTRAILS=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region "$REGION" --query 'trailList[*].Name' --output text| tr '\011' '\012' | awk -F: '{print $1}')
if [[ $CLOUDTRAILS ]]; then
for trail in $CLOUDTRAILS; do
CLOUDTRAIL_ACCOUNT_ID=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region "$REGION" --query 'trailList[*].TrailARN' --output text | tr '\011' '\012' | grep "$trail" | awk -F: '{ print $5 }' | head -n 1)
CLOUDTRAILBUCKET=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region $REGION --query 'trailList[*].[Name, S3BucketName]' --output text | tr '\011' ':' | grep "$trail" | awk -F: '{ print $2 }' )
if [[ $CLOUDTRAILBUCKET ]]; then
bucket=$CLOUDTRAILBUCKET
if [ "$CLOUDTRAIL_ACCOUNT_ID" == "$ACCOUNT_NUM" ]; then
CLOUDTRAILBUCKET_LOGENABLED=$($AWSCLI s3api get-bucket-logging --bucket $bucket $PROFILE_OPT --region $REGION --query 'LoggingEnabled.TargetBucket' 2>&1)
if [[ $(echo "$CLOUDTRAILBUCKET_LOGENABLED" | grep AccessDenied) ]]; then
textInfo "Access Denied Trying to Get Bucket Logging for $bucket"
continue
fi
if [[ $CLOUDTRAILBUCKET_LOGENABLED != "null" ]]; then
textPass "Bucket access logging enabled in CloudTrail S3 bucket $bucket for $trail"
else
textFail "Bucket access logging is not enabled in CloudTrail S3 bucket $bucket for $trail"
fi
else
textInfo "CloudTrail S3 bucket $bucket for trail $trail is not in current account"
fi
else
textFail "CloudTrail bucket not found!"
fi
done
else
textFail "No CloudWatch group found and no CloudTrail bucket"
fi
}

View File

@@ -1,32 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check27="2.7"
CHECK_TITLE_check27="[check27] Ensure CloudTrail logs are encrypted at rest using KMS CMKs (Scored)"
CHECK_SCORED_check27="SCORED"
CHECK_TYPE_check27="LEVEL2"
CHECK_ASFF_TYPE_check27="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check27="AwsCloudTrailTrail"
CHECK_ALTERNATE_check207="check27"
check27(){
# "Ensure CloudTrail logs are encrypted at rest using KMS CMKs (Scored)"
$AWSCLI cloudtrail describe-trails --query 'trailList[].[Name,KmsKeyId]' --output text $PROFILE_OPT --region $REGION | while read trail key; do
if [[ "$trail" ]] ; then
if [[ "$key" != "None" ]] ; then
textPass "KMS key found for $trail"
else
textFail "Encryption is not enabled in your CloudTrail trail $trail (KMS key not found)!"
fi
else
textFail "CloudTrail bucket doesn't exist!"
fi
done
}

View File

@@ -1,49 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check28="2.8"
CHECK_TITLE_check28="[check28] Ensure rotation for customer created CMKs is enabled (Scored)"
CHECK_SCORED_check28="SCORED"
CHECK_TYPE_check28="LEVEL2"
CHECK_ASFF_TYPE_check28="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check28="AwsKmsKey"
CHECK_ALTERNATE_check208="check28"
check28(){
# "Ensure rotation for customer created CMKs is enabled (Scored)"
for regx in $REGIONS; do
CHECK_KMS_KEYLIST=$($AWSCLI kms list-keys $PROFILE_OPT --region $regx --output text --query 'Keys[*].KeyId')
if [[ $CHECK_KMS_KEYLIST ]];then
CHECK_KMS_KEYLIST_NO_DEFAULT=$(
for key in $CHECK_KMS_KEYLIST; do
$AWSCLI kms describe-key --key-id $key $PROFILE_OPT --region $regx --query 'KeyMetadata.{key:KeyId,state:KeyState,man:KeyManager}' --output text|grep Enabled$|grep -v AWS| awk '{ print $1 }'
done )
if [[ $CHECK_KMS_KEYLIST_NO_DEFAULT ]]; then
for key in $CHECK_KMS_KEYLIST_NO_DEFAULT; do
CHECK_KMS_KEY_TYPE=$($AWSCLI kms describe-key --key-id $key $PROFILE_OPT --region $regx --query 'KeyMetadata.Origin' | sed 's/["]//g')
if [[ "$CHECK_KMS_KEY_TYPE" == "EXTERNAL" ]];then
textPass "$regx: Key $key in Region $regx Customer Uploaded Key Material" "$regx"
else
CHECK_KMS_KEY_ROTATION=$($AWSCLI kms get-key-rotation-status --key-id $key $PROFILE_OPT --region $regx --output text)
if [[ "$CHECK_KMS_KEY_ROTATION" == "True" ]];then
textPass "$regx: Key $key is set correctly" "$regx"
else
textFail "$regx: Key $key is not set to rotate!" "$regx"
fi
fi
done
else
textInfo "$regx: This region doesn't have CUSTOM encryption keys" "$regx"
fi
else
textInfo "$regx: This region doesn't have ANY encryption keys" "$regx"
fi
done
}

View File

@@ -1,34 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check29="2.9"
CHECK_TITLE_check29="[check29] Ensure VPC Flow Logging is Enabled in all VPCs (Scored)"
CHECK_SCORED_check29="SCORED"
CHECK_TYPE_check29="LEVEL2"
CHECK_ASFF_TYPE_check29="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check29="AwsEc2Vpc"
CHECK_ALTERNATE_check209="check29"
check29(){
# "Ensure VPC Flow Logging is Enabled in all VPCs (Scored)"
for regx in $REGIONS; do
AVAILABLE_VPC=$($AWSCLI ec2 describe-vpcs $PROFILE_OPT --region $regx --query 'Vpcs[?State==`available`].VpcId' --output text)
for vpcx in $AVAILABLE_VPC; do
CHECK_FL=$($AWSCLI ec2 describe-flow-logs $PROFILE_OPT --region $regx --filter Name="resource-id",Values="${vpcx}" --query 'FlowLogs[?FlowLogStatus==`ACTIVE`].FlowLogId' --output text)
if [[ $CHECK_FL ]];then
for FL in $CHECK_FL;do
textPass "VPC $vpcx: VPCFlowLog is enabled for LogGroupName: $FL in Region $regx" "$regx"
done
else
textFail "VPC $vpcx: No VPCFlowLog has been found in Region $regx" "$regx"
fi
done
done
}

View File

@@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
#
# Remediation:
#
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
#
# aws logs put-metric-filter \
# --region us-east-1 \
# --log-group-name CloudTrail/MyCloudTrailLG \
# --filter-name AWSAuthorizationFailures \
# --filter-pattern '{ $.errorCode = "*UnauthorizedOperation" || $.errorCode = "AccessDenied*" }' \
# --metric-transformations metricName=AuthorizationFailureCount,metricNamespace=CloudTrailMetrics,metricValue=1
#
# aws cloudwatch put-metric-alarm \
# --region us-east-1 \
# --alarm-name "Authorization Failures" \
# --alarm-description "Alarm triggered when unauthorized API calls are made" \
# --metric-name AuthorizationFailureCount \
# --namespace CloudTrailMetrics \
# --statistic Sum \
# --comparison-operator GreaterThanOrEqualToThreshold \
# --evaluation-periods 1 \
# --period 300 \
# --threshold 1 \
# --actions-enabled \
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
CHECK_ID_check31="3.1"
CHECK_TITLE_check31="[check31] Ensure a log metric filter and alarm exist for unauthorized API calls (Scored)"
CHECK_SCORED_check31="SCORED"
CHECK_TYPE_check31="LEVEL1"
CHECK_ASFF_TYPE_check31="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check31="AwsCloudTrailTrail"
CHECK_ALTERNATE_check301="check31"
check31(){
check3x '\$\.errorCode\s*=\s*"\*UnauthorizedOperation".+\$\.errorCode\s*=\s*"AccessDenied\*"'
}

View File

@@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
#
# Remediation:
#
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
#
# aws logs put-metric-filter \
# --region us-east-1 \
# --log-group-name CloudTrail/CloudWatchLogGroup \
# --filter-name SecurityGroupConfigChanges \
# --filter-pattern '{ ($.eventName = AuthorizeSecurityGroupIngress) || ($.eventName = AuthorizeSecurityGroupEgress) || ($.eventName = RevokeSecurityGroupIngress) || ($.eventName = RevokeSecurityGroupEgress) || ($.eventName = CreateSecurityGroup) || ($.eventName = DeleteSecurityGroup) }' \
# --metric-transformations metricName=SecurityGroupEventCount,metricNamespace=CloudTrailMetrics,metricValue=1
#
# aws cloudwatch put-metric-alarm \
# --region us-east-1 \
# --alarm-name SecurityGroupConfigChangesAlarm \
# --alarm-description "Triggered by AWS security group(s) config changes." \
# --metric-name SecurityGroupEventCount \
# --namespace CloudTrailMetrics \
# --statistic Sum \
# --comparison-operator GreaterThanOrEqualToThreshold \
# --evaluation-periods 1 \
# --period 300 \
# --threshold 1 \
# --actions-enabled \
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
CHECK_ID_check310="3.10"
CHECK_TITLE_check310="[check310] Ensure a log metric filter and alarm exist for security group changes (Scored)"
CHECK_SCORED_check310="SCORED"
CHECK_TYPE_check310="LEVEL2"
CHECK_ASFF_TYPE_check310="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check310="AwsCloudTrailTrail"
CHECK_ALTERNATE_check310="check310"
check310(){
check3x '\$\.eventName\s*=\s*AuthorizeSecurityGroupIngress.+\$\.eventName\s*=\s*AuthorizeSecurityGroupEgress.+\$\.eventName\s*=\s*RevokeSecurityGroupIngress.+\$\.eventName\s*=\s*RevokeSecurityGroupEgress.+\$\.eventName\s*=\s*CreateSecurityGroup.+\$\.eventName\s*=\s*DeleteSecurityGroup'
}

View File

@@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
#
# Remediation:
#
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
#
# aws logs put-metric-filter \
# --region us-east-1 \
# --log-group-name CloudTrail/CloudWatchLogGroup \
# --filter-name NetworkACLConfigChanges \
# --filter-pattern '{ ($.eventName = CreateNetworkAcl) || ($.eventName = CreateNetworkAclEntry) || ($.eventName = DeleteNetworkAcl) || ($.eventName = DeleteNetworkAclEntry) || ($.eventName = ReplaceNetworkAclEntry) || ($.eventName = ReplaceNetworkAclAssociation) }' \
# --metric-transformations metricName=NetworkAclEventCount,metricNamespace=CloudTrailMetrics,metricValue=1
#
# aws cloudwatch put-metric-alarm \
# --region us-east-1 \
# --alarm-name NetworkACLConfigChangesAlarm \
# --alarm-description "Triggered by AWS Network ACL(s) config changes." \
# --metric-name NetworkAclEventCount \
# --namespace CloudTrailMetrics \
# --statistic Sum \
# --comparison-operator GreaterThanOrEqualToThreshold \
# --evaluation-periods 1 \
# --period 300 \
# --threshold 1 \
# --actions-enabled \
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
CHECK_ID_check311="3.11"
CHECK_TITLE_check311="[check311] Ensure a log metric filter and alarm exist for changes to Network Access Control Lists (NACL) (Scored)"
CHECK_SCORED_check311="SCORED"
CHECK_TYPE_check311="LEVEL2"
CHECK_ASFF_TYPE_check311="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check311="AwsCloudTrailTrail"
CHECK_ALTERNATE_check311="check311"
check311(){
check3x '\$\.eventName\s*=\s*CreateNetworkAcl.+\$\.eventName\s*=\s*CreateNetworkAclEntry.+\$\.eventName\s*=\s*DeleteNetworkAcl.+\$\.eventName\s*=\s*DeleteNetworkAclEntry.+\$\.eventName\s*=\s*ReplaceNetworkAclEntry.+\$\.eventName\s*=\s*ReplaceNetworkAclAssociation'
}

View File

@@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
#
# Remediation:
#
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
#
# aws logs put-metric-filter \
# --region us-east-1 \
# --log-group-name CloudTrail/CloudWatchLogGroup \
# --filter-name VPCGatewayConfigChanges \
# --filter-pattern '{ ($.eventName = CreateCustomerGateway) || ($.eventName = DeleteCustomerGateway) || ($.eventName = AttachInternetGateway) || ($.eventName = CreateInternetGateway) || ($.eventName = DeleteInternetGateway) || ($.eventName = DetachInternetGateway) }' \
# --metric-transformations metricName=GatewayEventCount,metricNamespace=CloudTrailMetrics,metricValue=1
#
# aws cloudwatch put-metric-alarm \
# --region us-east-1 \
# --alarm-name VPCGatewayConfigChangesAlarm \
# --alarm-description "Triggered by VPC Customer/Internet Gateway changes." \
# --metric-name GatewayEventCount \
# --namespace CloudTrailMetrics \
# --statistic Sum \
# --comparison-operator GreaterThanOrEqualToThreshold \
# --evaluation-periods 1 \
# --period 300 \
# --threshold 1 \
# --actions-enabled \
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
CHECK_ID_check312="3.12"
CHECK_TITLE_check312="[check312] Ensure a log metric filter and alarm exist for changes to network gateways (Scored)"
CHECK_SCORED_check312="SCORED"
CHECK_TYPE_check312="LEVEL1"
CHECK_ASFF_TYPE_check312="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check312="AwsCloudTrailTrail"
CHECK_ALTERNATE_check312="check312"
check312(){
check3x '\$\.eventName\s*=\s*CreateCustomerGateway.+\$\.eventName\s*=\s*DeleteCustomerGateway.+\$\.eventName\s*=\s*AttachInternetGateway.+\$\.eventName\s*=\s*CreateInternetGateway.+\$\.eventName\s*=\s*DeleteInternetGateway.+\$\.eventName\s*=\s*DetachInternetGateway'
}

View File

@@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
#
# Remediation:
#
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
#
# aws logs put-metric-filter \
# --region us-east-1 \
# --log-group-name CloudTrail/CloudWatchLogGroup \
# --filter-name RouteTableConfigChanges \
# --filter-pattern '{ ($.eventName = CreateRoute) || ($.eventName = CreateRouteTable) || ($.eventName = ReplaceRoute) || ($.eventName = ReplaceRouteTableAssociation) || ($.eventName = DeleteRouteTable) || ($.eventName = DeleteRoute) || ($.eventName = DisassociateRouteTable) }' \
# --metric-transformations metricName=RouteTableEventCount,metricNamespace=CloudTrailMetrics,metricValue=1
#
# aws cloudwatch put-metric-alarm \
# --region us-east-1 \
# --alarm-name RouteTableConfigChangesAlarm \
# --alarm-description "Triggered by AWS Route Table config changes." \
# --metric-name RouteTableEventCount \
# --namespace CloudTrailMetrics \
# --statistic Sum \
# --comparison-operator GreaterThanOrEqualToThreshold \
# --evaluation-periods 1 \
# --period 300 \
# --threshold 1 \
# --actions-enabled \
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
CHECK_ID_check313="3.13"
CHECK_TITLE_check313="[check313] Ensure a log metric filter and alarm exist for route table changes (Scored)"
CHECK_SCORED_check313="SCORED"
CHECK_TYPE_check313="LEVEL1"
CHECK_ASFF_TYPE_check313="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check313="AwsCloudTrailTrail"
CHECK_ALTERNATE_check313="check313"
check313(){
check3x '\$\.eventName\s*=\s*CreateRoute.+\$\.eventName\s*=\s*CreateRouteTable.+\$\.eventName\s*=\s*ReplaceRoute.+\$\.eventName\s*=\s*ReplaceRouteTableAssociation.+\$\.eventName\s*=\s*DeleteRouteTable.+\$\.eventName\s*=\s*DeleteRoute.+\$\.eventName\s*=\s*DisassociateRouteTable'
}

View File

@@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
#
# Remediation:
#
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
#
# aws logs put-metric-filter \
# --region us-east-1 \
# --log-group-name CloudTrail/CloudWatchLogGroup \
# --filter-name VPCNetworkConfigChanges \
# --filter-pattern '{ ($.eventName = CreateVpc) || ($.eventName = DeleteVpc) || ($.eventName = ModifyVpcAttribute) || ($.eventName = AcceptVpcPeeringConnection) || ($.eventName = CreateVpcPeeringConnection) || ($.eventName = DeleteVpcPeeringConnection) || ($.eventName = RejectVpcPeeringConnection) || ($.eventName = AttachClassicLinkVpc) || ($.eventName = DetachClassicLinkVpc) || ($.eventName = DisableVpcClassicLink) || ($.eventName = EnableVpcClassicLink) }' \
# --metric-transformations metricName=VpcEventCount,metricNamespace=CloudTrailMetrics,metricValue=1
#
# aws cloudwatch put-metric-alarm \
# --region us-east-1 \
# --alarm-name VPCNetworkConfigChangesAlarm \
# --alarm-description "Triggered by AWS VPC(s) environment config changes." \
# --metric-name VpcEventCount \
# --namespace CloudTrailMetrics \
# --statistic Sum \
# --comparison-operator GreaterThanOrEqualToThreshold \
# --evaluation-periods 1 \
# --period 300 \
# --threshold 1 \
# --actions-enabled \
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
CHECK_ID_check314="3.14"
CHECK_TITLE_check314="[check314] Ensure a log metric filter and alarm exist for VPC changes (Scored)"
CHECK_SCORED_check314="SCORED"
CHECK_TYPE_check314="LEVEL1"
CHECK_ASFF_TYPE_check314="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check314="AwsCloudTrailTrail"
CHECK_ALTERNATE_check314="check314"
check314(){
check3x '\$\.eventName\s*=\s*CreateVpc.+\$\.eventName\s*=\s*DeleteVpc.+\$\.eventName\s*=\s*ModifyVpcAttribute.+\$\.eventName\s*=\s*AcceptVpcPeeringConnection.+\$\.eventName\s*=\s*CreateVpcPeeringConnection.+\$\.eventName\s*=\s*DeleteVpcPeeringConnection.+\$\.eventName\s*=\s*RejectVpcPeeringConnection.+\$\.eventName\s*=\s*AttachClassicLinkVpc.+\$\.eventName\s*=\s*DetachClassicLinkVpc.+\$\.eventName\s*=\s*DisableVpcClassicLink.+\$\.eventName\s*=\s*EnableVpcClassicLink'
}

View File

@@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
#
# Remediation:
#
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
#
# aws logs put-metric-filter \
# --region us-east-1 \
# --log-group-name CloudTrail/CloudWatchLogGroup \
# --filter-name ConsoleSignInWithoutMfaCount \
# --filter-pattern '{ $.eventName = "ConsoleLogin" && $.additionalEventData.MFAUsed != "Yes" }' \
# --metric-transformations metricName=ConsoleSignInWithoutMfaCount,metricNamespace=CloudTrailMetrics,metricValue=1
#
# aws cloudwatch put-metric-alarm \
# --region us-east-1 \
# --alarm-name ConsoleSignInWithoutMfaAlarm \
# --alarm-description "Triggered by sign-in requests made without MFA." \
# --metric-name ConsoleSignInWithoutMfaCount \
# --namespace CloudTrailMetrics \
# --statistic Sum \
# --comparison-operator GreaterThanOrEqualToThreshold \
# --evaluation-periods 1 \
# --period 300 \
# --threshold 1 \
# --actions-enabled \
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
CHECK_ID_check32="3.2"
CHECK_TITLE_check32="[check32] Ensure a log metric filter and alarm exist for Management Console sign-in without MFA (Scored)"
CHECK_SCORED_check32="SCORED"
CHECK_TYPE_check32="LEVEL1"
CHECK_ASFF_TYPE_check32="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check32="AwsCloudTrailTrail"
CHECK_ALTERNATE_check302="check32"
check32(){
check3x '\$\.eventName\s*=\s*"ConsoleLogin".+\$\.additionalEventData\.MFAUsed\s*!=\s*"Yes"'
}

View File

@@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
#
# Remediation:
#
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
#
# aws logs put-metric-filter \
# --region us-east-1 \
# --log-group-name CloudTrail/CloudWatchLogGroup \
# --filter-name RootAccountUsage \
# --filter-pattern '{ $.userIdentity.type = "Root" && $.userIdentity.invokedBy NOT EXISTS && $.eventType != "AwsServiceEvent" }' \
# --metric-transformations metricName=RootAccountUsageEventCount,metricNamespace=CloudTrailMetrics,metricValue=1 \
#
# aws cloudwatch put-metric-alarm \
# --region us-east-1 \
# --alarm-name RootAccountUsageAlarm \
# --alarm-description "Triggered by AWS Root Account usage." \
# --metric-name RootAccountUsageEventCount \
# --namespace CloudTrailMetrics \
# --statistic \
# --comparison-operator GreaterThanOrEqualToThreshold \
# --evaluation-periods 1 \
# --period 300 \
# --threshold 1 \
# --actions-enabled \
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
CHECK_ID_check33="3.3"
CHECK_TITLE_check33="[check33] Ensure a log metric filter and alarm exist for usage of root account (Scored)"
CHECK_SCORED_check33="SCORED"
CHECK_TYPE_check33="LEVEL1"
CHECK_ASFF_TYPE_check33="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check33="AwsCloudTrailTrail"
CHECK_ALTERNATE_check303="check33"
check33(){
check3x '\$\.userIdentity\.type\s*=\s*"Root".+\$\.userIdentity\.invokedBy NOT EXISTS.+\$\.eventType\s*!=\s*"AwsServiceEvent"'
}

View File

@@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
#
# Remediation:
#
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
#
# aws logs put-metric-filter \
# --region us-east-1 \
# --log-group-name CloudTrail/CloudWatchLogGroup \
# --filter-name IAMAuthConfigChanges \
# --filter-pattern '{ ($.eventName = DeleteGroupPolicy) || ($.eventName = DeleteRolePolicy) || ($.eventName = DeleteUserPolicy) || ($.eventName = PutGroupPolicy) || ($.eventName = PutRolePolicy) || ($.eventName = PutUserPolicy) || ($.eventName = CreatePolicy) || ($.eventName = DeletePolicy) || ($.eventName = CreatePolicyVersion) || ($.eventName = DeletePolicyVersion) || ($.eventName = AttachRolePolicy) || ($.eventName = DetachRolePolicy) || ($.eventName = AttachUserPolicy) || ($.eventName = DetachUserPolicy) || ($.eventName = AttachGroupPolicy) || ($.eventName = DetachGroupPolicy) }' \
# --metric-transformations metricName=IAMPolicyEventCount,metricNamespace=CloudTrailMetrics,metricValue=1
#
# aws cloudwatch put-metric-alarm \
# --region us-east-1 \
# --alarm-name IAMAuthorizationActivityAlarm \
# --alarm-description "Triggered by AWS IAM authorization config changes." \
# --metric-name IAMPolicyEventCount \
# --namespace CloudTrailMetrics \
# --statistic Sum \
# --comparison-operator GreaterThanOrEqualToThreshold \
# --evaluation-periods 1 \
# --period 300 \
# --threshold 1 \
# --actions-enabled \
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
CHECK_ID_check34="3.4"
CHECK_TITLE_check34="[check34] Ensure a log metric filter and alarm exist for IAM policy changes (Scored)"
CHECK_SCORED_check34="SCORED"
CHECK_TYPE_check34="LEVEL1"
CHECK_ASFF_TYPE_check34="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check34="AwsCloudTrailTrail"
CHECK_ALTERNATE_check304="check34"
check34(){
check3x '\$\.eventName\s*=\s*DeleteGroupPolicy.+\$\.eventName\s*=\s*DeleteRolePolicy.+\$\.eventName\s*=\s*DeleteUserPolicy.+\$\.eventName\s*=\s*PutGroupPolicy.+\$\.eventName\s*=\s*PutRolePolicy.+\$\.eventName\s*=\s*PutUserPolicy.+\$\.eventName\s*=\s*CreatePolicy.+\$\.eventName\s*=\s*DeletePolicy.+\$\.eventName\s*=\s*CreatePolicyVersion.+\$\.eventName\s*=\s*DeletePolicyVersion.+\$\.eventName\s*=\s*AttachRolePolicy.+\$\.eventName\s*=\s*DetachRolePolicy.+\$\.eventName\s*=\s*AttachUserPolicy.+\$\.eventName\s*=\s*DetachUserPolicy.+\$\.eventName\s*=\s*AttachGroupPolicy.+\$\.eventName\s*=\s*DetachGroupPolicy'
}

View File

@@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
#
# Remediation:
#
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
#
# aws logs put-metric-filter \
# --region us-east-1 \
# --log-group-name CloudTrail/MyCloudTrailLG \
# --filter-name AWSCloudTrailChanges \
# --filter-pattern '{ ($.eventName = CreateTrail) || ($.eventName = UpdateTrail) || ($.eventName = DeleteTrail) || ($.eventName = StartLogging) || ($.eventName = StopLogging) }' \
# --metric-transformations metricName=CloudTrailEventCount,metricNamespace=CloudTrailMetrics,metricValue=1
#
# aws cloudwatch put-metric-alarm \
# --region us-east-1 \
# --alarm-name "CloudTrail Changes" \
# --alarm-description "Triggered by AWS CloudTrail configuration changes." \
# --metric-name CloudTrailEventCount \
# --namespace CloudTrailMetrics \
# --statistic Sum \
# --comparison-operator GreaterThanOrEqualToThreshold \
# --evaluation-periods 1 \
# --period 300 \
# --threshold 1 \
# --actions-enabled \
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
CHECK_ID_check35="3.5"
CHECK_TITLE_check35="[check35] Ensure a log metric filter and alarm exist for CloudTrail configuration changes (Scored)"
CHECK_SCORED_check35="SCORED"
CHECK_TYPE_check35="LEVEL1"
CHECK_ASFF_TYPE_check35="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check35="AwsCloudTrailTrail"
CHECK_ALTERNATE_check305="check35"
check35(){
check3x '\$\.eventName\s*=\s*CreateTrail.+\$\.eventName\s*=\s*UpdateTrail.+\$\.eventName\s*=\s*DeleteTrail.+\$\.eventName\s*=\s*StartLogging.+\$\.eventName\s*=\s*StopLogging'
}

View File

@@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
#
# Remediation:
#
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
#
# aws logs put-metric-filter \
# --region us-east-1 \
# --log-group-name CloudTrail/MyCloudTrailLG \
# --filter-name AWSConsoleSignInFailures \
# --filter-pattern '{ ($.eventName = ConsoleLogin) && ($.errorMessage = "Failed authentication") }' \
# --metric-transformations metricName=ConsoleSigninFailureCount,metricNamespace=CloudTrailMetrics,metricValue=1
#
# aws cloudwatch put-metric-alarm \
# --region us-east-1 \
# --alarm-name "Console Sign-in Failures" \
# --alarm-description "AWS Management Console Sign-in Failure Alarm." \
# --metric-name ConsoleSigninFailureCount \
# --namespace CloudTrailMetrics \
# --statistic Sum \
# --comparison-operator GreaterThanOrEqualToThreshold \
# --evaluation-periods 1 \
# --period 300 \
# --threshold 3 \
# --actions-enabled \
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
CHECK_ID_check36="3.6"
CHECK_TITLE_check36="[check36] Ensure a log metric filter and alarm exist for AWS Management Console authentication failures (Scored)"
CHECK_SCORED_check36="SCORED"
CHECK_TYPE_check36="LEVEL2"
CHECK_ASFF_TYPE_check36="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check36="AwsCloudTrailTrail"
CHECK_ALTERNATE_check306="check36"
check36(){
check3x '\$\.eventName\s*=\s*ConsoleLogin.+\$\.errorMessage\s*=\s*"Failed authentication"'
}

View File

@@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
#
# Remediation:
#
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
#
# aws logs put-metric-filter \
# --region us-east-1 \
# --log-group-name CloudTrail/CloudWatchLogGroup \
# --filter-name AWSCMKChanges \
# --filter-pattern '{ ($.eventSource = kms.amazonaws.com) && (($.eventName = DisableKey) || ($.eventName = ScheduleKeyDeletion)) }' \
# --metric-transformations metricName=CMKEventCount,metricNamespace=CloudTrailMetrics,metricValue=1
#
# aws cloudwatch put-metric-alarm \
# --region us-east-1 \
# --alarm-name AWSCMKChangesAlarm \
# --alarm-description "Triggered by AWS CMK changes." \
# --metric-name CMKEventCount \
# --namespace CloudTrailMetrics \
# --statistic Sum \
# --comparison-operator GreaterThanOrEqualToThreshold \
# --evaluation-periods 1 \
# --period 300 \
# --threshold 1 \
# --actions-enabled \
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
CHECK_ID_check37="3.7"
CHECK_TITLE_check37="[check37] Ensure a log metric filter and alarm exist for disabling or scheduled deletion of customer created CMKs (Scored)"
CHECK_SCORED_check37="SCORED"
CHECK_TYPE_check37="LEVEL2"
CHECK_ASFF_TYPE_check37="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check37="AwsCloudTrailTrail"
CHECK_ALTERNATE_check307="check37"
check37(){
check3x '\$\.eventSource\s*=\s*kms.amazonaws.com.+\$\.eventName\s*=\s*DisableKey.+\$\.eventName\s*=\s*ScheduleKeyDeletion'
}

View File

@@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
#
# Remediation:
#
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
#
# aws logs put-metric-filter \
# --region us-east-1 \
# --log-group-name CloudTrail/CloudWatchLogGroup \
# --filter-name S3BucketConfigChanges \
# --filter-pattern '{ ($.eventSource = s3.amazonaws.com) && (($.eventName = PutBucketAcl) || ($.eventName = PutBucketPolicy) || ($.eventName = PutBucketCors) || ($.eventName = PutBucketLifecycle) || ($.eventName = PutBucketReplication) || ($.eventName = DeleteBucketPolicy) || ($.eventName = DeleteBucketCors) || ($.eventName = DeleteBucketLifecycle) || ($.eventName = DeleteBucketReplication)) }' \
# --metric-transformations metricName=S3BucketEventCount,metricNamespace=CloudTrailMetrics,metricValue=1
#
# aws cloudwatch put-metric-alarm \
# --region us-east-1 \
# --alarm-name S3BucketConfigChangesAlarm \
# --alarm-description "Triggered by AWS S3 Bucket config changes." \
# --metric-name S3BucketEventCount \
# --namespace CloudTrailMetrics \
# --statistic Sum \
# --comparison-operator GreaterThanOrEqualToThreshold \
# --evaluation-periods 1 \
# --period 300 \
# --threshold 1 \
# --actions-enabled \
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
CHECK_ID_check38="3.8"
CHECK_TITLE_check38="[check38] Ensure a log metric filter and alarm exist for S3 bucket policy changes (Scored)"
CHECK_SCORED_check38="SCORED"
CHECK_TYPE_check38="LEVEL1"
CHECK_ASFF_TYPE_check38="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check38="AwsCloudTrailTrail"
CHECK_ALTERNATE_check308="check38"
check38(){
check3x '\$\.eventSource\s*=\s*s3.amazonaws.com.+\$\.eventName\s*=\s*PutBucketAcl.+\$\.eventName\s*=\s*PutBucketPolicy.+\$\.eventName\s*=\s*PutBucketCors.+\$\.eventName\s*=\s*PutBucketLifecycle.+\$\.eventName\s*=\s*PutBucketReplication.+\$\.eventName\s*=\s*DeleteBucketPolicy.+\$\.eventName\s*=\s*DeleteBucketCors.+\$\.eventName\s*=\s*DeleteBucketLifecycle.+\$\.eventName\s*=\s*DeleteBucketReplication'
}

View File

@@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
#
# Remediation:
#
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
#
# aws logs put-metric-filter \
# --region us-east-1 \
# --log-group-name CloudTrail/CloudWatchLogGroup \
# --filter-name AWSConfigChanges \
# --filter-pattern '{ ($.eventSource = config.amazonaws.com) && (($.eventName = StopConfigurationRecorder)||($.eventName = DeleteDeliveryChannel)||($.eventName = PutDeliveryChannel)||($.eventName = PutConfigurationRecorder)) }' \
# --metric-transformations metricName=ConfigEventCount,metricNamespace=CloudTrailMetrics,metricValue=1
#
# aws cloudwatch put-metric-alarm \
# --region us-east-1 \
# --alarm-name AWSConfigChangesAlarm \
# --alarm-description "Triggered by AWS Config changes." \
# --metric-name ConfigEventCount \
# --namespace CloudTrailMetrics \
# --statistic Sum \
# --comparison-operator GreaterThanOrEqualToThreshold \
# --evaluation-periods 1 \
# --period 300 \
# --threshold 1 \
# --actions-enabled \
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
CHECK_ID_check39="3.9"
CHECK_TITLE_check39="[check39] Ensure a log metric filter and alarm exist for AWS Config configuration changes (Scored)"
CHECK_SCORED_check39="SCORED"
CHECK_TYPE_check39="LEVEL2"
CHECK_ASFF_TYPE_check39="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check39="AwsCloudTrailTrail"
CHECK_ALTERNATE_check309="check39"
check39(){
check3x '\$\.eventSource\s*=\s*config.amazonaws.com.+\$\.eventName\s*=\s*StopConfigurationRecorder.+\$\.eventName\s*=\s*DeleteDeliveryChannel.+\$\.eventName\s*=\s*PutDeliveryChannel.+\$\.eventName\s*=\s*PutConfigurationRecorder'
}

View File

@@ -1,31 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check41="4.1"
CHECK_TITLE_check41="[check41] Ensure no security groups allow ingress from 0.0.0.0/0 or ::/0 to port 22 (Scored)"
CHECK_SCORED_check41="SCORED"
CHECK_TYPE_check41="LEVEL2"
CHECK_ASFF_TYPE_check41="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check41="AwsEc2SecurityGroup"
CHECK_ALTERNATE_check401="check41"
check41(){
# "Ensure no security groups allow ingress from 0.0.0.0/0 or ::/0 to port 22 (Scored)"
for regx in $REGIONS; do
SG_LIST=$($AWSCLI ec2 describe-security-groups --query 'SecurityGroups[?length(IpPermissions[?((FromPort==null && ToPort==null) || (FromPort<=`22` && ToPort>=`22`)) && (contains(IpRanges[].CidrIp, `0.0.0.0/0`) || contains(Ipv6Ranges[].CidrIpv6, `::/0`))]) > `0`].{GroupId:GroupId}' $PROFILE_OPT --region $regx --output text)
if [[ $SG_LIST ]];then
for SG in $SG_LIST;do
textFail "Found Security Group: $SG open to 0.0.0.0/0 in Region $regx" "$regx"
done
else
textPass "No Security Groups found in $regx with port 22 TCP open to 0.0.0.0/0" "$regx"
fi
done
}

View File

@@ -1,31 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check42="4.2"
CHECK_TITLE_check42="[check42] Ensure no security groups allow ingress from 0.0.0.0/0 or ::/0 to port 3389 (Scored)"
CHECK_SCORED_check42="SCORED"
CHECK_TYPE_check42="LEVEL2"
CHECK_ASFF_TYPE_check42="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check42="AwsEc2SecurityGroup"
CHECK_ALTERNATE_check402="check42"
check42(){
# "Ensure no security groups allow ingress from 0.0.0.0/0 or ::/0 to port 3389 (Scored)"
for regx in $REGIONS; do
SG_LIST=$($AWSCLI ec2 describe-security-groups --query 'SecurityGroups[?length(IpPermissions[?((FromPort==null && ToPort==null) || (FromPort<=`3389` && ToPort>=`3389`)) && (contains(IpRanges[].CidrIp, `0.0.0.0/0`) || contains(Ipv6Ranges[].CidrIpv6, `::/0`))]) > `0`].{GroupId:GroupId}' $PROFILE_OPT --region $regx --output text)
if [[ $SG_LIST ]];then
for SG in $SG_LIST;do
textFail "Found Security Group: $SG open to 0.0.0.0/0 in Region $regx" "$regx"
done
else
textPass "No Security Groups found in $regx with port 3389 TCP open to 0.0.0.0/0" "$regx"
fi
done
}

View File

@@ -1,32 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check43="4.3"
CHECK_TITLE_check43="[check43] Ensure the default security group of every VPC restricts all traffic (Scored)"
CHECK_SCORED_check43="SCORED"
CHECK_TYPE_check43="LEVEL2"
CHECK_ASFF_TYPE_check43="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check43="AwsEc2SecurityGroup"
CHECK_ALTERNATE_check403="check43"
check43(){
# "Ensure the default security group of every VPC restricts all traffic (Scored)"
for regx in $REGIONS; do
CHECK_SGDEFAULT_IDS=$($AWSCLI ec2 describe-security-groups $PROFILE_OPT --region $regx --filters Name=group-name,Values='default' --query 'SecurityGroups[*].GroupId[]' --output text)
for CHECK_SGDEFAULT_ID in $CHECK_SGDEFAULT_IDS; do
CHECK_SGDEFAULT_ID_OPEN=$($AWSCLI ec2 describe-security-groups $PROFILE_OPT --region $regx --group-ids $CHECK_SGDEFAULT_ID --query 'SecurityGroups[*].{IpPermissions:IpPermissions,IpPermissionsEgress:IpPermissionsEgress,GroupId:GroupId}' --output text |egrep '0.0.0.0|\:\:\/0')
if [[ $CHECK_SGDEFAULT_ID_OPEN ]];then
textFail "Default Security Groups ($CHECK_SGDEFAULT_ID) found that allow 0.0.0.0 IN or OUT traffic in Region $regx" "$regx"
else
textPass "No Default Security Groups ($CHECK_SGDEFAULT_ID) open to 0.0.0.0 found in Region $regx" "$regx"
fi
done
done
}

View File

@@ -1,36 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
#
# This Prowler check is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
CHECK_ID_check44="4.4"
CHECK_TITLE_check44="[check44] Ensure routing tables for VPC peering are \"least access\" (Not Scored)"
CHECK_SCORED_check44="NOT_SCORED"
CHECK_TYPE_check44="LEVEL2"
CHECK_ASFF_TYPE_check44="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
CHECK_ASFF_RESOURCE_TYPE_check44="AwsEc2Vpc"
CHECK_ALTERNATE_check404="check44"
check44(){
# "Ensure routing tables for VPC peering are \"least access\" (Not Scored)"
textInfo "Looking for VPC peering in all regions... "
for regx in $REGIONS; do
LIST_OF_VPCS_PEERING_CONNECTIONS=$($AWSCLI ec2 describe-vpc-peering-connections --output text $PROFILE_OPT --region $regx --query 'VpcPeeringConnections[*].VpcPeeringConnectionId'| sort | paste -s -d" " -)
if [[ $LIST_OF_VPCS_PEERING_CONNECTIONS ]];then
textInfo "$regx: $LIST_OF_VPCS_PEERING_CONNECTIONS - review routing tables" "$regx"
#LIST_OF_VPCS=$($AWSCLI ec2 describe-vpcs $PROFILE_OPT --region $regx --query 'Vpcs[*].VpcId' --output text)
#aws ec2 describe-route-tables --filter "Name=vpc-id,Values=vpc-0213e864" --query "RouteTables[*].{RouteTableId:RouteTableId, VpcId:VpcId, Routes:Routes, AssociatedSubnets:Associations[*].SubnetId}" $PROFILE_OPT --region $regx
# for vpc in $LIST_OF_VPCS; do
# VPCS_WITH_PEERING=$($AWSCLI ec2 describe-route-tables --filter "Name=vpc-id,Values=$vpc" $PROFILE_OPT --region $regx --query "RouteTables[*].{RouteTableId:RouteTableId, VpcId:VpcId, Routes:Routes, AssociatedSubnets:Associations[*].SubnetId}" |grep GatewayId|grep pcx-)
# done
#echo $VPCS_WITH_PEERING
else
textPass "$regx: No VPC peering found" "$regx"
fi
done
}

View File

@@ -1,49 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra71="7.1"
CHECK_TITLE_extra71="[extra71] Ensure users of groups with AdministratorAccess policy have MFA tokens enabled (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra71="NOT_SCORED"
CHECK_TYPE_extra71="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra71="AwsIamUser"
CHECK_ALTERNATE_extra701="extra71"
CHECK_ALTERNATE_check71="extra71"
CHECK_ALTERNATE_check701="extra71"
extra71(){
# "Ensure users of groups with AdministratorAccess policy have MFA tokens enabled (Not Scored) (Not part of CIS benchmark)"
ADMIN_GROUPS=''
AWS_GROUPS=$($AWSCLI $PROFILE_OPT iam list-groups --output text --region $REGION --query 'Groups[].GroupName')
for grp in $AWS_GROUPS; do
# aws --profile onlinetraining iam list-attached-group-policies --group-name Administrators --query 'AttachedPolicies[].PolicyArn' | grep 'arn:aws:iam::aws:policy/AdministratorAccess'
# list-attached-group-policies
CHECK_ADMIN_GROUP=$($AWSCLI $PROFILE_OPT --region $REGION iam list-attached-group-policies --group-name $grp --output json --query 'AttachedPolicies[].PolicyArn' | grep 'arn:${AWS_PARTITION}:iam::aws:policy/AdministratorAccess')
if [[ $CHECK_ADMIN_GROUP ]]; then
ADMIN_GROUPS="$ADMIN_GROUPS $grp"
textInfo "$grp group provides administrative access"
ADMIN_USERS=$($AWSCLI $PROFILE_OPT iam get-group --region $REGION --group-name $grp --output json --query 'Users[].UserName' | grep '"' | cut -d'"' -f2 )
for auser in $ADMIN_USERS; do
# users in group are Administrators
# users
# check for user MFA device in credential report
USER_MFA_ENABLED=$( cat $TEMP_REPORT_FILE | grep "^$auser," | cut -d',' -f8)
if [[ "true" == $USER_MFA_ENABLED ]]; then
textPass "$auser / MFA Enabled / admin via group $grp"
else
textFail "$auser / MFA DISABLED / admin via group $grp"
fi
done
else
textInfo "$grp group provides non-administrative access"
fi
done
}

View File

@@ -1,35 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra710="7.10"
CHECK_TITLE_extra710="[extra710] Check for internet facing EC2 Instances (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra710="NOT_SCORED"
CHECK_TYPE_extra710="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra710="AwsEc2Instance"
CHECK_ALTERNATE_check710="extra710"
extra710(){
# "Check for internet facing EC2 Instances (Not Scored) (Not part of CIS benchmark)"
textInfo "Looking for instances in all regions... "
for regx in $REGIONS; do
LIST_OF_PUBLIC_INSTANCES=$($AWSCLI ec2 describe-instances $PROFILE_OPT --region $regx --query 'Reservations[*].Instances[?PublicIpAddress].[InstanceId,PublicIpAddress]' --output text)
if [[ $LIST_OF_PUBLIC_INSTANCES ]];then
while read -r instance;do
INSTANCE_ID=$(echo $instance | awk '{ print $1; }')
PUBLIC_IP=$(echo $instance | awk '{ print $2; }')
textFail "$regx: Instance: $INSTANCE_ID at IP: $PUBLIC_IP is internet-facing!" "$regx"
done <<< "$LIST_OF_PUBLIC_INSTANCES"
else
textPass "$regx: no Internet Facing EC2 Instances found" "$regx"
fi
done
}

View File

@@ -1,35 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra711="7.11"
CHECK_TITLE_extra711="[extra711] Check for Publicly Accessible Redshift Clusters (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra711="NOT_SCORED"
CHECK_TYPE_extra711="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra711="AwsRedshiftCluster"
CHECK_ALTERNATE_check711="extra711"
extra711(){
# "Check for Publicly Accessible Redshift Clusters (Not Scored) (Not part of CIS benchmark)"
textInfo "Looking for Redshift clusters in all regions... "
for regx in $REGIONS; do
LIST_OF_PUBLIC_REDSHIFT_CLUSTERS=$($AWSCLI redshift describe-clusters $PROFILE_OPT --region $regx --query 'Clusters[?PubliclyAccessible == `true`].[ClusterIdentifier,Endpoint.Address]' --output text)
if [[ $LIST_OF_PUBLIC_REDSHIFT_CLUSTERS ]];then
while read -r cluster;do
CLUSTER_ID=$(echo $cluster | awk '{ print $1; }')
CLUSTER_ENDPOINT=$(echo $cluster | awk '{ print $2; }')
textFail "$regx: Cluster: $CLUSTER_ID at Endpoint: $CLUSTER_ENDPOINT is publicly accessible!" "$regx"
done <<< "$LIST_OF_PUBLIC_REDSHIFT_CLUSTERS"
else
textPass "$regx: no Publicly Accessible Redshift Clusters found" "$regx"
fi
done
}

View File

@@ -1,28 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra712="7.12"
CHECK_TITLE_extra712="[extra712] Check if Amazon Macie is enabled (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra712="NOT_SCORED"
CHECK_TYPE_extra712="EXTRA"
CHECK_ALTERNATE_check712="extra712"
extra712(){
textInfo "No API commands available to check if Macie is enabled,"
textInfo "just looking if IAM Macie related permissions exist. "
MACIE_IAM_ROLES_CREATED=$($AWSCLI iam list-roles $PROFILE_OPT --query 'Roles[*].Arn'|grep AWSMacieServiceCustomer|wc -l)
if [[ $MACIE_IAM_ROLES_CREATED -eq 2 ]];then
textPass "Macie related IAM roles exist so it might be enabled. Check it out manually"
else
textFail "No Macie related IAM roles found. It is most likely not to be enabled"
fi
}

View File

@@ -1,42 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra713="7.13"
CHECK_TITLE_extra713="[extra713] Check if GuardDuty is enabled (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra713="NOT_SCORED"
CHECK_TYPE_extra713="EXTRA"
CHECK_ALTERNATE_check713="extra713"
extra713(){
# "Check if GuardDuty is enabled (Not Scored) (Not part of CIS benchmark)"
for regx in $REGIONS; do
LIST_OF_GUARDDUTY_DETECTORS=$($AWSCLI guardduty list-detectors $PROFILE_OPT --region $regx --output text --query DetectorIds[*] 2> /dev/null)
RESULT=$?
if [ $RESULT -eq 0 ];then
if [[ $LIST_OF_GUARDDUTY_DETECTORS ]];then
while read -r detector;do
DETECTOR_ENABLED=$($AWSCLI guardduty get-detector --detector-id $detector $PROFILE_OPT --region $regx --query "Status" --output text|grep ENABLED)
if [[ $DETECTOR_ENABLED ]]; then
textPass "$regx: GuardDuty detector $detector enabled" "$regx"
else
textFail "$regx: GuardDuty detector $detector configured but suspended" "$regx"
fi
done <<< "$LIST_OF_GUARDDUTY_DETECTORS"
else
textFail "$regx: GuardDuty detector not configured!" "$regx"
fi
else
# if list-detectors return any error
textInfo "$regx: GuardDuty not checked" "$regx"
fi
done
}

View File

@@ -1,35 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra714="7.14"
CHECK_TITLE_extra714="[extra714] Check if CloudFront distributions have logging enabled (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra714="NOT_SCORED"
CHECK_TYPE_extra714="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra714="AwsCloudFrontDistribution"
CHECK_ALTERNATE_check714="extra714"
extra714(){
# "Check if CloudFront distributions have logging enabled (Not Scored) (Not part of CIS benchmark)"
LIST_OF_DISTRIBUTIONS=$($AWSCLI cloudfront list-distributions $PROFILE_OPT --query 'DistributionList.Items[].Id' --output text | grep -v "^None")
if [[ $LIST_OF_DISTRIBUTIONS ]]; then
for dist in $LIST_OF_DISTRIBUTIONS; do
LOG_ENABLED=$($AWSCLI cloudfront get-distribution $PROFILE_OPT --id "$dist" --query 'Distribution.DistributionConfig.Logging.Enabled' | grep true)
if [[ $LOG_ENABLED ]]; then
textPass "CloudFront distribution $dist has logging enabled"
else
textFail "CloudFront distribution $dist has logging disabled"
fi
done
else
textInfo "No CloudFront distributions found"
fi
}

View File

@@ -1,42 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra715="7.15"
CHECK_TITLE_extra715="[extra715] Check if Amazon Elasticsearch Service (ES) domains have logging enabled"
CHECK_SCORED_extra715="NOT_SCORED"
CHECK_TYPE_extra715="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra715="AwsElasticsearchDomain"
CHECK_ALTERNATE_check715="extra715"
extra715(){
for regx in $REGIONS; do
LIST_OF_DOMAINS=$($AWSCLI es list-domain-names $PROFILE_OPT --region $regx --query DomainNames --output text)
if [[ $LIST_OF_DOMAINS ]]; then
for domain in $LIST_OF_DOMAINS;do
SEARCH_SLOWLOG_ENABLED=$($AWSCLI es describe-elasticsearch-domain-config --domain-name $domain $PROFILE_OPT --region $regx --query DomainConfig.LogPublishingOptions.Options.SEARCH_SLOW_LOGS.Enabled --output text |grep -v ^None|grep -v ^False)
if [[ $SEARCH_SLOWLOG_ENABLED ]];then
textPass "$regx: Amazon ES domain $domain SEARCH_SLOW_LOGS enabled" "$regx"
else
textFail "$regx: Amazon ES domain $domain SEARCH_SLOW_LOGS disabled!" "$regx"
fi
INDEX_SLOWLOG_ENABLED=$($AWSCLI es describe-elasticsearch-domain-config --domain-name $domain $PROFILE_OPT --region $regx --query DomainConfig.LogPublishingOptions.Options.INDEX_SLOW_LOGS.Enabled --output text |grep -v ^None|grep -v ^False)
if [[ $INDEX_SLOWLOG_ENABLED ]];then
textPass "$regx: Amazon ES domain $domain INDEX_SLOW_LOGS enabled" "$regx"
else
textFail "$regx: Amazon ES domain $domain INDEX_SLOW_LOGS disabled!" "$regx"
fi
done
else
textInfo "$regx: No Amazon ES domain found" "$regx"
fi
done
}

View File

@@ -1,89 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra716="7.16"
CHECK_TITLE_extra716="[extra716] Check if Amazon Elasticsearch Service (ES) domains are set as Public or if it has open policy access"
CHECK_SCORED_extra716="NOT_SCORED"
CHECK_TYPE_extra716="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra716="AwsElasticsearchDomain"
CHECK_ALTERNATE_check716="extra716"
extra716(){
for regx in $REGIONS; do
LIST_OF_DOMAINS=$($AWSCLI es list-domain-names $PROFILE_OPT --region $regx --query DomainNames --output text)
if [[ $LIST_OF_DOMAINS ]]; then
for domain in $LIST_OF_DOMAINS;do
TEMP_POLICY_FILE=$(mktemp -t prowler-${ACCOUNT_NUM}-es-domain.policy.XXXXXXXXXX)
# get endpoint or vpc endpoints
ES_DOMAIN_ENDPOINT=$($AWSCLI es describe-elasticsearch-domain --domain-name $domain $PROFILE_OPT --region $regx --query 'DomainStatus.[Endpoint || Endpoints]' --output text)
# If the endpoint starts with "vpc-" it is in a VPC then it is fine.
if [[ "$ES_DOMAIN_ENDPOINT" =~ ^vpc-* ]];then
ES_DOMAIN_VPC=$($AWSCLI es describe-elasticsearch-domain --domain-name $domain $PROFILE_OPT --region $regx --query 'DomainStatus.VPCOptions.VPCId' --output text)
textInfo "$regx: Amazon ES domain $domain is in VPC $ES_DOMAIN_VPC run extra779 to make sure it is not exposed using custom proxy" "$regx"
else
$AWSCLI es describe-elasticsearch-domain-config --domain-name $domain $PROFILE_OPT --region $regx --query DomainConfig.AccessPolicies.Options --output text > $TEMP_POLICY_FILE 2> /dev/null
# check if the policy has a principal set up
CHECK_ES_POLICY_PRINCIPAL=$(cat $TEMP_POLICY_FILE | jq -r '. | .Statement[] | select(.Effect == "Allow" and (((.Principal|type == "object") and .Principal.AWS != "*") or ((.Principal|type == "string") and .Principal != "*")) and select(has("Condition") | not))')
if [[ $CHECK_ES_POLICY_PRINCIPAL ]]; then
textPass "$regx: Amazon ES domain $domain does have a Principal set up" "$regx"
fi
CHECK_ES_DOMAIN_POLICY_OPEN=$(cat $TEMP_POLICY_FILE | jq -r '. | .Statement[] | select(.Effect == "Allow" and (((.Principal|type == "object") and .Principal.AWS == "*") or ((.Principal|type == "string") and .Principal == "*")) and select(has("Condition") | not))')
CHECK_ES_DOMAIN_POLICY_HAS_CONDITION=$(cat $TEMP_POLICY_FILE | jq -r '. | .Statement[] | select(.Effect == "Allow" and (((.Principal|type == "object") and .Principal.AWS == "*") or ((.Principal|type == "string") and .Principal == "*")) and select(has("Condition")))' )
if [[ $CHECK_ES_DOMAIN_POLICY_HAS_CONDITION ]]; then
# get content of IpAddress."aws:SourceIp" and get a clean list
LIST_CONDITION_IPS=$(cat $TEMP_POLICY_FILE | jq '.Statement[0] .Condition.IpAddress."aws:SourceIp"'| awk -F'"' '{print $2}' | tr -d '",^$' | sed '/^$/d')
unset CONDITION_HAS_PUBLIC_IP_ARRAY
for condition_ip in "${LIST_CONDITION_IPS}";do
CONDITION_HAS_PRIVATE_IP=$(echo "${condition_ip}" | grep -E '^(192\.168|10\.|172\.1[6789]\.|172\.2[0-9]\.|172\.3[01]\.)')
if [[ $CONDITION_HAS_PRIVATE_IP ]];then
CONDITION_HAS_PRIVATE_IP_ARRAY+=($condition_ip)
fi
CONDITION_HAS_PUBLIC_IP=$(echo "${condition_ip}" | grep -vE '^(192\.168|10\.|172\.1[6789]\.|172\.2[0-9]\.|172\.3[01]\.|0\.0\.0\.0|\*)')
if [[ $CONDITION_HAS_PUBLIC_IP ]];then
CONDITION_HAS_PUBLIC_IP_ARRAY+=($condition_ip)
fi
CONDITION_HAS_ZERO_NET=$(echo "${condition_ip}" | grep -E '^(0\.0\.0\.0)')
CONDITION_HAS_STAR=$(echo "${condition_ip}" | grep -E '^\*')
done
CHECK_ES_DOMAIN_POLICY_CONDITION_PRIVATE_IP=${CONDITION_HAS_PRIVATE_IP_ARRAY[@]}
CHECK_ES_DOMAIN_POLICY_CONDITION_PUBLIC_IP=${CONDITION_HAS_PUBLIC_IP_ARRAY[@]}
CHECK_ES_DOMAIN_POLICY_CONDITION_ZERO=$CONDITION_HAS_ZERO_NET
CHECK_ES_DOMAIN_POLICY_CONDITION_STAR=$CONDITION_HAS_STAR
fi
if [[ $CHECK_ES_DOMAIN_POLICY_OPEN || $CHECK_ES_DOMAIN_POLICY_CONDITION_ZERO || $CHECK_ES_DOMAIN_POLICY_CONDITION_STAR || ${CHECK_ES_DOMAIN_POLICY_CONDITION_PUBLIC_IP[@]} ]];then
if [[ $CHECK_ES_DOMAIN_POLICY_OPEN ]];then
textFail "$regx: Amazon ES domain $domain policy allows access (Principal: \"*\") - use extra788 to test AUTH" "$regx"
fi
if [[ $CHECK_ES_DOMAIN_POLICY_HAS_CONDITION && $CHECK_ES_DOMAIN_POLICY_CONDITION_ZERO ]];then
textFail "$regx: Amazon ES domain $domain policy allows access (Principal: \"*\" and network 0.0.0.0) - use extra788 to test AUTH" "$regx"
fi
if [[ $CHECK_ES_DOMAIN_POLICY_HAS_CONDITION && $CHECK_ES_DOMAIN_POLICY_CONDITION_STAR ]];then
textFail "$regx: Amazon ES domain $domain policy allows access (Principal: \"*\" and network \"*\") - use extra788 to test AUTH" "$regx"
fi
if [[ $CHECK_ES_DOMAIN_POLICY_HAS_CONDITION && ${CHECK_ES_DOMAIN_POLICY_CONDITION_PUBLIC_IP[@]} ]];then
textInfo "$regx: Amazon ES domain $domain policy allows access (Principal: \"*\" and Public IP or Network $(echo ${CONDITION_HAS_PUBLIC_IP_ARRAY[@]})) - use extra788 to test AUTH" "$regx"
fi
else
if [[ $CHECK_ES_DOMAIN_POLICY_HAS_CONDITION && ${CHECK_ES_DOMAIN_POLICY_CONDITION_PRIVATE_IP[@]} ]];then
textInfo "$regx: Amazon ES domain $domain policy allows access from a Private IP or CIDR RFC1918 $(echo ${CONDITION_HAS_PRIVATE_IP_ARRAY[@]})" "$regx"
else
textPass "$regx: Amazon ES domain $domain does not allow anonymous access" "$regx"
fi
fi
rm -f $TEMP_POLICY_FILE
fi
done
else
textInfo "$regx: No Amazon ES domain found" "$regx"
fi
done
}

View File

@@ -1,51 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra717="7.17"
CHECK_TITLE_extra717="[extra717] Check if Elastic Load Balancers have logging enabled (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra717="NOT_SCORED"
CHECK_TYPE_extra717="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra717="AwsElbLoadBalancer"
CHECK_ALTERNATE_check717="extra717"
extra717(){
# "Check if Elastic Load Balancers have logging enabled (Not Scored) (Not part of CIS benchmark)"
for regx in $REGIONS; do
LIST_OF_ELBS=$($AWSCLI elb describe-load-balancers $PROFILE_OPT --region $regx --query 'LoadBalancerDescriptions[*].LoadBalancerName' --output text|xargs -n1)
LIST_OF_ELBSV2=$($AWSCLI elbv2 describe-load-balancers $PROFILE_OPT --region $regx --query 'LoadBalancers[*].LoadBalancerArn' --output text|xargs -n1)
if [[ $LIST_OF_ELBS || $LIST_OF_ELBSV2 ]]; then
if [[ $LIST_OF_ELBS ]]; then
for elb in $LIST_OF_ELBS; do
CHECK_ELBS_LOG_ENABLED=$($AWSCLI elb describe-load-balancer-attributes $PROFILE_OPT --region $regx --load-balancer-name $elb --query 'LoadBalancerAttributes.AccessLog.Enabled'|grep "^true")
if [[ $CHECK_ELBS_LOG_ENABLED ]]; then
textPass "$regx: $elb has access logs to S3 configured" "$regx"
else
textFail "$regx: $elb has not configured access logs" "$regx"
fi
done
fi
if [[ $LIST_OF_ELBSV2 ]]; then
for elbarn in $LIST_OF_ELBSV2; do
CHECK_ELBSV2_LOG_ENABLED=$($AWSCLI elbv2 describe-load-balancer-attributes $PROFILE_OPT --region $regx --load-balancer-arn $elbarn --query Attributes[*] --output text|grep "^access_logs.s3.enabled"|cut -f2|grep true)
ELBV2_NAME=$(echo $elbarn|cut -d\/ -f3)
if [[ $CHECK_ELBSV2_LOG_ENABLED ]]; then
textPass "$regx: $ELBV2_NAME has access logs to S3 configured" "$regx"
else
textFail "$regx: $ELBV2_NAME has not configured access logs" "$regx"
fi
done
fi
else
textInfo "$regx: No ELBs found" "$regx"
fi
done
}

View File

@@ -1,39 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra718="7.18"
CHECK_TITLE_extra718="[extra718] Check if S3 buckets have server access logging enabled (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra718="NOT_SCORED"
CHECK_TYPE_extra718="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra718="AwsS3Bucket"
CHECK_ALTERNATE_check718="extra718"
extra718(){
# "Check if S3 buckets have server access logging enabled (Not Scored) (Not part of CIS benchmark)"
LIST_OF_BUCKETS=$($AWSCLI s3api list-buckets $PROFILE_OPT --query Buckets[*].Name --output text|xargs -n1)
if [[ $LIST_OF_BUCKETS ]]; then
for bucket in $LIST_OF_BUCKETS;do
BUCKET_SERVER_LOG_ENABLED=$($AWSCLI s3api get-bucket-logging --bucket $bucket $PROFILE_OPT --query [LoggingEnabled] --output text 2>&1)
if [[ $(echo "$BUCKET_SERVER_LOG_ENABLED" | grep AccessDenied) ]]; then
textFail "Access Denied Trying to Get Bucket Logging for $bucket"
continue
fi
if [[ $(echo "$BUCKET_SERVER_LOG_ENABLED" | grep "^None$") ]]; then
textFail "Bucket $bucket has server access logging disabled!"
else
textPass "Bucket $bucket has server access logging enabled"
fi
done
else
textInfo "No S3 Buckets found"
fi
}

View File

@@ -1,34 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra719="7.19"
CHECK_TITLE_extra719="[extra719] Check if Route53 public hosted zones are logging queries to CloudWatch Logs (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra719="NOT_SCORED"
CHECK_TYPE_extra719="EXTRA"
CHECK_ALTERNATE_check719="extra719"
extra719(){
# You can't create a query logging config for a private hosted zone.
LIST_OF_HOSTED_ZONES=$($AWSCLI route53 list-hosted-zones $PROFILE_OPT | jq -r ".HostedZones[] | select(.Config.PrivateZone == false) | .Id")
if [[ $LIST_OF_HOSTED_ZONES ]]; then
for hostedzoneid in $LIST_OF_HOSTED_ZONES;do
HOSTED_ZONE_QUERY_LOG_ENABLED=$($AWSCLI route53 list-query-logging-configs --hosted-zone-id $hostedzoneid $PROFILE_OPT --query QueryLoggingConfigs[*].CloudWatchLogsLogGroupArn --output text|cut -d: -f7)
if [[ $HOSTED_ZONE_QUERY_LOG_ENABLED ]];then
textPass "Route53 public hosted zone Id $hostedzoneid has query logging enabled in Log Group $HOSTED_ZONE_QUERY_LOG_ENABLED"
else
textFail "Route53 public hosted zone Id $hostedzoneid has query logging disabled!"
fi
done
else
textInfo "No Route53 hosted zones found"
fi
}

View File

@@ -1,36 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra72="7.2"
CHECK_TITLE_extra72="[extra72] Ensure there are no EBS Snapshots set as Public (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra72="NOT_SCORED"
CHECK_TYPE_extra72="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra72="AwsEc2Snapshot"
CHECK_ALTERNATE_extra702="extra72"
CHECK_ALTERNATE_check72="extra72"
CHECK_ALTERNATE_check702="extra72"
extra72(){
# "Ensure there are no EBS Snapshots set as Public (Not Scored) (Not part of CIS benchmark)"
textInfo "Looking for EBS Snapshots in all regions... "
for regx in $REGIONS; do
LIST_OF_EBS_SNAPSHOTS=$($AWSCLI ec2 describe-snapshots $PROFILE_OPT --region $regx --owner-ids $ACCOUNT_NUM --output text --query 'Snapshots[*].{ID:SnapshotId}' --max-items $MAXITEMS | grep -v None 2> /dev/null)
for snapshot in $LIST_OF_EBS_SNAPSHOTS; do
SNAPSHOT_IS_PUBLIC=$($AWSCLI ec2 describe-snapshot-attribute $PROFILE_OPT --region $regx --output text --snapshot-id $snapshot --attribute createVolumePermission --query "CreateVolumePermissions[?Group=='all']")
if [[ $SNAPSHOT_IS_PUBLIC ]];then
textFail "$regx: $snapshot is currently Public!" "$regx"
else
textPass "$regx: $snapshot is not Public" "$regx"
fi
done
done
}

View File

@@ -1,58 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra720="7.20"
CHECK_TITLE_extra720="[extra720] Check if Lambda functions invoke API operations are being recorded by CloudTrail (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra720="NOT_SCORED"
CHECK_TYPE_extra720="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra720="AwsLambdaFunction"
CHECK_ALTERNATE_check720="extra720"
extra720(){
# "Check if Lambda functions invoke API operations are being recorded by CloudTrail (Not Scored) (Not part of CIS benchmark)"
for regx in $REGIONS; do
LIST_OF_FUNCTIONS=$($AWSCLI lambda list-functions $PROFILE_OPT --region $regx --query Functions[*].FunctionName --output text)
if [[ $LIST_OF_FUNCTIONS ]]; then
for lambdafunction in $LIST_OF_FUNCTIONS;do
LIST_OF_TRAILS=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region $regx --query trailList[].TrailARN --output text)
if [[ $LIST_OF_TRAILS ]]; then
for trail in $LIST_OF_TRAILS; do
FUNCTION_ENABLED_IN_TRAIL=$($AWSCLI cloudtrail get-event-selectors $PROFILE_OPT --trail-name $trail --region $regx --query "EventSelectors[*].DataResources[?Type == \`AWS::Lambda::Function\`].Values" --output text |xargs -n1| grep -E "^arn:${AWS_PARTITION}:lambda.*function:$lambdafunction$|^arn:${AWS_PARTITION}:lambda$")
if [[ $FUNCTION_ENABLED_IN_TRAIL ]]; then
textPass "$regx: Lambda function $lambdafunction enabled in trail $trail" "$regx"
else
textFail "$regx: Lambda function $lambdafunction NOT enabled in trail $trail" "$regx"
fi
done
# LIST_OF_MULTIREGION_TRAILS=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region $regx --query "trailList[?IsMultiRegionTrail == \`true\`].Name" --output text)
# if [[ $LIST_OF_MULTIREGION_TRAILS ]]; then
# for trail in $LIST_OF_MULTIREGION_TRAILS; do
# REGION_OF_TRAIL=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region $regx --query "trailList[?IsMultiRegionTrail == \`true\` && Name == \`$trail\` ].HomeRegion" --output text)
# FUNCTION_ENABLED_IN_THIS_REGION=$($AWSCLI cloudtrail get-event-selectors $PROFILE_OPT --trail-name $trail --region $REGION_OF_TRAIL --query "EventSelectors[*].DataResources[?Type == \`AWS::Lambda::Function\`].Values" --output text |xargs -n1| grep -E "^arn:aws:lambda.*function:$lambdafunction$")
# if [[ $FUNCTION_ENABLED_IN_THIS_REGION ]]; then
# textPass "$regx: Lambda function $lambdafunction enabled in trail $trail" "$regx"
# else
# textFail "$regx: Lambda function $lambdafunction NOT enabled in trail $trail" "$regx"
# fi
# done
# else
# textFail "$regx: Lambda function $lambdafunction is not being recorded!" "$regx"
# fi
else
textFail "$regx: Lambda function $lambdafunction is not being recorded no CloudTrail found!" "$regx"
fi
done
else
textInfo "$regx: No Lambda functions found" "$regx"
fi
done
}

View File

@@ -1,38 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra721="7.21"
CHECK_TITLE_extra721="[extra721] Check if Redshift cluster has audit logging enabled (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra721="NOT_SCORED"
CHECK_TYPE_extra721="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra721="AwsRedshiftCluster"
CHECK_ALTERNATE_check721="extra721"
extra721(){
# "Check if Redshift cluster has audit logging enabled (Not Scored) (Not part of CIS benchmark)"
for regx in $REGIONS; do
LIST_OF_REDSHIFT_CLUSTERS=$($AWSCLI redshift describe-clusters $PROFILE_OPT --region $regx --query 'Clusters[*].ClusterIdentifier' --output text)
if [[ $LIST_OF_REDSHIFT_CLUSTERS ]]; then
for redshiftcluster in $LIST_OF_REDSHIFT_CLUSTERS;do
REDSHIFT_LOG_ENABLED=$($AWSCLI redshift describe-logging-status $PROFILE_OPT --region $regx --cluster-identifier $redshiftcluster --query LoggingEnabled --output text | grep True)
if [[ $REDSHIFT_LOG_ENABLED ]];then
REDSHIFT_LOG_ENABLED_BUCKET=$($AWSCLI redshift describe-logging-status $PROFILE_OPT --region $regx --cluster-identifier $redshiftcluster --query BucketName --output text)
textPass "$regx: Redshift cluster $redshiftcluster has audit logging enabled to bucket $REDSHIFT_LOG_ENABLED_BUCKET" "$regx"
else
textFail "$regx: Redshift cluster $redshiftcluster logging disabled!" "$regx"
fi
done
else
textInfo "$regx: No Redshift cluster configured" "$regx"
fi
done
}

View File

@@ -1,45 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra722="7.22"
CHECK_TITLE_extra722="[extra722] Check if API Gateway has logging enabled (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra722="NOT_SCORED"
CHECK_TYPE_extra722="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra722="AwsApiGatewayRestApi"
CHECK_ALTERNATE_check722="extra722"
extra722(){
# "Check if API Gateway has logging enabled (Not Scored) (Not part of CIS benchmark)"
for regx in $REGIONS; do
LIST_OF_API_GW=$($AWSCLI apigateway get-rest-apis $PROFILE_OPT --region $regx --query items[*].id --output text)
if [[ $LIST_OF_API_GW ]];then
for apigwid in $LIST_OF_API_GW;do
API_GW_NAME=$($AWSCLI apigateway get-rest-apis $PROFILE_OPT --region $regx --query "items[?id==\`$apigwid\`].name" --output text)
CHECK_STAGES_NAME=$($AWSCLI apigateway get-stages $PROFILE_OPT --region $regx --rest-api-id $apigwid --query "item[*].stageName" --output text)
if [[ $CHECK_STAGES_NAME ]];then
for stagname in $CHECK_STAGES_NAME;do
CHECK_STAGE_METHOD_LOGGING=$($AWSCLI apigateway get-stages $PROFILE_OPT --region $regx --rest-api-id $apigwid --query "item[?stageName == \`$stagname\` ].methodSettings" --output text |awk '{ print $6 }' |egrep 'ERROR|INFO')
if [[ $CHECK_STAGE_METHOD_LOGGING ]];then
textPass "$regx: API Gateway $API_GW_NAME ID $apigwid in $stagname has logging enabled as $CHECK_STAGE_METHOD_LOGGING" "$regx"
else
textFail "$regx: API Gateway $API_GW_NAME ID $apigwid in $stagname has logging disabled" "$regx"
fi
done
else
textFail "$regx: No Stage name found for $API_GW_NAME" "$regx"
fi
done
else
textInfo "$regx: No API Gateway found" "$regx"
fi
done
}

View File

@@ -1,52 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra723="7.23"
CHECK_TITLE_extra723="[extra723] Check if RDS Snapshots and Cluster Snapshots are public (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra723="NOT_SCORED"
CHECK_TYPE_extra723="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra723="AwsRdsDbSnapshot"
CHECK_ALTERNATE_check723="extra723"
extra723(){
# "Check if RDS Snapshots are public (Not Scored) (Not part of CIS benchmark)"
for regx in $REGIONS; do
# RDS snapshots
LIST_OF_RDS_SNAPSHOTS=$($AWSCLI rds describe-db-snapshots $PROFILE_OPT --region $regx --query DBSnapshots[*].DBSnapshotIdentifier --output text)
if [[ $LIST_OF_RDS_SNAPSHOTS ]]; then
for rdssnapshot in $LIST_OF_RDS_SNAPSHOTS;do
SNAPSHOT_IS_PUBLIC=$($AWSCLI rds describe-db-snapshot-attributes $PROFILE_OPT --region $regx --db-snapshot-identifier $rdssnapshot --query DBSnapshotAttributesResult.DBSnapshotAttributes[*] --output text|grep ^ATTRIBUTEVALUES|cut -f2|grep all)
if [[ $SNAPSHOT_IS_PUBLIC ]];then
textFail "$regx: RDS Snapshot $rdssnapshot is public!" "$regx"
else
textPass "$regx: RDS Snapshot $rdssnapshot is not shared" "$regx"
fi
done
else
textInfo "$regx: No RDS Snapshots found" "$regx"
fi
# RDS cluster snapshots
LIST_OF_RDS_CLUSTER_SNAPSHOTS=$($AWSCLI rds describe-db-cluster-snapshots $PROFILE_OPT --region $regx --query DBClusterSnapshots[*].DBClusterSnapshotIdentifier --output text)
if [[ $LIST_OF_RDS_CLUSTER_SNAPSHOTS ]]; then
for rdsclustersnapshot in $LIST_OF_RDS_CLUSTER_SNAPSHOTS;do
CLUSTER_SNAPSHOT_IS_PUBLIC=$($AWSCLI rds describe-db-cluster-snapshot-attributes $PROFILE_OPT --region $regx --db-cluster-snapshot-identifier $rdsclustersnapshot --query DBClusterSnapshotAttributesResult.DBClusterSnapshotAttributes[*] --output text|grep ^ATTRIBUTEVALUES|cut -f2|grep all)
if [[ $CLUSTER_SNAPSHOT_IS_PUBLIC ]];then
textFail "$regx: RDS Cluster Snapshot $rdsclustersnapshot is public!" "$regx"
else
textPass "$regx: RDS Cluster Snapshot $rdsclustersnapshot is not shared" "$regx"
fi
done
else
textInfo "$regx: No RDS Cluster Snapshots found" "$regx"
fi
done
}

View File

@@ -1,45 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra724="7.24"
CHECK_TITLE_extra724="[extra724] Check if ACM certificates have Certificate Transparency logging enabled (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra724="NOT_SCORED"
CHECK_TYPE_extra724="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra724="AwsCertificateManagerCertificate"
CHECK_ALTERNATE_check724="extra724"
extra724(){
# "Check if ACM certificates have Certificate Transparency logging enabled (Not Scored) (Not part of CIS benchmark)"
for regx in $REGIONS; do
LIST_OF_CERTS=$($AWSCLI acm list-certificates $PROFILE_OPT --region $regx --query CertificateSummaryList[].CertificateArn --output text)
if [[ $LIST_OF_CERTS ]];then
for cert_arn in $LIST_OF_CERTS;do
CT_ENABLED=$($AWSCLI acm describe-certificate $PROFILE_OPT --region $regx --certificate-arn $cert_arn --query Certificate.Options.CertificateTransparencyLoggingPreference --output text)
CERT_DOMAIN_NAME=$(aws acm describe-certificate $PROFILE_OPT --region $regx --certificate-arn $cert_arn --query Certificate.DomainName --output text)
CERT_TYPE=$(aws acm describe-certificate $PROFILE_OPT --region $regx --certificate-arn $cert_arn --query Certificate.Type --output text)
if [[ $CERT_TYPE == "IMPORTED" ]];then
# Ignore imported certificate
textInfo "$regx: ACM Certificate $CERT_DOMAIN_NAME is imported." "$regx"
else
if [[ $CT_ENABLED == "ENABLED" ]];then
textPass "$regx: ACM Certificate $CERT_DOMAIN_NAME has Certificate Transparency logging enabled!" "$regx"
else
textFail "$regx: ACM Certificate $CERT_DOMAIN_NAME has Certificate Transparency logging disabled!" "$regx"
fi
fi
done
else
textInfo "$regx: No ACM Certificates found" "$regx"
fi
done
textInfo "*Read more about this here: https://aws.amazon.com/blogs/security/how-to-get-ready-for-certificate-transparency/"
}

View File

@@ -1,57 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra725="7.25"
CHECK_TITLE_extra725="[extra725] Check if S3 buckets have Object-level logging enabled in CloudTrail (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra725="NOT_SCORED"
CHECK_TYPE_extra725="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra725="AwsS3Bucket"
CHECK_ALTERNATE_check725="extra725"
# per Object-level logging is not configured at Bucket level but at CloudTrail trail level
extra725(){
# "Check if S3 buckets have Object-level logging enabled in CloudTrail (Not Scored) (Not part of CIS benchmark)"
textInfo "Looking for S3 Buckets Object-level logging information in all trails... "
LIST_OF_BUCKETS=$($AWSCLI s3api list-buckets $PROFILE_OPT --region $REGION --query 'Buckets[*].{Name:Name}' --output text)
LIST_OF_TRAILS=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region $REGION --query 'trailList[].TrailARN' --output text)
if [[ $LIST_OF_BUCKETS ]]; then
for bucketName in $LIST_OF_BUCKETS;do
if [[ $LIST_OF_TRAILS ]]; then
BUCKET_ENABLED_TRAILS=()
for trail in $LIST_OF_TRAILS; do
BUCKET_ENABLED_IN_TRAIL=$($AWSCLI cloudtrail get-event-selectors --region $REGION $PROFILE_OPT --trail-name $trail --query "EventSelectors[*].DataResources[?Type == \`AWS::S3::Object\`].Values" --output text |xargs -n1| grep -E "^arn:${AWS_PARTITION}:s3:::$bucketName/\S*$|^arn:${AWS_PARTITION}:s3$|^arn:${AWS_PARTITION}:s3:::$")
if [[ $BUCKET_ENABLED_IN_TRAIL ]]; then
BUCKET_ENABLED_TRAILS+=($trail)
# textPass "$regx: S3 bucket $bucketName has Object-level logging enabled in trail $trail" "$regx"
#else
# textFail "$regx: S3 bucket $bucketName has Object-level logging disabled" "$regx"
fi
done
if [[ ${#BUCKET_ENABLED_TRAILS[@]} -gt 0 ]]; then
for trail in "${BUCKET_ENABLED_TRAILS[@]}"; do
textPass "$regx: S3 bucket $bucketName has Object-level logging enabled in trail $trail" "$regx"
done
else
textFail "$regx: S3 bucket $bucketName has Object-level logging disabled" "$regx"
fi
else
textFail "$regx: S3 bucket $bucketName is not being recorded no CloudTrail found!" "$regx"
fi
done
else
textInfo "$regx: No S3 buckets found" "$regx"
fi
}

View File

@@ -1,51 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra726="7.26"
CHECK_TITLE_extra726="[extra726] Check Trusted Advisor for errors and warnings (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra726="NOT_SCORED"
CHECK_TYPE_extra726="EXTRA"
CHECK_ALTERNATE_check726="extra726"
extra726(){
trap "exit" INT
# forcing us-east-1 region only since support only works in that region
TA_CHECKS_ID=$($AWSCLI support describe-trusted-advisor-checks --language en $PROFILE_OPT --region us-east-1 --query checks[*].id --output text 2>&1)
if [[ $(echo "$TA_CHECKS_ID" | grep SubscriptionRequiredException) ]]; then
textInfo "Trusted Advisor requires AWS Premium Support Subscription"
return
fi
for checkid in $TA_CHECKS_ID; do
TA_CHECKS_NAME=$($AWSCLI support describe-trusted-advisor-checks --language en $PROFILE_OPT --region us-east-1 --query "checks[?id==\`$checkid\`].{name:name}[*]" --output text)
QUERY_TA_CHECK_RESULT=$($AWSCLI support describe-trusted-advisor-check-result --check-id $checkid --language en $PROFILE_OPT --region us-east-1 --query 'result.status' --output text)
# Possible results - https://docs.aws.amazon.com/cli/latest/reference/support/describe-trusted-advisor-check-result.html
case "$QUERY_TA_CHECK_RESULT" in
"ok")
textPass "Trusted Advisor check $TA_CHECKS_NAME is in ok state $QUERY_TA_CHECK_RESULT"
;;
"error")
textFail "Trusted Advisor check $TA_CHECKS_NAME is in error state $QUERY_TA_CHECK_RESULT"
;;
"warning")
textInfo "Trusted Advisor check $TA_CHECKS_NAME is in warning state $QUERY_TA_CHECK_RESULT"
;;
"not_available")
textInfo "Trusted Advisor check $TA_CHECKS_NAME is in not_available state $QUERY_TA_CHECK_RESULT"
;;
"*")
textFail "Trusted Advisor check $TA_CHECKS_NAME is in unknown state $QUERY_TA_CHECK_RESULT"
;;
esac
done
}

View File

@@ -1,51 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra727="7.27"
CHECK_TITLE_extra727="[extra727] Check if SQS queues have policy set as Public (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra727="NOT_SCORED"
CHECK_TYPE_extra727="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra727="AwsSqsQueue"
CHECK_ALTERNATE_check727="extra727"
extra727(){
for regx in $REGIONS; do
LIST_SQS=$($AWSCLI sqs list-queues $PROFILE_OPT --region $regx --query QueueUrls --output text |grep -v ^None)
if [[ $LIST_SQS ]]; then
for queue in $LIST_SQS; do
SQS_POLICY=$($AWSCLI sqs get-queue-attributes --queue-url $queue $PROFILE_OPT --region $regx --attribute-names All --query Attributes.Policy)
if [[ "$SQS_POLICY" != "null" ]]; then
SQS_POLICY_ALLOW_ALL=$(echo $SQS_POLICY \
| jq '. | fromjson' | jq '.Statement[] | select(.Effect=="Allow") | select(.Principal=="*" or .Principal.AWS=="*" or .Principal.CanonicalUser=="*")')
if [[ $SQS_POLICY_ALLOW_ALL ]]; then
SQS_POLICY_ALLOW_ALL_WITHOUT_CONDITION=$(echo $SQS_POLICY \
| jq '. | fromjson' | jq '.Statement[] | select(.Effect=="Allow") | select(.Principal=="*" or .Principal.AWS=="*" or .Principal.CanonicalUser=="*") | select(has("Condition") | not)')
if [[ $SQS_POLICY_ALLOW_ALL_WITHOUT_CONDITION ]]; then
SQS_POLICY_ALLOW_ALL_WITHOUT_CONDITION_DETAILS=$(echo $SQS_POLICY_ALLOW_ALL_WITHOUT_CONDITION \
| jq '"[Principal: " + (.Principal|tostring) + " Action: " + (.Action|tostring) + "]"' )
textFail "$regx: SQS $queue queue policy with public access: $SQS_POLICY_ALLOW_ALL_WITHOUT_CONDITION_DETAILS" "$regx"
else
textInfo "$regx: SQS $queue queue policy with public access but has a Condition" "$regx"
fi
else
textPass "$regx: SQS $queue queue without public access" "$regx"
fi
else
textPass "$regx: SQS $queue queue without policy" "$regx"
fi
done
else
textInfo "$regx: No SQS queues found" "$regx"
fi
done
}

View File

@@ -1,38 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra728="7.28"
CHECK_TITLE_extra728="[extra728] Check if SQS queues have Server Side Encryption enabled (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra728="NOT_SCORED"
CHECK_TYPE_extra728="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra728="AwsSqsQueue"
CHECK_ALTERNATE_check728="extra728"
extra728(){
for regx in $REGIONS; do
LIST_SQS=$($AWSCLI sqs list-queues $PROFILE_OPT --region $regx --query QueueUrls --output text |grep -v ^None)
if [[ $LIST_SQS ]]; then
for queue in $LIST_SQS; do
# check if the policy has KmsMasterKeyId therefore SSE enabled
SSE_ENABLED_QUEUE=$($AWSCLI sqs get-queue-attributes --queue-url $queue $PROFILE_OPT --region $regx --attribute-names All --query Attributes.KmsMasterKeyId --output text|grep -v ^None)
if [[ $SSE_ENABLED_QUEUE ]]; then
textPass "$regx: SQS queue $queue is using Server Side Encryption" "$regx"
else
textFail "$regx: SQS queue $queue is not using Server Side Encryption" "$regx"
fi
done
else
textInfo "$regx: No SQS queues found" "$regx"
fi
done
}

View File

@@ -1,38 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra729="7.29"
CHECK_TITLE_extra729="[extra729] Ensure there are no EBS Volumes unencrypted (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra729="NOT_SCORED"
CHECK_TYPE_extra729="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra729="AwsEc2Volume"
CHECK_ALTERNATE_check729="extra729"
extra729(){
# "Ensure there are no EBS Volumes unencrypted (Not Scored) (Not part of CIS benchmark)"
textInfo "Looking for EBS Volumes in all regions... "
for regx in $REGIONS; do
LIST_OF_EBS_NON_ENC_VOLUMES=$($AWSCLI ec2 describe-volumes $PROFILE_OPT --region $regx --query 'Volumes[?Encrypted==`false`].VolumeId' --output text)
if [[ $LIST_OF_EBS_NON_ENC_VOLUMES ]];then
for volume in $LIST_OF_EBS_NON_ENC_VOLUMES; do
textFail "$regx: $volume is not encrypted!" "$regx"
done
fi
LIST_OF_EBS_ENC_VOLUMES=$($AWSCLI ec2 describe-volumes $PROFILE_OPT --region $regx --query 'Volumes[?Encrypted==`true`].VolumeId' --output text)
if [[ $LIST_OF_EBS_ENC_VOLUMES ]];then
for volume in $LIST_OF_EBS_ENC_VOLUMES; do
textPass "$regx: $volume is encrypted" "$regx"
done
fi
done
}

View File

@@ -1,155 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra73="7.3"
CHECK_TITLE_extra73="[extra73] Ensure there are no S3 buckets open to the Everyone or Any AWS user (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra73="NOT_SCORED"
CHECK_TYPE_extra73="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra73="AwsS3Bucket"
CHECK_ALTERNATE_extra703="extra73"
CHECK_ALTERNATE_check73="extra73"
CHECK_ALTERNATE_check703="extra73"
# Verified with AWS support that if get-bucket-acl doesn't return a grant
# for All and get-bucket-policy-status returns IsPublic false or bad request
# (no policy) then the bucket can be considered not public - though
# individual objects may still be. If in addition put-public-access-block is
# used to set IgnorePublicAcls and RestrictPublicBuckets to true then that
# causes Amazon S3 to ignore all public ACLs on a bucket and any objects that
# it contains.
#
# This check does not address legacy ACLs or policies that would give
# public access if not blocked at account or bucket level, instead it tries
# to reward the use of more broadly restrictive controls with quicker and less
# computational intensive checks.
#
# If we are assembling an inventory then maybe that is not what we want but
# for day to day usage that is probably desirable.
extra73(){
textInfo "Looking for open S3 Buckets (ACLs and Policies) in all regions... "
#
# If public ACLs disabled at account level then look no further
#
ACCOUNT_PUBLIC_ACCESS_BLOCK=$($AWSCLI s3control get-public-access-block $PROFILE_OPT --region $REGION --account-id $ACCOUNT_NUM --output json 2>&1)
if [[ $(echo "$ACCOUNT_PUBLIC_ACCESS_BLOCK" | grep AccessDenied) ]]; then
textFail "Access Denied Trying to Get Public Access Block for $bucket"
return
fi
if [[ $(echo "$ACCOUNT_PUBLIC_ACCESS_BLOCK" | grep NoSuchPublicAccessBlockConfiguration) ]]; then
ACCOUNTIGNOREPUBLICACLS=""
ACCOUNTRESTRICTPUBLICBUCKETS=""
else
ACCOUNTIGNOREPUBLICACLS=$(echo "$ACCOUNT_PUBLIC_ACCESS_BLOCK" | jq -r '.PublicAccessBlockConfiguration.IgnorePublicAcls')
ACCOUNTRESTRICTPUBLICBUCKETS=$(echo "$ACCOUNT_PUBLIC_ACCESS_BLOCK" | jq -r '.PublicAccessBlockConfiguration.RestrictPublicBuckets')
fi
if [[ $ACCOUNTIGNOREPUBLICACLS == "true" && $ACCOUNTRESTRICTPUBLICBUCKETS == "true" ]]; then
textPass "All S3 public access blocked at account level"
return
fi
#
# Otherwise start to iterate bucket
#
ALL_BUCKETS_LIST=$($AWSCLI s3api list-buckets --query 'Buckets[*].{Name:Name}' $PROFILE_OPT --output text 2>&1)
if [[ $(echo "$ALL_BUCKETS_LIST" | grep AccessDenied) ]]; then
textFail "Access Denied Trying to List Buckets"
return
fi
if [[ "$ALL_BUCKETS_LIST" == "" ]]; then
textInfo "No buckets found"
return
fi
for bucket in $ALL_BUCKETS_LIST; do
#
# LOCATION - requests referencing buckets created after March 20, 2019
# must be made to S3 endpoints in the same region as the bucket was
# created.
#
BUCKET_LOCATION=$($AWSCLI s3api get-bucket-location --bucket $bucket $PROFILE_OPT --output text 2>&1)
if [[ $(echo "$BUCKET_LOCATION" | grep AccessDenied) ]]; then
textFail "Access Denied Trying to Get Bucket Location for $bucket"
continue
fi
if [[ "None" == $BUCKET_LOCATION ]]; then
BUCKET_LOCATION="us-east-1"
fi
if [[ "EU" == $BUCKET_LOCATION ]]; then
BUCKET_LOCATION="eu-west-1"
fi
#
# If public ACLs disabled at bucket level then look no further
#
BUCKET_PUBLIC_ACCESS_BLOCK=$($AWSCLI s3api get-public-access-block $PROFILE_OPT --region $BUCKET_LOCATION --bucket $bucket --output json 2>&1)
if [[ $(echo "$BUCKET_PUBLIC_ACCESS_BLOCK" | grep AccessDenied) ]]; then
textFail "Access Denied Trying to Get Public Access Block for $bucket"
continue
fi
if [[ $(echo "$BUCKET_PUBLIC_ACCESS_BLOCK" | grep NoSuchPublicAccessBlockConfiguration) ]]; then
BUCKETIGNOREPUBLICACLS=""
BUCKETRESTRICTPUBLICBUCKETS=""
else
BUCKETIGNOREPUBLICACLS=$(echo "$BUCKET_PUBLIC_ACCESS_BLOCK" | jq -r '.PublicAccessBlockConfiguration.IgnorePublicAcls')
BUCKETRESTRICTPUBLICBUCKETS=$(echo "$BUCKET_PUBLIC_ACCESS_BLOCK" | jq -r '.PublicAccessBlockConfiguration.RestrictPublicBuckets')
fi
if [[ $BUCKETIGNOREPUBLICACLS == "true" && $BUCKETRESTRICTPUBLICBUCKETS == "true" ]]; then
textPass "$BUCKET_LOCATION: $bucket bucket is not Public" "$BUCKET_LOCATION"
continue
fi
#
# Check for public ACL grants
#
BUCKET_ACL=$($AWSCLI s3api get-bucket-acl $PROFILE_OPT --region $BUCKET_LOCATION --bucket $bucket --output json 2>&1)
if [[ $(echo "$BUCKET_ACL" | grep AccessDenied) ]]; then
textFail "Access Denied Trying to Get Bucket Acl for $bucket"
continue
fi
ALLUSERS_ACL=$(echo "$BUCKET_ACL" | jq '.Grants[]|select(.Grantee.URI != null)|select(.Grantee.URI | endswith("/AllUsers"))')
if [[ $ALLUSERS_ACL != "" ]]; then
textFail "$BUCKET_LOCATION: $bucket bucket is Public!" "$BUCKET_LOCATION"
continue
fi
AUTHENTICATEDUSERS_ACL=$(echo "$BUCKET_ACL" | jq '.Grants[]|select(.Grantee.URI != null)|select(.Grantee.URI | endswith("/AuthenticatedUsers"))')
if [[ $AUTHENTICATEDUSERS_ACL != "" ]]; then
textFail "$BUCKET_LOCATION: $bucket bucket is Public!" "$BUCKET_LOCATION"
continue
fi
#
# Check for public access in policy
#
BUCKET_POLICY_STATUS=$($AWSCLI s3api get-bucket-policy-status $PROFILE_OPT --region $BUCKET_LOCATION --bucket $bucket --query PolicyStatus.IsPublic --output text 2>&1)
if [[ $(echo "$BUCKET_POLICY_STATUS" | grep AccessDenied) ]]; then
textFail "Access Denied Trying to Get Bucket Policy Status for $bucket"
continue
fi
if [[ $(echo "$BUCKET_POLICY_STATUS" | grep NoSuchBucketPolicy) ]]; then
BUCKET_POLICY_STATUS="False"
fi
if [[ $BUCKET_POLICY_STATUS != "" && $BUCKET_POLICY_STATUS != "False" ]]; then
textFail "$BUCKET_LOCATION: $bucket bucket is Public!" "$BUCKET_LOCATION"
continue
fi
textPass "$BUCKET_LOCATION: $bucket bucket is not Public" "$BUCKET_LOCATION"
done
}

View File

@@ -1,44 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
DAYS_TO_EXPIRE_THRESHOLD="7"
CHECK_ID_extra730="7.30"
CHECK_TITLE_extra730="[extra730] Check if ACM Certificates are about to expire in $DAYS_TO_EXPIRE_THRESHOLD days or less (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra730="NOT_SCORED"
CHECK_TYPE_extra730="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra730="AwsCertificateManagerCertificate"
CHECK_ALTERNATE_check730="extra730"
extra730(){
# "Check if ACM Certificates are about to expire in $DAYS_TO_EXPIRE_THRESHOLD days or less"
for regx in $REGIONS; do
LIST_OF_ACM_CERTS=$($AWSCLI acm list-certificates $PROFILE_OPT --region $regx --query 'CertificateSummaryList[].CertificateArn' --output text)
if [[ $LIST_OF_ACM_CERTS ]];then
for cert in $LIST_OF_ACM_CERTS; do
CERT_DATA=$($AWSCLI acm describe-certificate $PROFILE_OPT --region $regx --certificate-arn $cert --query 'Certificate.[DomainName,NotAfter]' --output text)
echo "$CERT_DATA" | while read FQDN NOTAFTER; do
EXPIRES_DATE=$(timestamp_to_date $NOTAFTER)
COUNTER_DAYS=$(how_many_days_from_today $EXPIRES_DATE)
if [[ $COUNTER_DAYS -le $DAYS_TO_EXPIRE_THRESHOLD ]]; then
textFail "$regx: Certificate for $FQDN is about to expire in $COUNTER_DAYS days!" "$regx"
else
textPass "$regx: Certificate for $FQDN expires in $COUNTER_DAYS days" "$regx"
fi
done
done
else
textInfo "$regx: No certificates found" "$regx"
fi
done
}

View File

@@ -1,48 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra731="7.31"
CHECK_TITLE_extra731="[extra731] Check if SNS topics have policy set as Public (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra731="NOT_SCORED"
CHECK_TYPE_extra731="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra731="AwsSnsTopic"
CHECK_ALTERNATE_check731="extra731"
extra731(){
for regx in $REGIONS; do
LIST_SNS=$($AWSCLI sns list-topics $PROFILE_OPT --region $regx --query Topics --output text |grep -v ^None)
if [[ $LIST_SNS ]]; then
for topic in $LIST_SNS; do
SHORT_TOPIC=$(echo $topic| cut -d: -f6)
SNS_POLICY=$($AWSCLI sns get-topic-attributes --topic-arn $topic $PROFILE_OPT --region $regx --query Attributes.Policy 2>/dev/null)
SNS_POLICY_ALLOW_ALL=$(echo $SNS_POLICY \
| jq '. | fromjson' | jq '.Statement[] | select(.Effect=="Allow") | select(.Principal=="*" or .Principal.AWS=="*" or .Principal.CanonicalUser=="*")')
if [[ $SNS_POLICY_ALLOW_ALL ]]; then
SNS_POLICY_ALLOW_ALL_WITHOUT_CONDITION=$(echo $SNS_POLICY \
| jq '. | fromjson' | jq '.Statement[] | select(.Effect=="Allow") | select(.Principal=="*" or .Principal.AWS=="*" or .Principal.CanonicalUser=="*") | select(has("Condition") | not)')
if [[ $SNS_POLICY_ALLOW_ALL_WITHOUT_CONDITION ]]; then
SNS_POLICY_ALLOW_ALL_WITHOUT_CONDITION_DETAILS=$(echo $SNS_POLICY_ALLOW_ALL_WITHOUT_CONDITION \
| jq '"[Principal: " + (.Principal|tostring) + " Action: " + (.Action|tostring) + "]"' )
textFail "$regx: SNS topic $SHORT_TOPIC's policy with public access: $SNS_POLICY_ALLOW_ALL_WITHOUT_CONDITION_DETAILS" "$SHORT_TOPIC" "$regx"
else
textPass "$regx: SNS topic $SHORT_TOPIC's policy with public access but has a Condition" "$SHORT_TOPIC" "$regx"
fi
else
textPass "$regx: SNS topic without public access" "$SHORT_TOPIC" "$regx"
fi
done
else
textInfo "$regx: No SNS topic found" "$SHORT_TOPIC" "$regx"
fi
done
}

View File

@@ -1,35 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra732="7.32"
CHECK_TITLE_extra732="[extra732] Check if Geo restrictions are enabled in CloudFront distributions (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra732="NOT_SCORED"
CHECK_TYPE_extra732="EXTRA"
CHECK_ASFF_RESOURCE_TYPE_extra732="AwsCloudFrontDistribution"
CHECK_ALTERNATE_check732="extra732"
extra732(){
LIST_DISTRIBUTIONS=$($AWSCLI cloudfront list-distributions $PROFILE_OPT --query 'DistributionList.Items[*].Id' --output text |grep -v ^None)
if [[ $LIST_DISTRIBUTIONS ]]; then
for dist in $LIST_DISTRIBUTIONS; do
GEO_ENABLED=$($AWSCLI cloudfront get-distribution-config $PROFILE_OPT --id $dist --query DistributionConfig.Restrictions.GeoRestriction.RestrictionType --output text)
if [[ $GEO_ENABLED == "none" ]]; then
textFail "CloudFront distribution $dist has not Geo restrictions"
else
textPass "CloudFront distribution $dist has Geo restrictions enabled"
fi
done
else
textInfo "No CloudFront distributions found"
fi
}

View File

@@ -1,30 +0,0 @@
#!/usr/bin/env bash
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
CHECK_ID_extra733="7.33"
CHECK_TITLE_extra733="[extra733] Check if there are SAML Providers then STS can be used (Not Scored) (Not part of CIS benchmark)"
CHECK_SCORED_extra733="NOT_SCORED"
CHECK_TYPE_extra733="EXTRA"
CHECK_ALTERNATE_check733="extra733"
extra733(){
LIST_SAML_PROV=$($AWSCLI iam list-saml-providers $PROFILE_OPT --query 'SAMLProviderList[*].Arn' --output text |grep -v ^None)
if [[ $LIST_SAML_PROV ]]; then
for provider in $LIST_SAML_PROV; do
PROVIDER_NAME=$(echo $provider| cut -d/ -f2)
textInfo "SAML Provider $PROVIDER_NAME has been found"
done
else
textInfo "No SAML Provider found, add one and use STS"
fi
}

Some files were not shown because too many files have changed in this diff Show More