Compare commits

...

891 Commits
3.3.2 ... v4.1

Author SHA1 Message Date
Pepe Fagoaga
e4652d4339 fix(ocsf): Add resource details to data (#3819) 2024-04-19 08:35:26 +02:00
Pepe Fagoaga
f1e4cd3938 docs(ocsf): Add missing fields to the example (#3816) 2024-04-19 08:09:36 +02:00
dependabot[bot]
e192a98079 chore(deps): bump aiohttp from 3.9.3 to 3.9.4 (#3818)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-19 07:50:48 +02:00
Pedro Martín
833dc83922 fix(dashboard): fix error in windows for csvreader (#3806) 2024-04-18 15:27:20 +02:00
Pedro Martín
ab1751c595 fix(overview-table): change font in overview table (#3815) 2024-04-18 14:53:32 +02:00
Sergio Garcia
fff06f971e chore(vpc): improve public subnet logic (#3814) 2024-04-18 13:58:42 +02:00
Pepe Fagoaga
a138d2964e fix(execute_check): Handle ModuleNotFoundError (#3812) 2024-04-18 12:36:15 +02:00
Pedro Martín
e6d7965453 fix(network_azure): handle capitalized protocols in security group rules (#3808) 2024-04-18 08:11:29 +02:00
Sergio Garcia
ab714f0fc7 chore(fixer): add more fixers (#3772)
Co-authored-by: Pepe Fagoaga <pepe@prowler.com>
2024-04-18 08:09:03 +02:00
Sergio Garcia
465b0f6a16 fix(utils): import libraries when needed (#3805) 2024-04-17 16:35:04 +02:00
Pedro Martín
bd87351ea7 chore(aws): Add CloudTrail Threat Detection tests (#3804)
Co-authored-by: Pepe Fagoaga <pepe@prowler.com>
2024-04-17 14:01:39 +02:00
Sergio Garcia
d79ec44e4c chore(ec2): improve handling of ENIs (#3798) 2024-04-17 13:12:31 +02:00
Matt Merchant
a2f84a12ea docs(developer guide): fix broken link (#3799) 2024-04-17 10:56:35 +02:00
Sergio Garcia
6fd71356ee chore(rds): improve rds public instance check (#3797) 2024-04-16 15:01:47 +02:00
dependabot[bot]
a0a305d9b1 chore(deps): bump pandas from 2.2.1 to 2.2.2 (#3791)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 14:18:18 +02:00
dependabot[bot]
6396d90fa6 chore(deps): bump azure-identity from 1.15.0 to 1.16.0 (#3795)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 12:13:51 +02:00
dependabot[bot]
e324750ec2 chore(deps-dev): bump mkdocs-material from 9.5.17 to 9.5.18 (#3794)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 11:46:21 +02:00
dependabot[bot]
5d99f020fa chore(deps): bump boto3 from 1.34.80 to 1.34.84 (#3793)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 11:17:55 +02:00
Sergio Garcia
b82e928f58 chore(dependabot): increase PRs limit (#3789) 2024-04-16 10:43:53 +02:00
dependabot[bot]
da871897e6 chore(deps): bump dash-bootstrap-components from 1.5.0 to 1.6.0 (#3778)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 10:20:08 +02:00
Pedro Martín
81778f73e4 fix(table-overview): Multiple changes on dashboard table from overview (#3773) 2024-04-16 10:15:16 +02:00
dependabot[bot]
2623728518 chore(deps): bump botocore from 1.34.80 to 1.34.84 (#3779)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 09:36:10 +02:00
dependabot[bot]
97f1d1b476 chore(deps): bump boto3 from 1.34.77 to 1.34.80 (#3780)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 08:56:14 +02:00
dependabot[bot]
2f6a837bc0 chore(deps): bump trufflesecurity/trufflehog from 3.72.0 to 3.73.0 (#3786)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 07:23:02 +02:00
dependabot[bot]
5e22c2d9a5 chore(deps-dev): bump black from 24.3.0 to 24.4.0 (#3777)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 07:22:28 +02:00
Sergio Garcia
99bd637de4 chore(fixer): improve fixer logic and include more (#3750) 2024-04-15 17:45:40 +02:00
Sergio Garcia
b9177e5580 fix(trufflehog): fix GitHub action of TruffleHog (#3775) 2024-04-15 17:37:07 +02:00
Pepe Fagoaga
fc7ec184d9 fix(slack): Use global provider object (#3770) 2024-04-15 14:47:38 +02:00
Rubén De la Torre Vico
7a6ca342af docs(unit-testing): Update the unit testing section (#3764)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2024-04-15 13:20:31 +02:00
Rubén De la Torre Vico
30b6e5e5c6 docs(devel-guide): Add provider section and remove audit_info section (#3756)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2024-04-15 13:12:28 +02:00
Pepe Fagoaga
f8476decf7 fix(security-hub): MUTED -> WARNING (#3768) 2024-04-15 09:58:18 +02:00
Nacho Rivera
49e238577c chore(regions_update): Changes in regions for AWS services. (#3765)
Co-authored-by: sergargar <38561120+sergargar@users.noreply.github.com>
2024-04-15 08:50:07 +02:00
Rubén De la Torre Vico
026fff79c6 docs(devel-guide): Adding some improves and clarifications to developer guide (#3749)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2024-04-12 12:55:46 +02:00
Pedro Martín
36c3870c2f docs(compliance): Change images for compliance (#3760) 2024-04-12 12:30:33 +02:00
Pepe Fagoaga
54c309dbda fix(ocsf): Add compliance (#3753)
Co-authored-by: pedrooot <pedromarting3@gmail.com>
2024-04-12 12:28:34 +02:00
Pepe Fagoaga
f00dd35f93 chore(codeowners): Add prowler-dev team (#3763) 2024-04-12 12:27:28 +02:00
Pepe Fagoaga
e040efb3c8 fix(mutelist): if all fails are muted do exit 0 (#3754) 2024-04-12 12:26:58 +02:00
Pedro Martín
805d50586b fix(compliance): Add muted info to compliance outputs (#3751) 2024-04-12 12:19:20 +02:00
Pedro Martín
a289a807c5 fix(wafv2): Handle WAFNonexistentItemException (#3761) 2024-04-12 12:05:50 +02:00
Pedro Martín
e9117f95ee fix(json-ocsf): Remove risk field from unmapped (#3759)
Co-authored-by: Pepe Fagoaga <pepe@prowler.com>
2024-04-12 10:55:52 +02:00
Pedro Martín
82bd4e940f docs(threat-detection): Add threat-detection docs (#3757) 2024-04-12 10:36:55 +02:00
dependabot[bot]
ad3b0b33f2 chore(deps): bump idna from 3.6 to 3.7 (#3758)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-12 08:12:30 +02:00
Nacho Rivera
b2b664a5b0 chore(regions_update): Changes in regions for AWS services. (#3755)
Co-authored-by: sergargar <38561120+sergargar@users.noreply.github.com>
2024-04-11 14:43:26 +02:00
Pepe Fagoaga
571f3ebe1d fix(ocsf): Include check_id as metadata.event_code (#3748) 2024-04-10 15:51:48 +02:00
Pepe Fagoaga
c7f09df4e7 chore(dashboard): Use Prowler CLI parser (#3722) 2024-04-10 15:49:21 +02:00
Sergio Garcia
8758ecae97 feat(gcp): improve Google Projects scan customization (#3741) 2024-04-10 13:16:47 +02:00
Pedro Martín
f13c843ba6 fix(json-ocsf): Add missing fields for JSON-OCSF (#3745) 2024-04-10 11:55:48 +02:00
Pedro Martín
e95f7dd540 docs(outputs): update docs for v4 outputs (#3734)
Co-authored-by: Pepe Fagoaga <pepe@prowler.com>
2024-04-10 11:54:41 +02:00
Nacho Rivera
693329b87e chore(regions_update): Changes in regions for AWS services. (#3746)
Co-authored-by: sergargar <38561120+sergargar@users.noreply.github.com>
2024-04-10 11:53:27 +02:00
Rubén De la Torre Vico
f1ad521f64 feat(docs): Support toggle light/dark mode (#3744) 2024-04-10 10:37:44 +02:00
Pedro Martín
82fbba6513 fix(json-ocsf): add check_id field in json-ocsf output (#3740) 2024-04-10 09:58:33 +02:00
Pedro Martín
66fba8e4cd fix(download): remove dataframe index from download in dashboard (#3739) 2024-04-10 08:41:50 +02:00
Pepe Fagoaga
417131fa36 docs: readme points to docs.prowler.com to learn everything (#3707)
Co-authored-by: Sergio <sergio@prowler.com>
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2024-04-09 16:28:01 +02:00
Sergio Garcia
9c9d270053 fix(ulimit): import library only in windows (#3738) 2024-04-09 15:36:05 +02:00
Pedro Martín
f7fab165ba fix(aws_lambda): Update obsolete lambda runtimes (#3735) 2024-04-09 15:08:19 +02:00
Pepe Fagoaga
93bdf43c95 fix(actions): Don't need expressions within if (#3733) 2024-04-09 13:33:53 +02:00
Pepe Fagoaga
b3866b5b71 docs(dashboard): format list (#3732) 2024-04-09 13:18:52 +02:00
Sergio Garcia
2308084dee chore(version): update Prowler version (#3730) 2024-04-09 13:18:00 +02:00
Pepe Fagoaga
6eb5496c27 docs(dashboard): Indicate how to change port (#3729) 2024-04-09 12:28:54 +02:00
Nacho Rivera
c5514fdb63 chore(regions_update): Changes in regions for AWS services. (#3727)
Co-authored-by: sergargar <38561120+sergargar@users.noreply.github.com>
2024-04-09 12:03:06 +02:00
Pedro Martín
c78c3058fd fix(service_name): fix typo in ServiceName field (#3723) 2024-04-09 11:39:02 +02:00
Pepe Fagoaga
10d9ef9906 chore(dispatch): just for v3 (#3712) 2024-04-09 11:33:00 +02:00
Pepe Fagoaga
43426041ef docs(mutelist): remove MUTED and explain new fields (#3726) 2024-04-09 11:18:07 +02:00
Sergio Garcia
125eb9ac53 fix(k8s): improve kubernetes deployment (#3713) 2024-04-09 10:45:58 +02:00
Pedro Martín
681407e0a2 fix(compliance): add field ModoEjecucion in csv output for ENS (#3719) 2024-04-09 10:26:06 +02:00
Pedro Martín
082f3a8fe8 fix(dashboard): Add multiple dashboard fixes (#3714) 2024-04-09 10:22:03 +02:00
Sergio Garcia
397cc26b2a fix(gcp): add project id to outputs (#3711) 2024-04-09 10:17:32 +02:00
Rubén De la Torre Vico
331ae92843 chore(Azure): Optimize Entra service to use async funcs (#3706) 2024-04-09 09:20:06 +02:00
dependabot[bot]
06843cd41a chore(deps): bump botocore from 1.34.77 to 1.34.80 (#3715)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-09 08:39:56 +02:00
Pedro Martín
28b5ef9ee9 fix(ens): add dependencias field ENS rd2022 compliance (#3701) 2024-04-09 08:29:41 +02:00
Pedro Martín
63dcc057d3 feat(dashboard): add correct label for each dropdown (#3700) 2024-04-08 17:50:48 +02:00
Sergio Garcia
0bc16ee5ff chore(Dockerfile): remove deprecated dash dependencies (#3708) 2024-04-08 14:58:19 +02:00
Sergio Garcia
abcc9c2c80 docs(images): fix images link in documentation (#3709) 2024-04-08 14:49:06 +02:00
Sergio Garcia
daf2ad38bd chore(docs): update CloudShell scripts (#3687) 2024-04-08 14:39:29 +02:00
Sergio Garcia
3dc418df39 chore(action): update python version to 3.12 in GH action (#3705) 2024-04-08 12:48:54 +02:00
dependabot[bot]
00aaafbc12 chore(deps-dev): bump moto from 5.0.4 to 5.0.5 (#3681)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 12:47:22 +02:00
Sergio Garcia
bd49a55f3d chore(Dockerfile): update Python version to 3.12 (#3699) 2024-04-08 12:22:49 +02:00
dependabot[bot]
013975b7a6 chore(deps): bump kubernetes from 28.1.0 to 29.0.0 (#3679)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 12:21:23 +02:00
Pepe Fagoaga
392026286a fix(actions): use LATEST_TAG for v4 (#3703) 2024-04-08 12:10:02 +02:00
Nacho Rivera
29ef974565 chore(regions_update): Changes in regions for AWS services. (#3693)
Co-authored-by: sergargar <38561120+sergargar@users.noreply.github.com>
2024-04-08 11:52:51 +02:00
Sergio Garcia
06c8216092 build(deps): Update boto3 to version 1.34.77 (#3669)
Co-authored-by: Pepe Fagoaga <pepe@prowler.com>
2024-04-08 11:51:22 +02:00
Pepe Fagoaga
03f04d24a5 chore(dependabot): Add v3 label (#3698) 2024-04-08 11:19:35 +02:00
Pedro Martín
7b45ed63cc docs(dashboard): improve dashboard documentation (#3688) 2024-04-08 11:10:30 +02:00
Sergio Garcia
6e4dd1d69c fix(k8s): sanitize context syntax only for output file names (#3689) 2024-04-08 11:08:35 +02:00
Sergio Garcia
185b4cba0c chore(mutelist): remove space within mutelist name (#3690) 2024-04-08 11:07:29 +02:00
Pepe Fagoaga
8198ea4a2c chore(dependabot): Run also for v3 branch (#3683) 2024-04-08 11:05:09 +02:00
dependabot[bot]
aaf3e8a5cf chore(deps): bump google-api-python-client from 2.124.0 to 2.125.0 (#3678)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 10:55:00 +02:00
dependabot[bot]
ecef56fa8f chore(deps): bump trufflesecurity/trufflehog from 3.71.2 to 3.72.0 (#3677)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 10:39:53 +02:00
Pepe Fagoaga
349ce3f2d0 chore(regions): Add backport-v3 label (#3684) 2024-04-08 10:31:28 +02:00
Sergio Garcia
e3d4741213 chore(merge): include latest changes of v3 (#3686)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rubén De la Torre Vico <rubendltv22@gmail.com>
Co-authored-by: Nacho Rivera <nachor1992@gmail.com>
2024-04-08 10:30:39 +02:00
Pepe Fagoaga
9d6d5f1d76 fix(args): Handle default argument (#3674) 2024-04-08 10:01:35 +02:00
Pepe Fagoaga
3152d67f58 chore(actions): Run for master and v3 (#3685) 2024-04-08 09:35:23 +02:00
Pepe Fagoaga
cb41c8d15b fix(dockerfile): add missing path to build (#3680) 2024-04-08 09:24:05 +02:00
Pepe Fagoaga
06590842d6 chore(action): Run for v4 branch (#3666) 2024-04-04 15:53:45 +02:00
Pedro Martín
d4c22a0ca5 fix(dashboard): handle Kubernetes CIS in EKS context (#3671) 2024-04-04 15:50:38 +02:00
Sergio Garcia
c6f9936292 fix(merge): update v4 with latest changes (#3670) 2024-04-04 15:37:41 +02:00
Sergio Garcia
eaa8900758 fix(threat detection): rename to threshold (#3665) 2024-04-04 13:29:35 +02:00
Pedro Martín
e1e95d8879 docs(Dashboard): Add docs for dashboards (#3655) 2024-04-04 13:26:42 +02:00
Pedro Martín
ef3a0f4878 fix(Dashboard): Multiple dashboard fixes (#3654)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2024-04-04 13:14:27 +02:00
Sergio Garcia
64cc36e7e2 fix(fixer): list fixers without sufix (#3660)
Co-authored-by: Pepe Fagoaga <pepe@prowler.com>
2024-04-04 13:07:54 +02:00
Sergio Garcia
1e001bb0fd fix(deps): solve dependencies (#3662) 2024-04-04 12:48:59 +02:00
Sergio Garcia
6ba123a003 fix(box): remove lines inside box (#3657) 2024-04-04 12:24:14 +02:00
Pepe Fagoaga
36d0f2c23f fix: typo in action (#3659) 2024-04-04 12:04:45 +02:00
Sergio Garcia
63412e3645 chore(merge): update v4 with latest changes of v3 (#3653) 2024-04-03 18:31:36 +02:00
Pedro Martín
191cf276c3 feat(dashboards): add new Prowler dashboards (#3575)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2024-04-02 18:12:16 +02:00
Sergio Garcia
45978bd0bb feat(fixer): add Prowler Fixer feature! (#3634) 2024-04-02 17:13:26 +02:00
Sergio Garcia
9666652d18 chore(readme): update k8s cis (#3640) 2024-04-02 14:37:20 +02:00
Sergio Garcia
ad2716d7c9 chore(compliance): only execute all compliances in normal execution (#3635) 2024-04-02 10:55:38 +02:00
Sergio Garcia
0a7939bea3 chore(args): add plural severity argument (#3636) 2024-04-02 10:21:42 +02:00
Sergio Garcia
b8c50a7b45 chore(backport): merge changes from v3 to v4 (#3625)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rubén De la Torre Vico <rubendltv22@gmail.com>
Co-authored-by: Nacho Rivera <nachor1992@gmail.com>
Co-authored-by: Gabriel Soltz <8935378+gabrielsoltz@users.noreply.github.com>
Co-authored-by: Hugo966 <148140670+Hugo966@users.noreply.github.com>
Co-authored-by: Kay Agahd <kagahd@users.noreply.github.com>
Co-authored-by: Pepe Fagoaga <pepe@prowler.com>
2024-04-02 08:52:21 +02:00
Sergio Garcia
175e8d2b05 chore(slogan): update Prowler slogan (#3619) 2024-04-01 12:19:14 +02:00
Pepe Fagoaga
046069a656 chore(categories): Add threat detection checks in the loader (#3622) 2024-04-01 11:48:46 +02:00
Sergio Garcia
f9522da48f feat(cloudtrail): add threat detection checks for AWS (enum and priv escalation) (#3602) 2024-03-27 16:23:00 +01:00
Sergio Garcia
c03f959005 chore(ulimit): handle low ulimit value on shell session for POSIX if max open files is below 4096 (#3601) 2024-03-27 14:52:14 +01:00
Sergio Garcia
522aeebe5e chore(args): sanitize arguments (#3611) 2024-03-27 14:14:21 +01:00
Sergio Garcia
5312f487f9 chore(report): improve shown report in UI (#3587) 2024-03-27 12:57:20 +01:00
Pedro Martín
d9b6624d65 feat(compliance): Add CIS 1.8 framework for Kubernetes (#3600)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2024-03-26 14:03:39 +01:00
Hugo966
1506da54fc feat(azure): locations added to Azure findings (#3596) 2024-03-22 15:41:58 +01:00
Sergio Garcia
245512d320 fix(providers): import modules also from outside of directory (#3595) 2024-03-22 13:36:21 +01:00
Pepe Fagoaga
487190b379 fix(securityhub): Add validation and handle errors (#3590)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2024-03-22 10:27:48 +01:00
Sergio Garcia
74aaeaa95c fix(mapping): handle None attributes in data (#3588)
Co-authored-by: Pepe Fagoaga <pepe@prowler.com>
2024-03-21 17:56:21 +01:00
Sergio Garcia
28e8f0de2b chore(merge): get latest changes from v3 to v4 (#3582)
Co-authored-by: Hugo966 <148140670+Hugo966@users.noreply.github.com>
Co-authored-by: Pepe Fagoaga <pepe@prowler.com>
Co-authored-by: Nacho Rivera <nachor1992@gmail.com>
2024-03-21 17:08:19 +01:00
Pedro Martín
f60b5017e2 fix(compliance): fix csv output for framework Mitre Attack (#3574) 2024-03-21 13:18:03 +01:00
Sergio Garcia
fe80821596 chore(muted): handle new Muted status (#3570) 2024-03-19 18:37:49 +01:00
Pepe Fagoaga
628a3c4e7b fix(quickinventory): Adapt for the new AWS provider class (#3569)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2024-03-19 16:14:01 +01:00
Sergio Garcia
3d59c34ec9 chore(merge): add new changes from v3 (#3549)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Pepe Fagoaga <pepe@prowler.com>
Co-authored-by: Nacho Rivera <nachor1992@gmail.com>
Co-authored-by: Rubén De la Torre Vico <rubendltv22@gmail.com>
Co-authored-by: Pedro Martín <pedromarting3@gmail.com>
Co-authored-by: Hugo966 <148140670+Hugo966@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hugo Gálvez Ureña <hugogalvezu96@gmail.com>
Co-authored-by: github-actions <noreply@github.com>
2024-03-19 15:54:41 +01:00
Sergio Garcia
35043c2dd6 chore(unused services): scan unused services by default and add flag (#3556)
Co-authored-by: Pepe Fagoaga <pepe@prowler.com>
2024-03-19 15:15:19 +01:00
Pepe Fagoaga
ab815123c9 chore(slack): fix integration with provider (#3565)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2024-03-19 11:24:11 +01:00
Pepe Fagoaga
69ab84efe1 chore(main): remove getattr for mutelist (#3564) 2024-03-19 10:58:02 +01:00
Pepe Fagoaga
77823afa54 chore(audit_info): Replace for provider and add tests (#3542)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2024-03-19 09:53:05 +01:00
Pepe Fagoaga
63cd6c1290 chore(mutelist): enforce for all providers (#3554) 2024-03-18 10:12:15 +01:00
Sergio Garcia
cab32d2f94 feat(mutelist): add Mute List for all providers (#3548) 2024-03-15 12:22:10 +01:00
Pepe Fagoaga
1f4316e9dd chore(ocsf): add OCSF 1.1 and organize code (#3517)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2024-03-14 15:04:47 +01:00
Pepe Fagoaga
ade762a85e fix(azure): use subscriptions in get_locations (#3541) 2024-03-14 14:57:20 +01:00
Pepe Fagoaga
bda5d62c72 chore(aws): Replace audit_info for provider (#3521)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2024-03-13 18:15:24 +01:00
Pepe Fagoaga
2176fff8c3 chore(json): deprecate native json (#3514) 2024-03-13 18:11:33 +01:00
Pepe Fagoaga
87893bd54b chore(csv): Common output for all the providers (#3513)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2024-03-13 17:31:35 +01:00
Sergio Garcia
b539a888b1 chore(compliance): solve compliance issues (#3507)
Co-authored-by: Pepe Fagoaga <pepe@prowler.com>
2024-03-13 15:43:33 +01:00
Sergio Garcia
d6b2b0ca13 docs(kubernetes): add Kubernetes documentation (#3482) 2024-03-13 15:37:49 +01:00
Pepe Fagoaga
58ee45b702 chore(merge): 2024-03-06 11:03:00 UTC (#3506) 2024-03-06 13:05:31 +01:00
Pepe Fagoaga
c62d97f23a chore(html): deprecate output (#3501)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2024-03-05 14:16:23 +01:00
Pepe Fagoaga
d618c5ea12 fix(shodan): Make it available for all the providers (#3500) 2024-03-05 13:55:43 +01:00
Pepe Fagoaga
d8e27f0d33 chore(config): Store in provider (#3498)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2024-03-05 10:21:08 +01:00
Sergio Garcia
38496ff646 chore(kubernetes): add outputs fields (#3499) 2024-03-05 10:01:51 +01:00
Pepe Fagoaga
da1084907e chore(providers): Store output options and mutelist (#3497) 2024-03-05 09:56:30 +01:00
Pepe Fagoaga
3385b630e7 chore(azure): working outputs (#3491)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2024-03-04 17:59:48 +01:00
Pepe Fagoaga
fc59183045 chore(gcp): working outputs (#3490)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2024-03-04 17:54:41 +01:00
Pepe Fagoaga
33242079f7 chore(k8s): Working outputs (#3489) 2024-03-04 17:25:14 +01:00
Pepe Fagoaga
086148819c chore(aws): Working outputs (#3488) 2024-03-04 17:17:20 +01:00
Pepe Fagoaga
5df9fd881c chore(aws): Simplify provider (#3481)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2024-03-04 13:50:54 +01:00
Pepe Fagoaga
bd17d36e7f chore(kubernetes): Working provider (#3475)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2024-03-01 14:10:10 +01:00
Pepe Fagoaga
be55fa22fd chore(azure): working version executing checks (#3474) 2024-03-01 13:30:09 +01:00
Pepe Fagoaga
b48b3a5e2e chore(azure): working version executing checks (#3472)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2024-03-01 11:33:01 +01:00
Sergio Garcia
fc03dd37f1 chore(kubernetes): enhance checks metadata (#3469) 2024-02-29 17:16:28 +01:00
Sergio Garcia
d8bb384689 chore(kubernetes): add strong ciphers config vars (#3470) 2024-02-29 14:48:21 +01:00
Pepe Fagoaga
0b32a10bb8 chore(aws): Remove old provider (#3468) 2024-02-29 13:45:43 +01:00
Pepe Fagoaga
f0c027f54e chore(merge): Merge master with Prowler 4.0 (#3467)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2024-02-29 11:19:17 +01:00
Sergio Garcia
b0f2f34d3b feat(namespace): add --namespaces argument and solve bugs (#3431) 2024-02-28 19:33:29 +01:00
Sergio Garcia
3e6b76df76 fix(kubernetes): improve in-cluster execution (#3397) 2024-02-28 19:00:33 +01:00
Sergio Garcia
6197cf792d feat(kubelet): add 6 checks of Kubelet configuration files on the worker nodes (#3335)
Co-authored-by: Pepe Fagoaga <pepe@prowler.com>
2024-02-28 18:32:45 +01:00
Sergio Garcia
3c4e5a14f7 feat(core): add 13 checks of Kubernetes Core service (#3315)
Co-authored-by: Pepe Fagoaga <pepe@prowler.com>
2024-02-28 13:21:53 +01:00
Sergio Garcia
effc743b6e feat(rbac): add 9 checks of Kubernetes RBAC service (#3314) 2024-02-27 13:54:46 +01:00
Sergio Garcia
364a945d28 feat(kubelet): add 10 checks of Kubernetes Kubelet service (#3302)
Co-authored-by: Pepe Fagoaga <pepe@prowler.com>
2024-02-26 14:15:35 +01:00
Sergio Garcia
07b9354d18 feat(etcd): add checks for Kubernetes etcd (#3294)
Co-authored-by: Pepe Fagoaga <pepe@prowler.com>
2024-02-22 16:45:06 +00:00
Sergio Garcia
8b1e537ca5 feat(controllermanager): add checks for Kubernetes Controller Manager (#3291) 2024-02-22 16:55:23 +01:00
Sergio Garcia
6a20e850bc feat(apiserver): new 10 Kubernetes ApiServer checks (#3290) 2024-02-22 10:50:12 +01:00
Sergio Garcia
636892bc9a feat(apiserver): new 10 Kubernetes ApiServer checks (#3289) 2024-02-21 13:29:28 +01:00
Sergio Garcia
b40f32ab57 feat(apiserver): new 9 Kubernetes ApiServer checks (#3288)
Co-authored-by: Pepe Fagoaga <pepe@prowler.com>
2024-02-21 09:19:50 +01:00
Sergio Garcia
14bab496b5 chore(tests): add kubernetes provider tests (#3265) 2024-02-19 12:50:42 +00:00
Sergio Garcia
3cc367e0a3 feat(kubernetes): add etcd, controllermanager and rbac services (#3261)
Co-authored-by: Pepe Fagoaga <pepe@prowler.com>
2024-02-19 13:19:07 +01:00
Nacho Rivera
36fc575e40 feat(AwsProvider): include new structure for AWS provider (#3252)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2024-01-15 16:55:53 +01:00
Sergio Garcia
24efb34d91 chore(manual status): change INFO to MANUAL status (#3254) 2024-01-09 18:08:00 +01:00
Sergio Garcia
c08e244c95 feat(status): add --status flag (#3238) 2024-01-09 11:35:44 +01:00
Sergio Garcia
c2f8980f1f feat(kubernetes): add Kubernetes provider (#3226)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2024-01-09 10:31:51 +01:00
Sergio Garcia
0ef85b3dee fix(gcp): fix error in generating compliance (#3201) 2023-12-18 12:10:58 +01:00
Sergio Garcia
93a2431211 feat(compliance): execute all compliance by default (#3003)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-12-13 17:31:39 +01:00
Nacho Rivera
1fe74937c1 feat(CloudProvider): introduce global provider Azure&GCP (#3069) 2023-12-12 18:05:17 +01:00
Sergio Garcia
6ee016e577 chore(sts-endpoint): deprecate --sts-endpoint-region (#3046)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-12-12 17:13:50 +01:00
Sergio Garcia
f7248dfb1c feat(mute list): change allowlist to mute list (#3039)
Co-authored-by: Nacho Rivera <nachor1992@gmail.com>
2023-12-12 16:57:52 +01:00
Nacho Rivera
856afb3966 chore(update): rebase from master (#3067)
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: r3drun3 <simone.ragonesi@sighup.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Mastron <14130495+mtronrd@users.noreply.github.com>
Co-authored-by: John Mastron <jmastron@jpl.nasa.gov>
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
Co-authored-by: github-actions <noreply@github.com>
Co-authored-by: simone ragonesi <102741679+R3DRUN3@users.noreply.github.com>
Co-authored-by: Johnny Lu <johnny2lu@gmail.com>
Co-authored-by: Vajrala Venkateswarlu <59252985+venkyvajrala@users.noreply.github.com>
Co-authored-by: Ignacio Dominguez <ignacio.dominguez@zego.com>
2023-11-27 13:58:45 +01:00
Sergio Garcia
bf315261af chore(regions_update): Changes in regions for AWS services. (#2998)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-11-06 10:14:50 +01:00
Kay Agahd
6e83afb580 fix(s3 race condition): catch error if a bucket does not exist any longer (#3000) 2023-11-06 09:24:51 +01:00
Sergio Garcia
1a5742d4f5 fix(cloudtrail): handle HasInsightSelectors key (#2996) 2023-11-02 14:09:27 +01:00
Sergio Garcia
0e22458e86 fix(docs): solve allowlist syntax (#2995) 2023-11-02 12:43:59 +01:00
Sergio Garcia
cd8d1b8a8f chore(regions_update): Changes in regions for AWS services. (#2993)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-11-02 12:27:21 +01:00
Sergio Garcia
141a142742 chore(brew): remove brew action (#2994) 2023-11-02 10:28:32 +01:00
Sergio Garcia
a59b344d20 chore(release): update Prowler Version to 3.11.0 (#2992)
Co-authored-by: github-actions <noreply@github.com>
2023-10-31 15:48:33 +01:00
Pepe Fagoaga
f666711a2a fix(vpc_endpoint_services_allowed_principals_trust_boundaries): Principal (#2991) 2023-10-31 14:19:20 +01:00
Sergio Garcia
1014d64828 fix(outputs): remove empty outputs (#2990) 2023-10-31 14:09:02 +01:00
Sergio Garcia
a126a99853 fix(cis): remove new lines in CIS csv (#2989) 2023-10-31 13:56:33 +01:00
Sergio Garcia
082390a7f0 chore(gcp): print inactive GCP APIs (#2987) 2023-10-31 12:53:53 +01:00
Sergio Garcia
a994553c16 fix(allowlist): verify if allowlist file exists (#2988) 2023-10-31 12:53:45 +01:00
Sergio Garcia
3fd2ae954d fix(elbv2_desync_mitigation_mode): improve logic (#2986) 2023-10-31 12:42:24 +01:00
dependabot[bot]
e17c5642ca build(deps): bump google-api-python-client from 2.104.0 to 2.105.0 (#2985)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-31 11:36:12 +01:00
Sergio Garcia
fa7968cb1b feat(alias): add check alias functionality (#2971) 2023-10-31 11:25:54 +01:00
dependabot[bot]
57c3183b15 build(deps): bump mkdocs-material from 9.4.6 to 9.4.7 (#2983)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-31 11:07:29 +01:00
dependabot[bot]
1fd6471cb1 build(deps-dev): bump moto from 4.2.6 to 4.2.7 (#2984)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-31 10:41:22 +01:00
dependabot[bot]
1827230514 build(deps): bump azure-identity from 1.14.1 to 1.15.0 (#2982)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-31 10:13:32 +01:00
dependabot[bot]
06dc3d3361 build(deps-dev): bump pytest from 7.4.2 to 7.4.3 (#2981)
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-10-31 09:28:50 +01:00
Sergio Garcia
a7a2e24d42 chore(docs): allowlist non-default regions (#2980) 2023-10-30 21:52:25 +01:00
ToastyCat
bb543cb5db fix(ec2_instance_imdsv2_enabled ): verify if metadata service is disabled (#2978)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-10-30 21:16:25 +01:00
Pepe Fagoaga
373ce0ad04 fix(GuardDuty): Add enabled_in_account parameter (#2979) 2023-10-30 19:39:22 +01:00
Sergio Garcia
fcb979aae1 feat(allowlist): allowlist non-default regions configuration (#2974) 2023-10-30 17:51:49 +01:00
Pepe Fagoaga
fcc56ad6f7 chore(allowlist): Extract allowlist from report (#2975) 2023-10-30 09:52:59 +01:00
Nacho Rivera
5be8570c8c fix(cloudtrail service): typo in logging info (#2976) 2023-10-30 09:49:20 +01:00
Sergio Garcia
d471442422 chore(regions_update): Changes in regions for AWS services. (#2973)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-10-27 11:41:08 +02:00
Sergio Garcia
4070c923fc chore(regions_update): Changes in regions for AWS services. (#2969)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-10-26 15:46:45 +02:00
Sergio Garcia
3ca38fe92d fix(gcp): set always location to lowercase (#2970) 2023-10-26 13:21:09 +02:00
dependabot[bot]
55ebadfe28 build(deps-dev): bump werkzeug from 2.3.4 to 3.0.1 (#2968)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-26 07:58:28 +02:00
Sergio Garcia
9bd2519c83 chore(APIGatewayV2): improve check naming (#2966) 2023-10-25 16:59:06 +02:00
Sergio Garcia
4bfe145be3 chore(regions_update): Changes in regions for AWS services. (#2965)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-10-25 13:59:19 +02:00
Sergio Garcia
41085049e2 chore(docs): add STS Endpoint and Allowlist updates (#2964) 2023-10-25 13:58:59 +02:00
Sergio Garcia
f7312db0c7 chore(allowlist): prettify allowlist names (#2963) 2023-10-24 18:48:34 +02:00
Sergio Garcia
008534d839 feat(controltower): add AWS Control Tower resources to default Allowlist configuration file (#2953)
Co-authored-by: Toni de la Fuente <toni@blyx.com>
2023-10-24 16:45:21 +02:00
Pepe Fagoaga
8533714cb2 tests: remove tests folder after execution (#2962) 2023-10-24 16:29:18 +02:00
Sergio Garcia
b822c19d2c feat(ignore unused services): add --ignore-unused-services argument to ignore findings from services not in actual use (#2936) 2023-10-24 14:09:27 +02:00
Sergio Garcia
2aa3126eb0 chore(regions_update): Changes in regions for AWS services. (#2961)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-10-24 11:37:17 +02:00
Sergio Garcia
4c5e85f7ba fix(sts): force v2 STS tokens (#2956) 2023-10-24 10:15:41 +02:00
dependabot[bot]
2b41da4543 build(deps-dev): bump vulture from 2.9.1 to 2.10 (#2960)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 09:46:34 +02:00
dependabot[bot]
f8dc88df6e build(deps): bump google-api-python-client from 2.102.0 to 2.104.0 (#2959)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 09:15:15 +02:00
dependabot[bot]
534033874e build(deps-dev): bump openapi-spec-validator from 0.6.0 to 0.7.1 (#2958)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 08:52:06 +02:00
dependabot[bot]
0851b923fd build(deps-dev): bump pylint from 3.0.1 to 3.0.2 (#2957)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 08:05:18 +02:00
Kay Agahd
fd4bed65a0 docs(v2_v3_mapping): document prowler v3.10.0 changes (#2955) 2023-10-23 15:23:17 +02:00
Nacho Rivera
4746b8b835 feat(report interface): add reporting interface call after report (#2948) 2023-10-23 09:06:51 +02:00
Sergio Garcia
d24eafe6a6 chore(regions_update): Changes in regions for AWS services. (#2954)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-10-23 07:37:54 +02:00
Sergio Garcia
f3b81edf67 fix(APIGateway): Improve check naming (#2952) 2023-10-20 08:07:08 +02:00
Sergio Garcia
976d0da26e fix(resource filters): add missing resource filters (#2951) 2023-10-19 18:18:58 +02:00
Sergio Garcia
5113b83bc4 chore(create_role_to_assume_cfn.yaml): Add DLM permissions (#2949) 2023-10-19 17:40:07 +02:00
Sergio Garcia
a88877bf7c chore(github): ignore permissions path in GitHub actions (#2950) 2023-10-19 17:37:35 +02:00
Jit
a46d7b2ed9 feat(aws): New Neptune, ElastiCache, APIGW and IAM checks (#2862) 2023-10-19 17:31:51 +02:00
Pepe Fagoaga
170241649d fix(ec2_securitygroup_not_used): Mock Lambda service (#2947) 2023-10-19 17:05:04 +02:00
Sergio Garcia
1ac22bddd6 fix(security group): check if security groups are used by Lambda (#2944) 2023-10-19 12:13:24 +02:00
Sergio Garcia
54fe10ae86 chore(permissions): add DLM permissions (#2946) 2023-10-19 11:45:41 +02:00
Sergio Garcia
33647786e6 chore(regions_update): Changes in regions for AWS services. (#2945)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-10-19 11:35:19 +02:00
Sergio Garcia
eb3cb97115 feat(vpc): add vpc, nacl or subnet names in findings (#2928) 2023-10-18 16:07:53 +02:00
Sergio Garcia
236f57ab0e chore(regions_update): Changes in regions for AWS services. (#2942)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-10-18 11:39:45 +02:00
Kay Agahd
c88054107e docs(config): add missing configurable variables (#2941) 2023-10-18 09:10:46 +02:00
dependabot[bot]
c03c7c35d8 build(deps): bump urllib3 from 1.26.17 to 1.26.18 (#2940) 2023-10-18 08:08:11 +02:00
Pepe Fagoaga
b5455215a5 fix(sqs): Handle AWS.SimpleQueueService.NonExistentQueue in list_queue_tags (#2939) 2023-10-17 20:45:22 +02:00
Jit
85e12e9479 feat(aws): New CloudTrail, DLM, DocumentDB, EC2, Account and Support checks (#2675)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-10-17 19:00:37 +02:00
Sergio Garcia
f3b7f841fb chore(regions_update): Changes in regions for AWS services. (#2937)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-10-17 15:55:38 +02:00
Sergio Garcia
92547bfdb6 fix(vpc): ignore com.amazonaws.vpce endpoints (#2929) 2023-10-17 11:14:12 +02:00
dependabot[bot]
3739801ed4 build(deps): bump shodan from 1.30.0 to 1.30.1 (#2935)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 11:03:52 +02:00
dependabot[bot]
a6778a6e27 build(deps-dev): bump moto from 4.2.5 to 4.2.6 (#2934)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 10:40:37 +02:00
dependabot[bot]
f1fc3c63ea build(deps): bump azure-identity from 1.14.0 to 1.14.1 (#2933)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 09:58:42 +02:00
dependabot[bot]
b2a80775a8 build(deps): bump mkdocs-material from 9.4.4 to 9.4.6 (#2932)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 08:48:21 +02:00
dependabot[bot]
1f7f68f6af build(deps): bump azure-storage-blob from 12.18.2 to 12.18.3 (#2931)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 08:25:28 +02:00
Pepe Fagoaga
388678f822 chore(docs): Add report.region criteria (#2930) 2023-10-16 14:50:11 +02:00
Sergio Garcia
1230a3323d chore(regions_update): Changes in regions for AWS services. (#2927)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-10-16 09:42:30 +02:00
Sergio Garcia
02a3c750f8 chore(release): update Prowler Version to 3.10.0 (#2926)
Co-authored-by: github-actions <noreply@github.com>
2023-10-11 17:56:14 +02:00
Nacho Rivera
cbdb9ce614 fix(Dockerfile): Update to python:3.11-alpine 2023-10-11 16:42:03 +02:00
dependabot[bot]
be98ea52d7 build(deps-dev): bump gitpython from 3.1.35 to 3.1.37 (#2924)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-11 09:46:41 +02:00
Sergio Garcia
b6cf63bb0c chore(regions_update): Changes in regions for AWS services. (#2923)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-10-10 18:55:45 +02:00
dependabot[bot]
04410033e7 build(deps-dev): bump pylint from 3.0.0 to 3.0.1 (#2920)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-10 18:55:28 +02:00
dependabot[bot]
e6c6df1334 build(deps): bump slack-sdk from 3.22.0 to 3.23.0 (#2919)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-10 16:35:44 +02:00
dependabot[bot]
91b06a4297 build(deps): bump google-api-python-client from 2.101.0 to 2.102.0 (#2918)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-10 15:52:07 +02:00
dependabot[bot]
640ad7bd60 build(deps): bump mkdocs-material from 9.4.3 to 9.4.4 (#2917)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-10 15:19:02 +02:00
Sergio Garcia
08b2ea01ab chore(iam): add IAM privilege escalation cases (#2921) 2023-10-10 12:41:02 +02:00
Nacho Rivera
236dea9d26 fix(pull-request.yml): launch linters when source code modified (#2922) 2023-10-10 12:14:24 +02:00
dependabot[bot]
f281f3791b build(deps): bump azure-storage-blob from 12.18.1 to 12.18.2 (#2916)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-10 08:02:45 +02:00
Pepe Fagoaga
aff2b80d55 docs(pull-request): Include check list to create/review PR (#2913) 2023-10-09 16:33:58 +02:00
Sergio Garcia
e69949c336 docs(misc): add option -z (#2914)
Co-authored-by: Nacho Rivera <nachor1992@gmail.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-10-09 16:33:49 +02:00
Nacho Rivera
5f7f36ecd4 fix(build-lint-push pipeline): pass pipeline when ignored files (#2915)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-10-09 15:45:16 +02:00
Sergio Garcia
9212478148 fix(cloudwatch): ignore new lines in filters (#2912) 2023-10-09 11:06:29 +02:00
Nacho Rivera
dec0ee1001 fix(pipeline): launch linters with file changes (#2911) 2023-10-06 11:41:58 +02:00
Sergio Garcia
e610c2514d feat(iam): improve disable credentials checks (#2909) 2023-10-06 11:41:04 +02:00
Sergio Garcia
3955450245 fix(securityhub): archive SecurityHub findings in empty regions (#2908) 2023-10-05 15:49:43 +02:00
Sergio Garcia
49a437dc0d chore(regions_update): Changes in regions for AWS services. (#2907)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-10-05 11:24:46 +02:00
Sergio Garcia
bf37be5013 chore(regions_update): Changes in regions for AWS services. (#2905)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-10-05 11:24:21 +02:00
Sergio Garcia
9793de1e96 fix(elb): add resource ARN to checks (#2906) 2023-10-04 12:37:15 +02:00
DevOpSpace
4c15318f28 feat(wafv2): Add check wafv2_webacl_logging_enabled (#2898)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-10-04 11:10:47 +02:00
Sergio Garcia
a4d3e78eb1 fix(acm): add certificate id (#2903) 2023-10-03 13:03:46 +02:00
Sergio Garcia
436166c255 chore(regions_update): Changes in regions for AWS services. (#2902)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-10-03 11:32:14 +02:00
Nacho Rivera
bbce2c5e35 fix(custom checks): fix import from s3 (#2901) 2023-10-03 11:31:55 +02:00
Sergio Garcia
0745a57f52 fix(findingID): remove duplicate finding IDs (#2890) 2023-10-03 11:31:33 +02:00
dependabot[bot]
9974c84440 build(deps-dev): bump coverage from 7.3.1 to 7.3.2 (#2895)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 10:34:52 +02:00
Nacho Rivera
3c396e76f6 fix(remove_custom_checks_module): delete service folder if empty (#2885) 2023-10-03 10:33:06 +02:00
Nacho Rivera
e701aca64b test(iam_credentials): Don't use search and negative indexes (#2899) 2023-10-03 09:54:53 +02:00
dependabot[bot]
26ad482b90 build(deps): bump mkdocs-material from 9.4.2 to 9.4.3 (#2894)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 09:54:16 +02:00
dependabot[bot]
d8fd3ef506 build(deps-dev): bump pylint from 2.17.6 to 3.0.0 (#2893)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 09:29:09 +02:00
dependabot[bot]
43016d75e8 build(deps-dev): bump moto from 4.2.4 to 4.2.5 (#2892)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 08:51:07 +02:00
Pepe Fagoaga
39b6ce3352 fix(dockerfile): Use latest curl (#2897) 2023-10-03 08:48:32 +02:00
dependabot[bot]
1e3ec10a1a build(deps): bump urllib3 from 1.26.15 to 1.26.17 (#2896)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 08:12:45 +02:00
dependabot[bot]
c4e13eef3f build(deps): bump pydantic from 1.10.12 to 1.10.13 (#2891)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 08:07:11 +02:00
Samuel Burgos
6558aedee3 feat(json-asff): adds AWS resource tags in json-asff and SecurityHub findings (#2786)
Co-authored-by: samuel.burgos <samuel.burgos@flywire.com>
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-10-02 18:20:35 +02:00
Sergio Garcia
a2dfb60466 test(vpc_peering_routing_tables_with_least_privilege): add test (#2889) 2023-10-02 17:22:11 +02:00
Nacho Rivera
c158dcf2ef fix(iam creds checks): add missing tests and fix current ones (#2888) 2023-10-02 16:27:44 +02:00
Sergio Garcia
40318b87bf fix(vpc_peering_routing_tables_with_least_privilege): check only peering routes (#2887) 2023-10-02 16:20:39 +02:00
Sergio Garcia
64f06b11b8 fix(version): add timeout and check HTTP errors (#2886) 2023-10-02 14:44:16 +02:00
Pepe Fagoaga
583194085c test(utils): Include missing tests (#2884) 2023-10-02 11:29:09 +02:00
Nacho Rivera
2d89f57644 fix(iam credentials checks): unify logic (#2883) 2023-10-02 11:28:26 +02:00
Nacho Rivera
f4ed01444a fix(ec2_elastic_ip_unassigned): rename check (#2882) 2023-10-02 10:34:46 +02:00
Pepe Fagoaga
a7980a202d fix(aws): Include missing ARNs (#2880) 2023-10-02 08:45:06 +02:00
JackStuart
3a6c93dd37 fix(azure): Typo in SQL check (#2881) 2023-10-02 08:21:00 +02:00
Pepe Fagoaga
6cd272da37 docs(developer-guide): fix typos (#2878) 2023-09-29 13:12:05 +02:00
Sergio Garcia
a7056b66c7 chore(regions_update): Changes in regions for AWS services. (#2879)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-09-29 11:34:41 +02:00
Pepe Fagoaga
4d6d58ef91 fix(autoscaling_find_secrets_ec2_launch_configuration): Fix UnicodeDecodeError (#2870) 2023-09-28 17:13:17 +02:00
Sergio Garcia
93a88ec2c7 chore(regions_update): Changes in regions for AWS services. (#2875)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-09-28 11:43:51 +02:00
Pepe Fagoaga
b679df4fbe docs(aws): Move regions and profiles to AWS (#2874) 2023-09-27 23:23:31 +02:00
Sergio Garcia
ba2c7347f9 chore(regions_update): Changes in regions for AWS services. (#2873)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-09-27 11:35:14 +02:00
Pepe Fagoaga
f8b4e6e8f0 fix(iam): Handle NoSuchEntity when calling list_role_policies (#2872) 2023-09-27 09:37:07 +02:00
Pepe Fagoaga
7ecb4d7b00 fix(s3_bucket_policy_public_write_access): Handle S3 Policy without Principal (#2871) 2023-09-27 09:35:26 +02:00
Pepe Fagoaga
1697e6ad62 fix(outputs_unix_timestamp): Remove subsecond (#2861) 2023-09-26 16:02:52 +02:00
Pepe Fagoaga
6687f76736 refactor(security_hub): Send findings in batches (#2868)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-09-26 14:10:25 +02:00
Sergio Garcia
35e5bbdaf1 chore(regions_update): Changes in regions for AWS services. (#2869)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-09-26 12:42:48 +02:00
dependabot[bot]
5c5e7d9509 build(deps): bump google-api-python-client from 2.99.0 to 2.101.0 (#2867)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-26 11:38:34 +02:00
dependabot[bot]
b0c0a9d98c build(deps-dev): bump moto from 4.2.3 to 4.2.4 (#2866)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-26 10:28:34 +02:00
dependabot[bot]
7c246f7be4 build(deps-dev): bump pylint from 2.17.5 to 2.17.6 (#2865) 2023-09-26 10:02:58 +02:00
dependabot[bot]
bfc2a41699 build(deps): bump mkdocs-material from 9.3.1 to 9.4.2 (#2864)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-26 09:22:31 +02:00
Sergio Garcia
081a7ead4c chore(regions_update): Changes in regions for AWS services. (#2863) 2023-09-23 19:14:46 +02:00
Sergio Garcia
70fbf1676a fix(iam_inline_policy_no_administrative_privileges): set resource id as the entity name (#2820) 2023-09-22 12:59:10 +02:00
Pepe Fagoaga
87ddb6b171 fix(apigw): KeyError name (#2858) 2023-09-22 11:23:37 +02:00
Pepe Fagoaga
c0d45d730f fix(elbv2): Handle LoadBalancerNotFound (#2860) 2023-09-22 11:23:21 +02:00
Fennerr
6b97a04643 fix(eks_control_plane_endpoint_access_restricted): handle endpoint private access (#2824)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-09-22 11:22:56 +02:00
Pepe Fagoaga
2a5a07bae0 fix(ds): GetSnapshotLimits for MicrosoftAD (#2859) 2023-09-22 11:22:42 +02:00
Pepe Fagoaga
18e34c670e fix(iam): Handle NoSuchEntityException in ListRolePolicies (#2857) 2023-09-22 11:21:33 +02:00
Fennerr
d6a35485d2 fix(sqs_queues_not_publicly_accessible): Improve status extended (#2848)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-09-22 11:20:59 +02:00
Fennerr
6204f6cdc8 fix(eks_endpoints_not_publicly_accessible): handle endpoint private access (#2825)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-09-22 11:19:56 +02:00
dependabot[bot]
50bc5309f5 build(deps): bump cryptography from 41.0.3 to 41.0.4 (#2856)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-22 09:47:08 +02:00
Sergio Garcia
725e2e92ab chore(regions_update): Changes in regions for AWS services. (#2853)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-09-20 11:42:21 +02:00
Sergio Garcia
0b07326e36 chore(regions_update): Changes in regions for AWS services. (#2852)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-09-20 00:03:41 +02:00
dependabot[bot]
e86d194f11 build(deps-dev): bump moto from 4.2.2 to 4.2.3 (#2851)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-09-19 13:38:39 +02:00
dependabot[bot]
6949656d0e build(deps): bump azure-storage-blob from 12.18.0 to 12.18.1 (#2850)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 11:36:27 +02:00
dependabot[bot]
a2c62bab47 build(deps): bump mkdocs from 1.5.2 to 1.5.3 (#2849)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 09:33:05 +02:00
Kay Agahd
3dd8aeac7c fix(iam): findings of some checks may have been lost (#2847) 2023-09-18 10:46:04 +02:00
Sergio Garcia
2c342a5c5f chore(regions_update): Changes in regions for AWS services. (#2846) 2023-09-17 09:37:05 +02:00
Sergio Garcia
adef1afdfa chore(regions_update): Changes in regions for AWS services. (#2845)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-09-15 11:36:56 +02:00
Pepe Fagoaga
a980b2606b fix(cloudtrail_s3_dataevents_read/write_enabled): Handle S3 ARN (#2844) 2023-09-15 11:36:40 +02:00
Sergio Garcia
ed83927486 fix(vpc): solves CidrBlock KeyError (#2817) 2023-09-15 10:41:05 +02:00
Tayler Haviland
e745885b09 fix(ebs): improve snapshot encryption logic and typos (#2836)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2023-09-15 10:37:34 +02:00
Sergio Garcia
16ddbfde9f chore(regions_update): Changes in regions for AWS services. (#2842)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-09-14 12:03:59 +02:00
dependabot[bot]
bc11537350 build(deps): bump mkdocs-material from 9.2.1 to 9.3.1 (#2839) 2023-09-13 17:44:06 +02:00
Sergio Garcia
ab4de79168 chore(regions_update): Changes in regions for AWS services. (#2833) 2023-09-13 17:15:52 +02:00
Sergio Garcia
8134897e91 chore(regions_update): Changes in regions for AWS services. (#2819) 2023-09-13 17:14:57 +02:00
Sergio Garcia
693d22ed25 chore(regions_update): Changes in regions for AWS services. (#2821) 2023-09-13 17:14:14 +02:00
dependabot[bot]
b1dab2466f build(deps): bump azure-storage-blob from 12.17.0 to 12.18.0 (#2838)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 17:03:03 +02:00
dependabot[bot]
d2b09f39e7 build(deps): bump google-api-python-client from 2.97.0 to 2.99.0 (#2837)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 16:24:40 +02:00
Cameron Stark
4475801a96 fix(storage_ensure_minimum_tls_version_12): misspelling in metadata (#2835) 2023-09-13 13:02:07 +02:00
dependabot[bot]
126ff8cf0d build(deps): bump slack-sdk from 3.21.3 to 3.22.0 (#2832)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 13:01:55 +02:00
dependabot[bot]
a536a785de build(deps-dev): bump gitpython from 3.1.34 to 3.1.35 (#2831)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 12:51:15 +02:00
dependabot[bot]
ed89ef74eb build(deps-dev): bump coverage from 7.3.0 to 7.3.1 (#2828)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 12:42:13 +02:00
Kay Agahd
f1bea27e44 feat(iam): add new check iam_role_administratoraccess_policy (#2822) 2023-09-12 09:19:20 +02:00
dependabot[bot]
7305e53439 build(deps-dev): bump pytest from 7.4.1 to 7.4.2 (#2827)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-12 09:11:58 +02:00
dependabot[bot]
b08c0e8150 build(deps): bump google-auth-httplib2 from 0.1.0 to 0.1.1 (#2826)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-12 09:11:34 +02:00
Nacho Rivera
8606a4579a fix(pre-commit): add file filter to python linters (#2818) 2023-09-08 08:29:55 +02:00
Nacho Rivera
1dfb72a1d1 feat(unix timestamp): add the --unix-timestamp flag to docs (#2816) 2023-09-07 10:33:58 +02:00
Sergio Garcia
f09b55b893 chore(regions_update): Changes in regions for AWS services. (#2814)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-09-07 09:15:19 +02:00
Nacho Rivera
30ba6029f5 feat(unix timestamp): add unix timestamp to outputs (#2813) 2023-09-07 09:14:02 +02:00
dependabot[bot]
9f0c830511 build(deps-dev): bump gitpython from 3.1.32 to 3.1.34 (#2815)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-07 08:44:03 +02:00
Nacho Rivera
973e3138fe feat(Dockerfile): add curl package to docker image (#2812) 2023-09-05 15:21:46 +02:00
Nacho Rivera
c996a562e6 fix(3.9.0): update pyproject.toml to latest release (#2811) 2023-09-05 15:21:33 +02:00
dependabot[bot]
f2bba4d1ee build(deps-dev): bump moto from 4.2.0 to 4.2.2 (#2809)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 13:38:17 +02:00
dependabot[bot]
8017a95413 build(deps-dev): bump pytest from 7.4.0 to 7.4.1 (#2808)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 13:02:17 +02:00
Nacho Rivera
26d209daff fix(testing docs): fix testing docs typos and syntax (#2803) 2023-09-05 13:01:35 +02:00
Nacho Rivera
44b979b4a4 fix(ec2_instance_..._ssm): mock ssm service and client in all the tests (#2804) 2023-09-05 12:34:02 +02:00
Kay Agahd
03ad61abc6 iam_policy_no_administrative_privileges does not exist and maps not to check122 (#2797) 2023-09-04 10:23:48 +02:00
Sergio Garcia
fe425f89a4 chore(regions_update): Changes in regions for AWS services. (#2802)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-09-04 10:23:06 +02:00
Nacho Rivera
11ad66fb79 feat(ec2_instance_managed_by_ssm): missing tests (#2800) 2023-09-04 10:22:43 +02:00
Sergio Garcia
ca5734a2c6 chore(regions_update): Changes in regions for AWS services. (#2801)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-09-01 12:55:50 +02:00
Nacho Rivera
e5414e87c7 fix(ec2 nacl checks):unify logic (#2799) 2023-09-01 12:55:29 +02:00
Sergio Garcia
8142f8f62f chore(regions_update): Changes in regions for AWS services. (#2794)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-09-01 12:24:56 +02:00
Nacho Rivera
74cf4076fa fix(apikeys_..._90_days): fix key creation time with dinamic date (#2798) 2023-09-01 12:18:55 +02:00
Nacho Rivera
dbd29c0ce1 fix(ec2 tests): add region and delete search sg checks (#2788) 2023-08-31 11:55:30 +02:00
Nacho Rivera
38a7dc1a93 fix(ec2 ebs/instance checks): unify checks logic (#2795) 2023-08-31 11:55:10 +02:00
Nacho Rivera
2891bc0b96 fix(policy_condition_parser): add StringEquals aws:SourceArn condition (#2793) 2023-08-31 11:54:48 +02:00
dependabot[bot]
8846ae6664 build(deps-dev): bump moto from 4.1.15 to 4.2.0 (#2783)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-31 10:29:00 +02:00
Nacho Rivera
2e3c3a55aa fix(html): unroll regions set prior concat (#2790) 2023-08-30 16:38:56 +02:00
Nacho Rivera
7e44116d51 fix(is_valid_arn): include . into resource name (#2789) 2023-08-30 16:11:46 +02:00
Nacho Rivera
46f85e6395 fix(ec2 tests): add tags and region non sg checks (#2781) 2023-08-30 16:10:27 +02:00
Sergio Garcia
94a384fd81 chore(regions_update): Changes in regions for AWS services. (#2791)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-08-30 12:48:25 +02:00
Sergio Garcia
af6acefb53 chore(regions_update): Changes in regions for AWS services. (#2787)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-08-29 11:21:39 +02:00
Sergio Garcia
94fd7d252f chore(regions_update): Changes in regions for AWS services. (#2779)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-08-29 11:21:13 +02:00
dependabot[bot]
4767e38f5b build(deps-dev): bump vulture from 2.8 to 2.9.1 (#2785)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-29 09:58:55 +02:00
Nacho Rivera
276f6f9fb1 fix(ec2_securitygroup_default_restrict_traffic): fix check only allow empty rules (#2777) 2023-08-25 12:42:26 +02:00
Sergio Garcia
2386c71c4f chore(regions_update): Changes in regions for AWS services. (#2776)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-08-25 11:24:43 +02:00
Pepe Fagoaga
21c52db66b test(vpc_endpoint_services_allowed_principals_trust_boundaries) (#2768) 2023-08-25 10:56:47 +02:00
Pepe Fagoaga
13cfa02f80 fix(test): Update moto to 4.1.15 and update tests (#2769) 2023-08-25 10:56:39 +02:00
Pepe Fagoaga
eedfbe3e7a fix(iam_policy_allows_privilege_escalation): Not use search for checking API actions (#2772) 2023-08-25 10:56:28 +02:00
Pepe Fagoaga
fe03eb4436 docs: explain output formats (#2774) 2023-08-25 10:56:15 +02:00
Pepe Fagoaga
d8e45d5c3f docs: Include new config ecr_repository_vulnerability_minimum_severity (#2775) 2023-08-25 10:56:04 +02:00
Sergio Garcia
12e9fb5eeb chore(regions_update): Changes in regions for AWS services. (#2773)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-08-24 12:07:05 +02:00
gerardocampo
957ffaabae feat(compliance): Update AWS compliance frameworks after PR 2750 (#2771)
Co-authored-by: Gerard Ocampo <gerard.ocampo@zelis.com>
2023-08-24 08:01:00 +02:00
Pepe Fagoaga
cb76e5a23c chore(s3): Move lib to the AWS provider and include tests (#2664) 2023-08-23 16:12:48 +02:00
Sergio Garcia
b17cc563ff chore(regions_update): Changes in regions for AWS services. (#2767)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-08-23 11:29:12 +02:00
Pepe Fagoaga
06a0b12efb fix(iam_policy_allows_privilege_escalation): Handle admin permission so * (#2763) 2023-08-23 10:40:06 +02:00
Pepe Fagoaga
d5bd5ebb7d chore(parser): Move provider logic to their folder (#2746) 2023-08-23 10:33:36 +02:00
Nacho Rivera
0a9a1c26db fix(get_regions_from_audit_resources): fix logic and add tests (#2766) 2023-08-23 10:20:12 +02:00
Nacho Rivera
83bfd8a2d4 fix(get_checks_from_input_arn): fix logic and add tests (#2764) 2023-08-23 09:35:42 +02:00
gerardocampo
e5d2c0c700 feat(iam): Check inline policies in IAM Users, Groups & Roles for admin priv's (#2750)
Co-authored-by: Gerard Ocampo <gerard.ocampo@zelis.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-08-23 08:29:13 +02:00
Pepe Fagoaga
590a5669d6 fix(nacls): Tests (#2760) 2023-08-22 22:26:19 +02:00
Sergio Garcia
e042740f67 chore(regions_update): Changes in regions for AWS services. (#2759)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-08-22 11:43:58 +02:00
dependabot[bot]
dab2ecaa6b build(deps): bump shodan from 1.29.1 to 1.30.0 (#2754)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-22 09:16:08 +02:00
dependabot[bot]
f9f4133b48 build(deps): bump azure-mgmt-storage from 21.0.0 to 21.1.0 (#2756)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-22 08:49:06 +02:00
dependabot[bot]
33dd21897d build(deps-dev): bump pytest-randomly from 3.13.0 to 3.15.0 (#2755)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-22 08:30:07 +02:00
Geoff Singer
cb2ef23a29 feat(s3): Add S3 KMS encryption check (#2757)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-08-22 08:28:17 +02:00
dependabot[bot]
e70e01196f build(deps): bump google-api-python-client from 2.96.0 to 2.97.0 (#2753)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-22 08:08:13 +02:00
dependabot[bot]
f70b9e6eb4 build(deps): bump mkdocs-material from 9.1.21 to 9.2.1 (#2752)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-22 07:39:45 +02:00
Chris Farris
d186c69473 feat(checks): dump all checks as a json file (#2683)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-08-21 17:35:31 +02:00
Nacho Rivera
4d817c48a8 fix(get_checks_from_input_arn): fix function and add tests (#2749) 2023-08-21 13:23:43 +02:00
Pepe Fagoaga
c13cab792b docs(testing): Mocking the service and the service client at the service client level (#2747) 2023-08-21 09:05:57 +02:00
Pepe Fagoaga
80aa463aa2 fix(checks_to_execute): --checks and --resource_arn working together (#2743) 2023-08-21 09:04:15 +02:00
Sergio Garcia
bd28b17ad9 chore(regions_update): Changes in regions for AWS services. (#2748)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-08-21 08:15:25 +02:00
Sergio Garcia
223119e303 chore(regions_update): Changes in regions for AWS services. (#2744)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-08-18 12:38:17 +02:00
Pepe Fagoaga
7c45cb45ae feat(ecr_repositories_scan_vulnerabilities_in_latest_image): Minimum severity is configurable (#2736) 2023-08-18 09:17:02 +02:00
Pepe Fagoaga
ac11c6729b chore(tests): Replace sure with standard assert (#2738) 2023-08-17 11:36:45 +02:00
Pepe Fagoaga
1677654dea docs(audit_config): How to use it (#2739) 2023-08-17 11:36:32 +02:00
Pepe Fagoaga
bc5a7a961b tests(check_security_group) (#2740) 2023-08-17 11:36:17 +02:00
Sergio Garcia
c10462223d chore(regions_update): Changes in regions for AWS services. (#2741)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-08-17 11:31:31 +02:00
vysakh-devopspace
54a9f412e8 feat(ec2): New check ec2_instance_detailed_monitoring_enabled (#2735)
Co-authored-by: Vysakh <venugopal.vysakh@gmail.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-08-16 14:31:06 +02:00
Sergio Garcia
5a107c58bb chore(regions_update): Changes in regions for AWS services. (#2737)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-08-16 11:42:47 +02:00
Pepe Fagoaga
8f091e7548 fix(gcp): Status extended ends with a dot (#2734) 2023-08-16 10:14:41 +02:00
Pepe Fagoaga
8cdc7b18c7 fix(test-vpc): use the right import paths (#2732) 2023-08-16 09:17:18 +02:00
christiandavilakoobin
9f2e87e9fb fix(is_account_only_allowed_in_condition): Context name on conditions are case-insensitive (#2726) 2023-08-16 08:27:24 +02:00
Sergio Garcia
e119458048 chore(regions_update): Changes in regions for AWS services. (#2733)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-08-15 16:25:17 +02:00
dependabot[bot]
c2983faf1d build(deps): bump azure-identity from 1.13.0 to 1.14.0 (#2731)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-15 10:34:56 +02:00
dependabot[bot]
a09855207e build(deps-dev): bump coverage from 7.2.7 to 7.3.0 (#2730)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-15 09:50:18 +02:00
Pepe Fagoaga
1e1859ba6f docs(style): Add more details (#2724) 2023-08-15 09:26:48 +02:00
dependabot[bot]
a3937e48a8 build(deps): bump google-api-python-client from 2.95.0 to 2.96.0 (#2729)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-15 09:22:59 +02:00
dependabot[bot]
d2aa53a2ec build(deps): bump mkdocs-material from 9.1.20 to 9.1.21 (#2728)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-15 08:57:24 +02:00
dependabot[bot]
b0bdeea60f build(deps-dev): bump vulture from 2.7 to 2.8 (#2727) 2023-08-15 08:33:27 +02:00
Pepe Fagoaga
465e64b9ac fix(azure): Status extended ends with a dot (#2725) 2023-08-14 21:48:16 +02:00
Pepe Fagoaga
fc53b28997 test(s3): Mock S3Control when used (#2722) 2023-08-14 21:48:05 +02:00
Pepe Fagoaga
72e701a4b5 fix(security): GitPython issue (#2720) 2023-08-14 21:09:12 +02:00
Pepe Fagoaga
2298d5356d test(coverage): Add Codecov (#2719) 2023-08-14 21:08:45 +02:00
Pepe Fagoaga
54137be92b test(python): 3.9, 3.10, 3.11 (#2718) 2023-08-14 21:08:29 +02:00
Sergio Garcia
7ffb12268d chore(release): update Prowler Version to 3.8.2 (#2721)
Co-authored-by: github-actions <noreply@github.com>
2023-08-14 09:18:23 +02:00
Sergio Garcia
790fff460a chore(regions_update): Changes in regions for AWS services. (#2717)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-08-14 08:13:10 +02:00
Chris Farris
9055dbafe3 fix(s3_bucket_policy_public_write_access): look at account and bucket-level public access block settings (#2715) 2023-08-12 01:46:24 +02:00
Pepe Fagoaga
4454d9115e chore(aws): 2nd round - Improve tests and include dot in status extended (#2714) 2023-08-12 01:41:35 +02:00
Sergio Garcia
0d74dec446 chore(regions_update): Changes in regions for AWS services. (#2712)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-08-11 11:18:18 +02:00
Pepe Fagoaga
0313dba7b4 chore(aws): Improve tests and status from accessanalyzer to cloudwatch (#2711) 2023-08-11 11:04:04 +02:00
Pepe Fagoaga
3fafac75ef docs(dev-guide): Fix a list and include some details to use the report (#2710) 2023-08-11 11:01:58 +02:00
Sergio Garcia
6b24b46f3d fix(security-hub): handle default output filename error (#2709) 2023-08-11 09:12:25 +02:00
Pepe Fagoaga
474e39a4c9 docs(developer-guide): Update checks, services and include testing (#2705)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-08-10 17:28:35 +02:00
Sergio Garcia
e652298b6a chore(release): update Prowler Version to 3.8.1 (#2706)
Co-authored-by: github-actions <noreply@github.com>
2023-08-10 14:08:48 +02:00
Pepe Fagoaga
9340ae43f3 fix(ds): Restore enums without optional (#2704) 2023-08-10 13:43:31 +02:00
Sergio Garcia
552024c53e fix(Enum): handle Enum classes correctly (#2702) 2023-08-10 13:21:24 +02:00
Pepe Fagoaga
3aba71ad2f docs(aws-orgs): Update syntax (#2703) 2023-08-10 12:40:17 +02:00
christiandavilakoobin
ade511df28 fix(sns): allow default SNS policy with SourceOwner (#2698)
Co-authored-by: Azure Pipeplines CI <monitor@koobin.com>
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-08-10 12:13:57 +02:00
Sergio Garcia
fc650214d4 fix(security hub): include custom output filename in resolve_security_hub_previous_findings (#2687) 2023-08-10 12:11:10 +02:00
Sergio Garcia
8266fd0c6f chore(print): prettify prints of listings and logs (#2699) 2023-08-10 12:08:07 +02:00
Pepe Fagoaga
f4308032c3 fix(cloudfront): fix ViewerProtocolPolicy and GeoRestrictionType (#2701) 2023-08-10 12:02:49 +02:00
Sergio Garcia
1e1f445ade chore(regions_update): Changes in regions for AWS services. (#2700)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-08-10 11:29:05 +02:00
Pepe Fagoaga
d41b0332ac feat(athena): New AWS Athena service + 2 workgroup checks (#2696) 2023-08-10 10:23:17 +02:00
Pepe Fagoaga
7258466572 fix(iam): password policy expiration (#2694) 2023-08-10 10:10:20 +02:00
Pepe Fagoaga
76db92ea14 chore(service): service class type hints (#2695) 2023-08-10 10:01:54 +02:00
Sergio Garcia
ad3cd66e08 docs(organizations): fix script and improve titles (#2693) 2023-08-10 09:56:47 +02:00
Sergio Garcia
22f8855ad7 chore(regions_update): Changes in regions for AWS services. (#2692)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-08-09 11:23:28 +02:00
Sergio Garcia
36e095c830 fix(iam_role_cross_service_confused_deputy_prevention): add ResourceAccount and PrincipalAccount conditions (#2689) 2023-08-09 10:41:48 +02:00
Sergio Garcia
887cac1264 fix(typo): spelling typo in organizations_scp_check_deny_regions (#2691) 2023-08-09 10:24:29 +02:00
Pepe Fagoaga
13059e0568 fix(ec2-securitygroups): Handle IPv6 public (#2690) 2023-08-09 10:08:30 +02:00
Pepe Fagoaga
9e8023d716 fix(config): Pass a configuration file using --config-file config.yaml (#2679) 2023-08-09 09:52:45 +02:00
Sergio Garcia
c54ba5fd8c chore(regions_update): Changes in regions for AWS services. (#2688)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-08-09 09:34:52 +02:00
dependabot[bot]
db80e063d4 build(deps-dev): bump pylint from 2.17.4 to 2.17.5 (#2685)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-08 10:48:42 +02:00
dependabot[bot]
b6aa12706a build(deps): bump mkdocs from 1.4.3 to 1.5.2 (#2684)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-08 10:22:20 +02:00
Chris Farris
c1caf6717d fix(organizations): request Organization Info after assume_role occurs (#2682)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-08-07 15:17:05 +02:00
Pepe Fagoaga
513fd9f532 fix(iam-dynamodb): Handle errors (#2680) 2023-08-07 10:04:19 +02:00
Pepe Fagoaga
bf77f817cb chore(azure): Improve AzureService class with __set_clients__ (#2676) 2023-08-04 13:04:05 +02:00
Sergio Garcia
e0bfef2ece chore(regions_update): Changes in regions for AWS services. (#2677)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-08-04 12:10:19 +02:00
Sergio Garcia
4a87f908a8 chore(release): update Prowler Version to 3.8.0 (#2674)
Co-authored-by: github-actions <noreply@github.com>
2023-08-03 18:34:23 +02:00
Sergio Garcia
16d95e5155 chore(readme): update providers summary table (#2673) 2023-08-03 16:45:09 +02:00
Pepe Fagoaga
1797b54259 test(azure): Storage Service (#2672) 2023-08-03 15:07:17 +02:00
Pepe Fagoaga
f289c8fb2e test(azure): SQL Server Service (#2671) 2023-08-03 14:43:18 +02:00
Pepe Fagoaga
e4ad881a69 test(azure): IAM service (#2670) 2023-08-03 14:15:34 +02:00
Pepe Fagoaga
138bca38e7 test(azure): Defender service (#2669) 2023-08-03 13:52:55 +02:00
edurra
44f7af3580 feat(azure): add Azure SQL Server service and 3 checks (#2665)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-08-03 11:29:17 +02:00
Sergio Garcia
2d832bca15 feat(gcp): Improve gcp performance (#2662) 2023-08-03 10:52:52 +02:00
Pepe Fagoaga
efa75a62e3 fix(iam_policy_allows_privilege_escalation): Handle permissions in groups (#2655) 2023-08-03 10:40:51 +02:00
Pepe Fagoaga
5763bca317 refactor(vpc_endpoint_connections_trust_boundaries) (#2667) 2023-08-03 09:56:09 +02:00
Pepe Fagoaga
c335334402 fix(test_only_aws_service_linked_roles): Flaky test (#2666) 2023-08-03 09:18:06 +02:00
Pepe Fagoaga
5bf3f70717 fix(vpc_endpoint_connections_trust_boundaries): Handle AWS Account ID as Principal (#2611) 2023-08-03 09:16:58 +02:00
Pepe Fagoaga
92c8a440ea feat(gcp): Add internet-exposed and encryption categories (#2663) 2023-08-02 15:53:12 +02:00
Pepe Fagoaga
b92d8a014c fix(cryptography): Update to 41.0.3 (#2661) 2023-08-02 11:47:51 +02:00
Sergio Garcia
aced44f051 fix(sns): handle topic policy conditions (#2660) 2023-08-02 11:45:27 +02:00
Sergio Garcia
49c9d2b077 chore(regions_update): Changes in regions for AWS services. (#2658) 2023-08-02 11:32:11 +02:00
Pepe Fagoaga
61beacf085 fix(docs): Azure auth and Slack integration (#2659) 2023-08-02 11:18:45 +02:00
Pepe Fagoaga
02f432238e fix(outputs): Not use reserved keyword list as variable (#2657) 2023-08-02 09:00:04 +02:00
Sergio Garcia
864d178e01 chore(regions_update): Changes in regions for AWS services. (#2654)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-08-01 11:52:02 +02:00
Sergio Garcia
78f0b823a9 fix(s3_bucket_level_public_access_block): check s3 public access block at account level (#2653) 2023-08-01 11:24:58 +02:00
dependabot[bot]
26cdc7a0ee build(deps-dev): bump flake8 from 6.0.0 to 6.1.0 (#2651)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-08-01 10:59:58 +02:00
dependabot[bot]
5e773f1eee build(deps): bump azure-mgmt-authorization from 3.0.0 to 4.0.0 (#2652)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-01 10:18:56 +02:00
dependabot[bot]
4a7ac7df22 build(deps-dev): bump moto from 4.1.13 to 4.1.14 (#2650)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-01 10:03:03 +02:00
dependabot[bot]
5250670d5d build(deps): bump google-api-python-client from 2.94.0 to 2.95.0 (#2649)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-01 09:49:51 +02:00
Gabriel Pragin
de4a825db8 fix(metadata): Typos (#2646) 2023-08-01 09:07:23 +02:00
dependabot[bot]
c256419144 build(deps): bump mkdocs-material from 9.1.19 to 9.1.20 (#2648) 2023-08-01 08:58:32 +02:00
Pepe Fagoaga
7bdca0420e fix(cloudtrail): Set status to INFO when trail is outside the audited account (#2643) 2023-07-31 17:50:21 +02:00
Pepe Fagoaga
3aa1fbced9 feat(azure_service): New parent class (#2642) 2023-07-31 16:03:49 +02:00
Pepe Fagoaga
dbbb70027a feat(gcp_service): Parent class (#2641) 2023-07-31 15:01:25 +02:00
Pepe Fagoaga
b4e78d28f8 fix(test): mock VPC client (#2640) 2023-07-31 11:19:15 +02:00
Pepe Fagoaga
e3d4e38a59 feat(aws): New AWSService class as parent (#2638) 2023-07-31 11:18:54 +02:00
Pepe Fagoaga
386f558eae fix(ec2_instance_secrets_user_data): Include line numbers in status (#2639) 2023-07-31 10:33:34 +02:00
Sergio Garcia
e08424d3a3 chore(regions_update): Changes in regions for AWS services. (#2637)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-07-31 09:54:44 +02:00
Chris Farris
03ad403e7a feat(s3): Add checks for publicly listable Buckets or writable buckets by ACL (#2628)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-07-31 08:35:18 +02:00
Sergio Garcia
4a674aae99 chore(regions_update): Changes in regions for AWS services. (#2634)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-07-28 11:34:30 +02:00
Pepe Fagoaga
8ee3744027 chore(security-hub): Explain Unique ID (#2631) 2023-07-27 13:39:12 +02:00
Gabriel Pragin
965327e801 chore(typos): Update check's status (#2629)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-07-27 11:44:09 +02:00
Sergio Garcia
f82ea43324 chore(regions_update): Changes in regions for AWS services. (#2630)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-07-27 11:31:45 +02:00
Pepe Fagoaga
a5c63845b4 test: security groups (#2627) 2023-07-26 16:29:27 +02:00
Sergio Garcia
034faa72cf chore(release): update Prowler Version to 3.7.2 (#2625)
Co-authored-by: github-actions <noreply@github.com>
2023-07-26 13:37:31 +02:00
Sergio Garcia
9bcd617964 chore(ec2): add SG name to resource_details (#2495) 2023-07-26 13:12:36 +02:00
Sergio Garcia
0db975dc7b fix(pypi-release): solve GH action for release (#2624) 2023-07-26 13:03:34 +02:00
Pepe Fagoaga
a51fa7703b fix(security): certifi issue (#2623) 2023-07-26 12:45:07 +02:00
Sergio Garcia
69fad0009d fix(ec2_ami_public): correct check metadata and logic (#2618) 2023-07-26 10:34:04 +02:00
Sergio Garcia
e721251936 fix(compute): solve key errors in compute service (#2610) 2023-07-26 08:49:09 +02:00
Pepe Fagoaga
2fe767e3e5 fix(ecs_task_def_secrets): Improve description to explain findings (#2621) 2023-07-25 18:26:22 +02:00
Sergio Garcia
6328ef4444 fix(guardduty): handle disabled detectors in guardduty_is_enabled (#2616) 2023-07-25 12:26:37 +02:00
dependabot[bot]
50b8e084e7 build(deps): bump google-api-python-client from 2.93.0 to 2.94.0 (#2614)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-25 09:37:10 +02:00
dependabot[bot]
3d88544feb build(deps): bump mkdocs-material from 9.1.18 to 9.1.19 (#2615)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-25 09:10:01 +02:00
dependabot[bot]
62e602c32e build(deps): bump pydantic from 1.10.11 to 1.10.12 (#2613)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-25 08:55:43 +02:00
Pepe Fagoaga
47a82560ea fix(s3): __get_object_lock_configuration__ warning logs (#2608) 2023-07-24 10:49:50 +02:00
Pepe Fagoaga
f7bbcc98b3 docs(boto3-configuration): format list (#2609) 2023-07-24 10:47:55 +02:00
Sergio Garcia
98a587aa15 chore(regions_update): Changes in regions for AWS services. (#2606)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-07-23 18:30:30 +02:00
Sergio Garcia
d2e34c42fd chore(regions_update): Changes in regions for AWS services. (#2599) 2023-07-18 17:38:43 +02:00
dependabot[bot]
605b07901e build(deps): bump google-api-python-client from 2.92.0 to 2.93.0 (#2597)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-18 10:52:26 +02:00
dependabot[bot]
18f02fac68 build(deps-dev): bump moto from 4.1.12 to 4.1.13 (#2598)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-07-18 10:37:34 +02:00
Pepe Fagoaga
28ea37f367 test(aws_provider): Role and User MFA (#2486) 2023-07-18 09:36:37 +02:00
Gabriel Pragin
65a737bb58 chore(metadata): Typos (#2595)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-07-18 09:27:58 +02:00
dependabot[bot]
7423cd2f93 build(deps): bump azure-storage-blob from 12.16.0 to 12.17.0 (#2596)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-18 09:25:51 +02:00
Gabriel Pragin
babd026351 chore(metadata): Typos (#2594) 2023-07-17 22:28:24 +02:00
Sergio Garcia
dd6e5a9029 fix(security): solve dependabot security alert (#2592) 2023-07-17 12:03:35 +02:00
Pepe Fagoaga
02519a4429 fix(assume_role): Set the AWS STS endpoint region (#2587) 2023-07-17 10:09:48 +02:00
Pepe Fagoaga
6575121b7a fix(ssm_incidents): Handle empty name (#2591) 2023-07-17 09:20:44 +02:00
Pepe Fagoaga
5b66368f0d fix(opensearch): log exception as WARNING (#2581) 2023-07-17 09:18:42 +02:00
Sergio Garcia
971c6720e4 chore(regions_update): Changes in regions for AWS services. (#2590) 2023-07-16 21:56:21 +02:00
Sergio Garcia
3afccc279f chore(regions_update): Changes in regions for AWS services. (#2588)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-07-14 11:34:21 +02:00
Nacho Rivera
8f015d0672 fix(allowlist): single account checks handling (#2585)
Co-authored-by: thomscode <thomscode@gmail.com>
2023-07-14 09:55:27 +02:00
Pepe Fagoaga
f33b96861c release: v3.7.1 (#2578) 2023-07-13 16:48:18 +02:00
Sergio Garcia
9832ce2ff9 chore(regions_update): Changes in regions for AWS services. (#2580)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-07-13 12:34:16 +02:00
Kay Agahd
490cbbaa48 docs: typos in README.md (#2579) 2023-07-13 07:34:27 +02:00
Nacho Rivera
d1c91093e2 feat(cond parser): add policy cond parser & apply in sqs public check (#2575) 2023-07-12 15:39:01 +02:00
Nacho Rivera
66fe101ccd fix(allowlist): handle wildcard in account field (#2577) 2023-07-12 14:22:42 +02:00
Pepe Fagoaga
7ab8c6b154 fix(iam): Handle NoSuchEntityException when calling list_attached_role_policies (#2571) 2023-07-12 12:48:57 +02:00
Sergio Garcia
73017b14c3 chore(regions_update): Changes in regions for AWS services. (#2574)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-07-12 11:17:00 +02:00
Sergio Garcia
f55495cd6a chore(regions_update): Changes in regions for AWS services. (#2572)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-07-11 11:45:43 +02:00
dependabot[bot]
e97146b5a3 build(deps): bump google-api-python-client from 2.91.0 to 2.92.0 (#2570)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-11 11:45:21 +02:00
dependabot[bot]
58f056c76d build(deps-dev): bump openapi-spec-validator from 0.5.7 to 0.6.0 (#2569)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-11 11:16:23 +02:00
dependabot[bot]
338bbc7a1f build(deps): bump pydantic from 1.10.9 to 1.10.11 (#2568)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-11 09:59:01 +02:00
dependabot[bot]
4ba54738a9 build(deps): bump boto3 from 1.26.161 to 1.26.165 (#2566)
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-07-11 09:37:29 +02:00
Toni de la Fuente
235fd2adc4 docs: Update Compliance in README (#2563) 2023-07-11 09:12:11 +02:00
Toni de la Fuente
b15d518c94 feat(compliance): CIS Benchmark 2.0 for AWS (#2562) 2023-07-11 09:12:03 +02:00
dependabot[bot]
021e1c122c build(deps-dev): bump pytest-randomly from 3.12.0 to 3.13.0 (#2567)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-11 09:07:05 +02:00
Sergio Garcia
014b0dd6f6 chore(regions_update): Changes in regions for AWS services. (#2561)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-07-10 08:28:09 +02:00
Sergio Garcia
f9f68f9b86 chore(regions_update): Changes in regions for AWS services. (#2560)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-07-07 11:34:53 +02:00
Pepe Fagoaga
11a8ba131a test(outputs): Remove debug (#2559) 2023-07-07 10:14:47 +02:00
Sergio Garcia
858de64f8e chore(release): version 3.7.0 (#2558) 2023-07-06 21:17:21 +02:00
Sergio Garcia
676e60afb7 feat(gcp): add CIS checks (#2544) 2023-07-06 17:01:56 +02:00
Nacho Rivera
b1968f3f8b fix(allowlist): reformat allowlist logic (#2555)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-07-06 15:33:32 +02:00
Sergio Garcia
d2d077afaa chore(regions_update): Changes in regions for AWS services. (#2557)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-07-06 11:29:50 +02:00
Nacho Rivera
7097ca401d feat(lambda allowlist): mapping lambda/awslambda in allowlist (#2554) 2023-07-05 11:49:42 +02:00
Antoine Cichowicz
73e9a1eb9e docs: Update Amazon Linux 2 installation (#2553) 2023-07-05 07:54:18 +02:00
Nacho Rivera
0439d455fb fix(reporting docs): fix S3 reporting desc (#2551) 2023-07-04 12:43:39 +02:00
Sergio Garcia
d57f665a78 docs(allowlist): update DynamoDB allowlist example (#2552)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-07-04 11:55:33 +02:00
dependabot[bot]
859c731a13 build(deps): bump google-api-python-client from 2.90.0 to 2.91.0 (#2548)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-04 11:08:13 +02:00
Sergio Garcia
2e7613ddec docs(OCSF): add docs for OCSF output (#2550) 2023-07-04 10:37:42 +02:00
dependabot[bot]
57e9436783 build(deps): bump botocore from 1.29.161 to 1.29.165 (#2547)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-04 10:23:03 +02:00
dependabot[bot]
2f153fda2e build(deps): bump mkdocs-material from 9.1.17 to 9.1.18 (#2546)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-04 09:02:25 +02:00
dependabot[bot]
cbcb5905a3 build(deps): bump boto3 from 1.26.156 to 1.26.161 (#2545)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-04 08:46:49 +02:00
Sergio Garcia
6a2fb37615 fix(bigquery_dataset_public_access): handle status correctly (#2542) 2023-07-03 13:01:51 +02:00
Nacho Rivera
6403feaff9 fix(cloudwatch secrets): fix nonetype error handling (#2543) 2023-07-03 12:52:46 +02:00
Sergio Garcia
47736910ca fix(list-checks): handle listing checks when -s (#2540) 2023-07-03 11:48:40 +02:00
Sergio Garcia
ead592a0bf chore(regions_update): Changes in regions for AWS services. (#2539)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-07-03 11:22:43 +02:00
Nacho Rivera
d5bdba9244 feat(lambda service): mapping lambda service to awslambda (#2538) 2023-07-03 11:19:02 +02:00
Sergio Garcia
4f033cec8d feat(MITRE): add MITRE ATT&CK framework for AWS (#2537) 2023-06-30 12:24:05 +02:00
sssalim-aws
a58f4b2498 feat(compliance): AWS Well-Architected Framework Reliability Pillar v0.1 (#2536)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-06-29 11:13:38 +02:00
Sergio Garcia
01522ed8c7 feat(ENS): complete ENS Compliance Framework mapping (#2534) 2023-06-27 15:22:25 +02:00
Sergio Garcia
fa99ee9d5b feat(allowlist): add exceptions to allowlist (#2527) 2023-06-27 12:57:18 +02:00
Sergio Garcia
6efe634850 fix(iam): add StringLike condition in iam_role_cross_service_confused_deputy_prevention (#2533) 2023-06-27 10:06:46 +02:00
dependabot[bot]
60a1497eaf build(deps-dev): bump moto from 4.1.11 to 4.1.12 (#2530)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 09:07:44 +02:00
dependabot[bot]
1d0cbc08df build(deps): bump google-api-python-client from 2.89.0 to 2.90.0 (#2531)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 08:36:41 +02:00
dependabot[bot]
4d4280033b build(deps-dev): bump pytest from 7.3.2 to 7.4.0 (#2532)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 07:55:26 +02:00
dependabot[bot]
fd58775cae build(deps): bump mkdocs-material from 9.1.16 to 9.1.17 (#2529)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 07:39:58 +02:00
dependabot[bot]
ccb0e93da2 build(deps): bump botocore from 1.29.156 to 1.29.161 (#2528)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 07:19:22 +02:00
Sergio Garcia
c2a05da908 chore(ec2): reduce noise in Security Groups checks (#2525) 2023-06-23 15:06:09 +02:00
Sergio Garcia
e1da9e60fc chore(region): add get_default_region function in AWS Services (#2524) 2023-06-23 14:10:49 +02:00
Sergio Garcia
d044e535e0 fix(compliance): add version to ISO27001 (#2523) 2023-06-21 17:04:08 +02:00
Sergio Garcia
293560dcd4 fix(contrib): migrate multi-account-securityhub/run-prowler-securityhub.sh to v3 (#2503)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-06-21 15:18:02 +02:00
Sergio Garcia
90ebb815d5 fix(security hub): solve Security Hub format requirements (#2520) 2023-06-21 13:04:14 +02:00
Sergio Garcia
3d3d418ee6 chore(regions_update): Changes in regions for AWS services. (#2522)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-06-21 11:32:35 +02:00
Pedro Martín
f875cd05be feat(compliance): add ISO27001 compliance framework (#2517)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-06-20 16:57:28 +02:00
Sergio Garcia
435911489f fix(gcp): update Prowler SDK info of GCP (#2515) 2023-06-20 14:32:24 +02:00
Sergio Garcia
5fcfcd53aa fix(compliance): remove unnecessary Optional attributes (#2514) 2023-06-20 14:22:13 +02:00
dependabot[bot]
bc09215aad build(deps): bump boto3 from 1.26.147 to 1.26.156 (#2511)
Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 10:36:53 +02:00
dependabot[bot]
5f7e109e3d build(deps-dev): bump openapi-spec-validator from 0.5.6 to 0.5.7 (#2507)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-20 09:44:30 +02:00
Nacho Rivera
b75a5050d7 fix(apigw): Update metadata for API GW checks (#2512) 2023-06-20 09:22:00 +02:00
dependabot[bot]
be497f7083 build(deps): bump google-api-python-client from 2.88.0 to 2.89.0 (#2510) 2023-06-20 08:40:41 +02:00
dependabot[bot]
0ccae3e15b build(deps): bump mkdocs-material from 9.1.15 to 9.1.16 (#2508)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-20 08:08:17 +02:00
dependabot[bot]
d736c32aec build(deps): bump botocore from 1.29.152 to 1.29.156 (#2506)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-20 07:41:30 +02:00
Sergio Garcia
8ea5ba5d3f chore(OCSF): improve OCSF logic (#2502) 2023-06-19 12:37:04 +02:00
Nacho Rivera
60c341befd fix(vpc): handle ephemeral VPC endpoint services (#2501) 2023-06-19 12:23:52 +02:00
Sergio Garcia
be4f58ed8f chore(regions_update): Changes in regions for AWS services. (#2500) 2023-06-19 07:59:42 +02:00
Sergio Garcia
d82d1abab6 chore(3.6.1): release version (#2498) 2023-06-16 12:34:17 +02:00
Sergio Garcia
0d81bd457c fix(asff): handle empty Recommendation Url (#2496)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-06-16 12:17:09 +02:00
Sergio Garcia
af2b19436f fix(route53): correct Hosted Zone ARN (#2494) 2023-06-15 16:32:54 +02:00
Sergio Garcia
51beb3c7e4 chore(regions_update): Changes in regions for AWS services. (#2497)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-06-15 15:56:23 +02:00
Chris Kelly
5061456735 fix(security hub): Adds logic to map to valid ASFF statuses (#2491) 2023-06-15 15:52:19 +02:00
Nacho Rivera
b01eb3af95 fix(rds checks): test if key exists prior checking it (#2489) 2023-06-14 12:15:33 +02:00
Sergio Garcia
328bebc168 chore(regions_update): Changes in regions for AWS services. (#2487)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-06-14 11:52:11 +02:00
Sergio Garcia
fc63fffa15 chore(release): 3.6.0 (#2485) 2023-06-13 17:38:51 +02:00
Sebastian Nyberg
707584b2ef feat(aws): Add MFA flag if try to assume role in AWS (#2478)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-06-13 17:18:10 +02:00
Nacho Rivera
561459d93b fix(dataevents checks): add trails home region (#2484) 2023-06-13 11:48:55 +02:00
Sergio Garcia
25e48ae546 chore(arn): include ARN of AWS accounts (#2477)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-06-13 10:18:23 +02:00
dependabot[bot]
513bb3e8d0 build(deps): bump botocore from 1.29.147 to 1.29.152 (#2482)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 10:07:57 +02:00
dependabot[bot]
04710ca908 build(deps): bump google-api-python-client from 2.86.0 to 2.88.0 (#2483)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 09:50:10 +02:00
dependabot[bot]
fcf0fcf20c build(deps): bump pydantic from 1.10.8 to 1.10.9 (#2481)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 09:06:59 +02:00
dependabot[bot]
2ff40d8e37 build(deps): bump boto3 from 1.26.142 to 1.26.147 (#2480)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 08:11:54 +02:00
dependabot[bot]
1bab5b06a4 build(deps-dev): bump pytest from 7.3.1 to 7.3.2 (#2479)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 07:50:41 +02:00
Sergio Garcia
01cd4bcb47 chore(arn): add missing ARNs to AWS Services (#2476) 2023-06-12 13:33:12 +02:00
Sebastian Nyberg
49b2a559ae feat(vpc): add check vpc_subnet_no_public_ip_by_default (#2472)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2023-06-12 09:44:10 +02:00
Sergio Garcia
9212d24685 chore(regions_update): Changes in regions for AWS services. (#2474)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-06-12 08:48:44 +02:00
Nacho Rivera
eb43b11202 fix(arn validator): include : in regex (#2471) 2023-06-09 13:24:29 +02:00
Sergio Garcia
5c4cae8c9d feat(wellarchitected): add WellArchitected service and check (#2461) 2023-06-09 13:19:01 +02:00
Sergio Garcia
cfd7099743 chore(regions_update): Changes in regions for AWS services. (#2469)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-06-09 13:09:30 +02:00
Sergio Garcia
19ae237d29 chore(regions_update): Changes in regions for AWS services. (#2462)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-06-09 13:09:01 +02:00
Sergio Garcia
9cda78e561 chore(docs): improve allowlist suggestion (#2466) 2023-06-09 13:07:28 +02:00
Sergio Garcia
cc31872a7f fix(kms): check only KMS CMK tags (#2468) 2023-06-09 13:06:06 +02:00
Sebastian Nyberg
3c2c896708 chore(vpc): add mapPublicIpOnLaunch attribute to VPC subnets (#2470) 2023-06-09 12:45:28 +02:00
Jit
b73da9c54c feat(gcp): add 12 new checks for CIS Framework (#2426)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-06-08 11:25:51 +02:00
Sergio Garcia
414a45bfb0 chore(quick inventory): add warning message (#2460) 2023-06-07 15:16:52 +02:00
Sergio Garcia
2a6f808bca chore(boto3): update boto3 config (#2459) 2023-06-07 14:32:40 +02:00
Sergio Garcia
cdf2a13bbd feat(oscf): add OCSF format as JSON output for AWS, Azure and GCP. Hello Amazon Security Lake! (#2429) 2023-06-07 14:28:43 +02:00
Sergio Garcia
3e3e8a14ee fix(inventory): handle exception for every call (#2457) 2023-06-07 09:33:10 +02:00
Nacho Rivera
37e180827a fix(azure): fix empty subscriptions case (#2455) 2023-06-06 17:31:43 +02:00
Pepe Fagoaga
b047b54545 fix(backup): Handle last_execution_date when None (#2454) 2023-06-06 16:57:17 +02:00
Pepe Fagoaga
b7bb4bbd57 fix(aws): Add missing resources ARN (#2453) 2023-06-06 16:56:59 +02:00
Pepe Fagoaga
86cf2cd233 fix(efs): Include resource ARN and handle from input (#2452) 2023-06-06 14:29:58 +02:00
Sergio Garcia
ab12c201b4 chore(docs): improve custom checks docs (#2428) 2023-06-06 11:58:20 +02:00
Sergio Garcia
a8f03d859c feat(gcp): add --project-ids flag and scan all projects by default (#2393)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-06-06 11:56:39 +02:00
Sergio Garcia
3c7580f024 fix(ec2): handle false positive in ec2_securitygroup_allow_ingress_from_internet_to_any_port (#2449) 2023-06-06 11:55:27 +02:00
Sergio Garcia
277833e388 fix(services): verify Route53 records and handle TrustedAdvisor error (#2448) 2023-06-06 11:50:44 +02:00
Sergio Garcia
eb16d7e6f9 chore(regions_update): Changes in regions for AWS services. (#2450)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-06-06 11:20:03 +02:00
Pepe Fagoaga
1418068d2b fix(services): Handle AWS service errors (#2440) 2023-06-06 09:23:03 +02:00
dependabot[bot]
774346f5f8 build(deps): bump botocore from 1.29.142 to 1.29.147 (#2447)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-06 08:38:49 +02:00
dependabot[bot]
1aab88e6ca build(deps): bump alive-progress from 3.1.1 to 3.1.4 (#2446)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-06 08:25:06 +02:00
dependabot[bot]
613f49b8bb build(deps-dev): bump docker from 6.1.2 to 6.1.3 (#2445)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-06 08:03:03 +02:00
dependabot[bot]
5c95dc6e20 build(deps): bump boto3 from 1.26.138 to 1.26.142 (#2444)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-06 07:45:14 +02:00
dependabot[bot]
cbc2713bee build(deps-dev): bump moto from 4.1.10 to 4.1.11 (#2443) 2023-06-06 07:29:25 +02:00
christiandavilakoobin
2955975793 fix(cloudfront): fix DefaultCacheConfigBehaviour enum type(#2430)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-06-05 15:48:34 +02:00
Sergio Garcia
f8299d7f40 chore(regions_update): Changes in regions for AWS services. (#2441)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-06-05 14:44:30 +02:00
Toni de la Fuente
e855d44523 docs: Create CONTRIBUTING.md (#2416)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-06-05 08:52:57 +02:00
dependabot[bot]
64e7715480 build(deps): bump cryptography from 40.0.2 to 41.0.0 (#2436)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 08:52:11 +02:00
Nacho Rivera
2e9a74f609 fix(README): add references to tenant-id when browser auth (#2439) 2023-06-05 08:39:59 +02:00
Sergio Garcia
11a1230738 chore(regions_update): Changes in regions for AWS services. (#2437)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-06-05 08:09:21 +02:00
Sergio Garcia
298373742e chore(regions_update): Changes in regions for AWS services. (#2427)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-06-02 13:32:04 +02:00
Sergio Garcia
dc7aeecd85 chore(regions_update): Changes in regions for AWS services. (#2434)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-06-02 13:24:47 +02:00
Nacho Rivera
15a7de7b24 fix(browser auth): fix browser auth in Azure to include tenant id (#2415)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-06-02 13:22:43 +02:00
sssalim-aws
714d0d4092 Update aws_well_architected_framework_security_pillar_aws.json (#2432) 2023-06-02 11:58:31 +02:00
Jenny Kim
225d7f39d1 chore(logo): Add Prowler logo in SVG format & Propose to Prowler icon design (#2423)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-06-01 12:03:49 +02:00
Sergio Garcia
0005798c83 chore(regions_update): Changes in regions for AWS services. (#2424)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-05-31 18:22:44 +02:00
dependabot[bot]
1d9078f9be build(deps): bump mkdocs-material from 9.1.12 to 9.1.15 (#2420)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-30 12:51:50 +02:00
dependabot[bot]
510ac7005a build(deps-dev): bump pytest-xdist from 3.3.0 to 3.3.1 (#2421)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-30 11:00:11 +02:00
dependabot[bot]
c049b968a5 build(deps): bump pydantic from 1.10.7 to 1.10.8 (#2418)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-30 10:45:13 +02:00
dependabot[bot]
858698f7cd build(deps): bump botocore from 1.29.138 to 1.29.142 (#2419)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-30 09:42:19 +02:00
dependabot[bot]
d104f6f8fc build(deps-dev): bump coverage from 7.2.5 to 7.2.7 (#2422)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-30 07:52:01 +02:00
Sergio Garcia
3ecf0d3230 chore(regions_update): Changes in regions for AWS services. (#2414) 2023-05-29 07:20:44 +02:00
Sergio Garcia
6e4131fee4 fix(ecr): handle LifecyclePolicyNotFoundException (#2411)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-05-26 17:15:49 +02:00
Sergio Garcia
41fa6bc8ed chore(regions_update): Changes in regions for AWS services. (#2413)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-05-26 13:02:37 +02:00
Sergio Garcia
58a29bf058 fix(codebuild): handle FAIL in codebuild_project_user_controlled_buildspec (#2410)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-05-25 13:30:01 +02:00
Sergio Garcia
7dac17de18 chore(regions_update): Changes in regions for AWS services. (#2409)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-05-25 11:51:32 +02:00
Toni de la Fuente
799d7de182 fix: typo in README.md (#2407)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2023-05-24 16:55:49 +02:00
Pedro Martín
735af02f59 feat(new_security_framework): AWS Well Architected Framework security pillar (#2382)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-05-24 16:38:32 +02:00
Sergio Garcia
ad3f3799fa fix(typo): typo in README.md (#2406) 2023-05-24 14:22:58 +02:00
Sergio Garcia
5f97df015e chore(release): change release version to 3.5.3 (#2405) 2023-05-24 13:56:53 +02:00
Toni de la Fuente
ff18fd2c38 chore(docs): add summary table to README.md (#2402)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2023-05-24 13:56:17 +02:00
Jit
3ab0cd02df feat(checks-gcp): Include 4 new checks covering GCP CIS (#2376)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2023-05-24 12:10:43 +02:00
Sergio Garcia
c31072f42f chore(regions_update): Changes in regions for AWS services. (#2403)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-05-24 11:59:15 +02:00
Sergio Garcia
c01c59023a fix(ClientError): handle ClientErrors in DynamoDB and Directory Service (#2400) 2023-05-24 11:50:08 +02:00
Sergio Garcia
4329aac377 chore(quick-inventory): send quick inventory to output bucket (#2399)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-05-24 11:48:49 +02:00
Sergio Garcia
c10b31e9d0 fix(categories): remove empty categories from metadata (#2401) 2023-05-24 10:44:51 +02:00
kij
71a789c0b4 fix(OSError): handle different OSErrors (#2398)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-05-23 17:16:17 +02:00
Sergio Garcia
deb9847e2b fix(route53_dangling_ip_subdomain_takeover): notify only IPs with AWS IP Ranges (#2396) 2023-05-23 16:35:13 +02:00
Pepe Fagoaga
9e9e7e1e96 fix(aws): Handle unique map keys (#2390)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-05-23 15:54:22 +02:00
Sergio Garcia
d34e0341e2 chore(regions_update): Changes in regions for AWS services. (#2392)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-05-23 12:28:38 +02:00
Sergio Garcia
aec254b05a fix(inspector2): fix active findings count (#2395) 2023-05-23 12:26:09 +02:00
dependabot[bot]
f8b420047a build(deps): bump boto3 from 1.26.125 to 1.26.138 (#2389)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 11:15:42 +02:00
dependabot[bot]
7e6e4c0bc6 build(deps): bump shodan from 1.29.0 to 1.29.1 (#2385)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 10:56:50 +02:00
dependabot[bot]
71fb59943c build(deps): bump requests from 2.30.0 to 2.31.0 (#2388)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 10:25:28 +02:00
dependabot[bot]
34419d0ca1 build(deps): bump azure-identity from 1.12.0 to 1.13.0 (#2386)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 10:22:05 +02:00
dependabot[bot]
475a36f0d7 build(deps-dev): bump moto from 4.1.9 to 4.1.10 (#2384)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 09:52:18 +02:00
Kevin Pullin
1234c1e7e2 fix(allowlist) - tags parameter is a string, not a list (#2375) 2023-05-23 09:51:50 +02:00
dependabot[bot]
a4a400facf build(deps): bump botocore from 1.29.134 to 1.29.138 (#2383)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 07:52:47 +02:00
Sergio Garcia
ed2ca4d896 chore(regions_update): Changes in regions for AWS services. (#2378)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-05-19 11:36:08 +02:00
Pepe Fagoaga
ce42e4d1cd fix(pypi-release): Push version change to the branch (#2374) 2023-05-18 18:46:11 +02:00
Sergio Garcia
b048128e77 chore(release): release version 3.5.2 (#2373) 2023-05-18 17:04:18 +02:00
Sergio Garcia
635c257502 fix(ssm incidents): check if service available in aws partition (#2372) 2023-05-18 16:44:52 +02:00
Pepe Fagoaga
58a38c08d7 docs: format regions-and-partitions (#2371) 2023-05-18 16:35:54 +02:00
Pepe Fagoaga
8fbee7737b fix(resource_not_found): Handle error (#2370) 2023-05-18 16:26:08 +02:00
Pepe Fagoaga
e84f5f184e fix(sts): Use the right region to validate credentials (#2349)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-05-18 15:51:57 +02:00
Sergio Garcia
0bd26b19d7 chore(regions_update): Changes in regions for AWS services. (#2368)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-05-18 11:17:28 +02:00
Sergio Garcia
64f82d5d51 chore(regions_update): Changes in regions for AWS services. (#2366)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-05-17 11:52:16 +02:00
Sergio Garcia
f63ff994ce fix(action): solve pypi-release action creating the release branch (#2364) 2023-05-16 13:32:46 +02:00
Sergio Garcia
a10ee43271 release: 3.5.1 (#2363) 2023-05-16 11:42:08 +02:00
Sergio Garcia
54ed29e08d fix(route53): handle empty Records in Zones (#2351) 2023-05-16 10:51:43 +02:00
dependabot[bot]
cc097e7a3f build(deps-dev): bump docker from 6.1.1 to 6.1.2 (#2360)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-16 09:39:24 +02:00
dependabot[bot]
5de92ada43 build(deps): bump mkdocs-material from 9.1.8 to 9.1.12 (#2359)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-16 09:24:39 +02:00
dependabot[bot]
0c546211cf build(deps-dev): bump pytest-xdist from 3.2.1 to 3.3.0 (#2358)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-16 08:09:55 +02:00
dependabot[bot]
4dc5a3a67c build(deps): bump botocore from 1.29.125 to 1.29.134 (#2357)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-16 07:51:19 +02:00
dependabot[bot]
c51b226ceb build(deps): bump shodan from 1.28.0 to 1.29.0 (#2356)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-16 07:34:51 +02:00
dependabot[bot]
0a5ca6cf74 build(deps): bump pymdown-extensions from 9.11 to 10.0 (#2355)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-16 07:33:56 +02:00
Sergio Garcia
96957219e4 chore(regions_update): Changes in regions for AWS services. (#2353)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-05-16 07:32:41 +02:00
Sergio Garcia
32b7620db3 chore(regions_update): Changes in regions for AWS services. (#2350)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-05-12 11:37:53 +02:00
Sergio Garcia
347f65e089 chore(release): 3.5.0 (#2346) 2023-05-11 17:42:46 +02:00
Sergio Garcia
16628a427e fix(README): update Architecture image and PyPi links (#2345) 2023-05-11 17:29:17 +02:00
Sergio Garcia
ed16034a25 fix(README): order providers alphbetically (#2344) 2023-05-11 16:30:04 +02:00
Pepe Fagoaga
0c5f144e41 fix(poetry): Skip updates during pre-commit (#2342) 2023-05-11 12:17:21 +02:00
Sergio Garcia
acc7d6e7dc chore(regions_update): Changes in regions for AWS services. (#2341)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-05-11 11:41:39 +02:00
Sergio Garcia
84b4139052 chore(iam): add new permissions (#2339) 2023-05-11 11:35:32 +02:00
Sergio Garcia
9943643958 fix(s3): improve error handling (#2337) 2023-05-10 16:43:06 +02:00
Pepe Fagoaga
9ceaefb663 fix(access-analyzer): Handle ResourceNotFoundException (#2336) 2023-05-10 15:44:14 +02:00
Gabriel Soltz
ec03ea5bc1 feat(workspaces): New check workspaces_vpc_2private_1public_subnets_nat (#2286)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
Co-authored-by: n4ch04 <nachor1992@gmail.com>
2023-05-10 15:40:42 +02:00
Sergio Garcia
5855633c1f fix(resourceexplorer2): add resource id (#2335)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-05-10 14:48:34 +02:00
Pedro Martín
a53bc2bc2e feat(rds): new check rds_instance_deprecated_engine_version (#2298)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2023-05-10 14:48:12 +02:00
Sergio Garcia
88445820ed feat(slack): add Slack App integration (#2305)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-05-10 13:38:28 +02:00
Sergio Garcia
044ed3ae98 chore(regions_update): Changes in regions for AWS services. (#2334)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-05-10 13:30:24 +02:00
Pepe Fagoaga
6f48012234 fix(ecr): Refactor service (#2302)
Co-authored-by: Gabriel Soltz <thegaby@gmail.com>
Co-authored-by: Kay Agahd <kagahd@users.noreply.github.com>
Co-authored-by: Nacho Rivera <nachor1992@gmail.com>
Co-authored-by: Kevin Pullin <kevin.pullin@gmail.com>
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-05-09 17:04:21 +02:00
Sergio Garcia
d344318dd4 feat(allowlist): allowlist a specific service (#2331) 2023-05-09 15:43:04 +02:00
Sergio Garcia
6273dd3d83 chore(regions_update): Changes in regions for AWS services. (#2330)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-05-09 12:21:07 +02:00
dependabot[bot]
0f3f3cbffd build(deps-dev): bump moto from 4.1.8 to 4.1.9 (#2328)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-05-09 11:38:41 +02:00
Pepe Fagoaga
3244123b21 fix(cloudfront_distributions_https_enabled): Add default case (#2329)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-05-09 11:09:18 +02:00
dependabot[bot]
cba2ee3622 build(deps): bump boto3 from 1.26.115 to 1.26.125 (#2327)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-09 08:48:15 +02:00
dependabot[bot]
25ed925df5 build(deps-dev): bump docker from 6.0.1 to 6.1.1 (#2326)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-09 08:22:03 +02:00
dependabot[bot]
8c5bd60bab build(deps-dev): bump pylint from 2.17.3 to 2.17.4 (#2325)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-09 07:59:21 +02:00
dependabot[bot]
c5510556a7 build(deps): bump mkdocs from 1.4.2 to 1.4.3 (#2324)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-09 07:38:43 +02:00
Sergio Garcia
bbcfca84ef fix(trustedadvisor): avoid not_available checks (#2323) 2023-05-08 17:55:31 +02:00
Sergio Garcia
1260e94c2a fix(cloudtrail): handle InsightNotEnabledException error (#2322) 2023-05-08 16:06:13 +02:00
Pepe Fagoaga
8a02574303 fix(sagemaker): Handle ValidationException (#2321) 2023-05-08 14:52:28 +02:00
Pepe Fagoaga
c930f08348 fix(emr): Handle InvalidRequestException (#2320) 2023-05-08 14:52:12 +02:00
Pepe Fagoaga
5204acb5d0 fix(iam): Handle ListRoleTags and policy errors (#2319) 2023-05-08 14:42:23 +02:00
Sergio Garcia
784aaa98c9 feat(iam): add iam_role_cross_account_readonlyaccess_policy check (#2312) 2023-05-08 13:27:51 +02:00
Sergio Garcia
745e2494bc chore(docs): improve GCP docs (#2318) 2023-05-08 13:26:23 +02:00
Sergio Garcia
c00792519d chore(docs): improve GCP docs (#2318) 2023-05-08 13:26:02 +02:00
Sergio Garcia
142fe5a12c chore(regions_update): Changes in regions for AWS services. (#2315)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-05-08 12:40:31 +02:00
Sergio Garcia
5b127f232e fix(typo): typo in backup_vaults_exist check title (#2317) 2023-05-08 12:29:08 +02:00
Kevin Pullin
c22bf01003 feat(allowlist): Support regexes in Tags to allow "or"-like conditional matching (#2300)
Co-authored-by: Kevin Pullin <kevinp@nexttrucking.com>
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
2023-05-05 14:56:27 +02:00
Nacho Rivera
05e4911d6f fix(vpc services): list to dicts in vpc and subnets (#2310) 2023-05-04 15:35:02 +02:00
Nacho Rivera
9b551ef0ba feat(pre-commit): added trufflehog to pre-commit (#2311) 2023-05-04 15:33:11 +02:00
Sergio Garcia
56a8bb2349 chore(regions_update): Changes in regions for AWS services. (#2309)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-05-04 12:30:10 +02:00
Pepe Fagoaga
8503c6a64d fix(client_error): Handle errors (#2308) 2023-05-04 11:06:24 +02:00
Pepe Fagoaga
820f18da4d release: 3.4.1 (#2303) 2023-05-03 19:24:17 +02:00
Kay Agahd
51a2432ebf fix(typo): remove redundant lines (#2307) 2023-05-03 19:23:48 +02:00
Gabriel Soltz
6639534e97 feat(ssmincidents): Use regional_client region instead of audit_profile region (#2306) 2023-05-03 19:22:30 +02:00
Gabriel Soltz
0621577c7d fix(backup): Return [] when None AdvancedBackupSettings (#2304) 2023-05-03 17:10:53 +02:00
Sergio Garcia
26a507e3db feat(route53): add route53_dangling_ip_subdomain_takeover check (#2288)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-05-03 11:47:36 +02:00
Sergio Garcia
244b540fe0 fix(s3): handle NoSuchBucket error (#2289) 2023-05-03 09:55:19 +02:00
Gabriel Soltz
030ca4c173 fix(backups): change severity and only check report_plans if plans exists (#2291)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-05-03 09:00:15 +02:00
dependabot[bot]
88a2810f29 build(deps): bump botocore from 1.29.115 to 1.29.125 (#2301)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-03 08:55:14 +02:00
dependabot[bot]
9164ee363a build(deps-dev): bump coverage from 7.2.3 to 7.2.5 (#2297)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-03 08:38:03 +02:00
dependabot[bot]
4cd47fdcc5 build(deps): bump google-api-python-client from 2.84.0 to 2.86.0 (#2296)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-03 08:11:36 +02:00
dependabot[bot]
708852a3cb build(deps): bump mkdocs-material from 9.1.6 to 9.1.8 (#2294)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-03 07:49:52 +02:00
Sergio Garcia
4a93bdf3ea chore(regions_update): Changes in regions for AWS services. (#2293)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-05-03 07:49:27 +02:00
Gabriel Soltz
22e7d2a811 feat(Organizations): New check organizations_tags_policies_enabled_and_attached (#2287)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-04-28 16:14:08 +02:00
Sergio Garcia
93eca1dff2 chore(regions_update): Changes in regions for AWS services. (#2290)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-28 13:19:46 +02:00
Gabriel Soltz
9afe7408cd feat(FMS): New Service FMS and Check fms_accounts_compliant (#2259)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
Co-authored-by: Nacho Rivera <nacho@verica.io>
2023-04-28 11:47:55 +02:00
Sergio Garcia
5dc2347a25 docs(security hub): improve security hub docs (#2285)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-04-27 16:22:49 +02:00
Pepe Fagoaga
e3a0124b10 fix(opensearch): Handle invalid JSON policy (#2262) 2023-04-27 12:05:43 +02:00
Gabriel Soltz
16af89c281 feat(autoscaling): new check autoscaling_group_multiple_az (#2273) 2023-04-26 15:10:04 +02:00
Sergio Garcia
621e4258c8 feat(s3): add s3_bucket_object_lock check (#2274) 2023-04-26 15:04:45 +02:00
Sergio Garcia
ac6272e739 fix(rds): check configurations for DB instances at cluster level (#2277)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-04-26 13:51:07 +02:00
Sergio Garcia
6e84f517a9 fix(apigateway2): correct paginator name (#2283) 2023-04-26 13:43:15 +02:00
Pepe Fagoaga
fdbdb3ad86 fix(sns_topics_not_publicly_accessible): Change PASS behaviour (#2282) 2023-04-26 12:51:51 +02:00
Sergio Garcia
7adcf5ca46 chore(regions_update): Changes in regions for AWS services. (#2280)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-26 11:59:34 +02:00
Gabriel Soltz
fe6716cf76 feat(NetworkFirewall): New Service and Check (#2261)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2023-04-26 11:58:11 +02:00
dependabot[bot]
3c2096db68 build(deps): bump azure-mgmt-security from 4.0.0 to 5.0.0 (#2270)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 11:59:30 +02:00
Pepe Fagoaga
58cad1a6b3 fix(log_group_retention): handle log groups that never expire (#2272) 2023-04-25 10:45:43 +02:00
dependabot[bot]
662e67ff16 build(deps): bump boto3 from 1.26.105 to 1.26.115 (#2269)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 10:35:15 +02:00
dependabot[bot]
8d577b872f build(deps-dev): bump moto from 4.1.7 to 4.1.8 (#2268)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 10:12:25 +02:00
dependabot[bot]
b55290f3cb build(deps-dev): bump pylint from 2.17.2 to 2.17.3 (#2267)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 09:20:15 +02:00
dependabot[bot]
e8d3eb7393 build(deps-dev): bump pytest from 7.3.0 to 7.3.1 (#2266)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 08:03:45 +02:00
Sergio Garcia
47fa16e35f chore(test): add CloudWatch and Logs tests (#2264) 2023-04-24 17:05:05 +02:00
Gabriel Soltz
a87f769b85 feat(DRS): New DRS Service and Checks (#2257)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-04-24 14:22:22 +02:00
Sergio Garcia
8e63fa4594 fix(version): execute check current version function only when -v (#2263) 2023-04-24 12:45:59 +02:00
Gabriel Soltz
63501a0d59 feat(inspector2): New Service and Check (#2250)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2023-04-24 12:15:16 +02:00
Sergio Garcia
828fb37ca8 chore(regions_update): Changes in regions for AWS services. (#2258)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-24 08:32:40 +02:00
Sergio Garcia
40f513d3b6 chore(regions_update): Changes in regions for AWS services. (#2251)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-21 12:10:15 +02:00
Sergio Garcia
f0b8b66a75 chore(test): add rds_instance_transport_encrypted test (#2252) 2023-04-21 12:09:47 +02:00
Sergio Garcia
d51cdc068b fix(iam_role_cross_service_confused_deputy_prevention): avoid service linked roles (#2249) 2023-04-21 10:42:05 +02:00
Sergio Garcia
f8b382e480 fix(version): update version to 3.4.0 (#2247) 2023-04-20 17:05:18 +02:00
Ronen Atias
1995f43b67 fix(redshift): correct description in redshift_cluster_automatic_upgrades (#2246) 2023-04-20 15:19:49 +02:00
Sergio Garcia
69e0392a8b fix(rds): exclude Aurora in rds_instance_transport_encrypted check (#2245) 2023-04-20 14:28:12 +02:00
Sergio Garcia
1f6319442e chore(docs): improve GCP docs (#2242) 2023-04-20 14:15:28 +02:00
Sergio Garcia
559c4c0c2c chore(regions_update): Changes in regions for AWS services. (#2243)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-20 11:43:02 +02:00
Sergio Garcia
feeb5b58d9 fix(checks): improve --list-checks function (#2240) 2023-04-19 17:00:20 +02:00
Sergio Garcia
7a00f79a56 fix(iam_policy_no_administrative_privileges): check attached policies and AWS-Managed (#2200)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-04-19 14:34:53 +02:00
Sergio Garcia
10d744704a fix(errors): solve ECR and CodeArtifact errors (#2239) 2023-04-19 13:27:19 +02:00
Gabriel Soltz
eee35f9cc3 feat(ssmincidents): New Service and Checks (#2219)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-04-19 12:26:20 +02:00
Gabriel Soltz
b3656761eb feat(check): New VPC checks (#2218) 2023-04-19 12:01:12 +02:00
Sergio Garcia
7b5fe34316 feat(html): add html to Azure and GCP (#2181)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-04-18 16:13:57 +02:00
Sergio Garcia
4536780a19 feat(check): new check ecr_registry_scan_images_on_push_enabled (#2237) 2023-04-18 15:45:21 +02:00
Sergio Garcia
05d866e6b3 chore(regions_update): Changes in regions for AWS services. (#2236)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-18 13:43:15 +02:00
dependabot[bot]
0d138cf473 build(deps): bump botocore from 1.29.105 to 1.29.115 (#2233)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-18 13:42:50 +02:00
dependabot[bot]
dbe539ac80 build(deps): bump boto3 from 1.26.90 to 1.26.105 (#2232)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-18 12:35:33 +02:00
dependabot[bot]
665a39d179 build(deps): bump azure-storage-blob from 12.15.0 to 12.16.0 (#2230)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-18 11:02:39 +02:00
dependabot[bot]
5fd5d8c8c5 build(deps-dev): bump coverage from 7.2.2 to 7.2.3 (#2234)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-18 08:03:44 +02:00
dependabot[bot]
2832b4564c build(deps-dev): bump moto from 4.1.6 to 4.1.7 (#2231)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-18 07:40:50 +02:00
dependabot[bot]
d4369a64ee build(deps): bump azure-mgmt-security from 3.0.0 to 4.0.0 (#2141)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-17 13:22:09 +02:00
Sergio Garcia
81fa1630b7 chore(regions_update): Changes in regions for AWS services. (#2227)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-17 11:18:41 +02:00
Sergio Garcia
a1c4b35205 chore(regions_update): Changes in regions for AWS services. (#2217)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-17 11:16:22 +02:00
Sergio Garcia
5e567f3e37 fix(iam tests): mock audit_info object (#2226)
Co-authored-by: n4ch04 <nachor1992@gmail.com>
2023-04-17 11:14:48 +02:00
Pepe Fagoaga
c4757684c1 fix(test): Mock audit into in SecurityHub CodeBuild (#2225) 2023-04-17 11:14:36 +02:00
Sergio Garcia
a55a6bf94b fix(test): Mock audit info in EC2 (#2224) 2023-04-17 10:54:56 +02:00
Pepe Fagoaga
fa1792eb77 fix(test): Mock audit into in CloudWatch (#2223) 2023-04-17 10:54:01 +02:00
Nacho Rivera
93a8f6e759 fix(rds tests): mocked audit_info object (#2222) 2023-04-17 10:06:25 +02:00
Nacho Rivera
4a614855d4 fix(s3 tests): audit_info object mocked (#2221) 2023-04-17 10:04:28 +02:00
Pepe Fagoaga
8bdd47f912 fix(test): Mock audit info in KMS (#2215) 2023-04-14 14:34:55 +02:00
Nacho Rivera
f9e82abadc fix(vpc tests): mock current_audit_info (#2214) 2023-04-14 14:31:34 +02:00
Gabriel Soltz
428fda81e2 feat(check): New GuardDuty check guardduty_centrally_managed (#2195)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-04-14 14:30:51 +02:00
Pepe Fagoaga
29c9ad602d fix(test): Mock audit into in Macie (#2213) 2023-04-14 14:29:19 +02:00
Pepe Fagoaga
44458e2a97 fix(test): Mock audit info codeartifact-config-ds (#2210) 2023-04-14 14:25:45 +02:00
Pepe Fagoaga
861fb1f54b fix(test): Mock audit into in Glacier (#2212) 2023-04-14 14:20:03 +02:00
Pepe Fagoaga
02534f4d55 fix(test): Mock audit info DynamoDB (#2211) 2023-04-14 14:19:08 +02:00
Pepe Fagoaga
5532cb95a2 fix(test): Mock audit info in appstream and autoscaling (#2209) 2023-04-14 14:06:07 +02:00
Pepe Fagoaga
9176e43fc9 fix(test): Mock audit info API Gateway (#2208) 2023-04-14 13:49:38 +02:00
Pepe Fagoaga
cb190f54fc fix(elb-test): Use a mocked current audit info (#2207) 2023-04-14 12:43:08 +02:00
Sergio Garcia
4be2539bc2 fix(resourceexplorer2): solve test and region (#2206) 2023-04-14 12:33:52 +02:00
Sergio Garcia
291e2adffa chore(regions_update): Changes in regions for AWS services. (#2205)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-14 12:32:58 +02:00
Gabriel Soltz
fa2ec63f45 feat(check): New Check and Service: resourceexplorer2_indexes_found (#2196)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2023-04-14 10:18:36 +02:00
Nacho Rivera
946c943457 fix(global services): fixed global services region (#2203)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-04-14 09:57:33 +02:00
Pepe Fagoaga
0e50766d6e fix(test): call cloudtrail_s3_dataevents_write_enabled check (#2204) 2023-04-14 09:35:29 +02:00
Sergio Garcia
58a1610ae0 chore(regions_update): Changes in regions for AWS services. (#2201)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-13 15:53:56 +02:00
Nacho Rivera
06dc21168a feat(orgs checks region): added region to all orgs checks (#2202) 2023-04-13 14:41:18 +02:00
Gabriel Soltz
305b67fbed feat(check): New check cloudtrail_bucket_requires_mfa_delete (#2194)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-04-13 14:18:31 +02:00
Sergio Garcia
4da6d152c3 feat(custom checks): add -x/--checks-folder for custom checks (#2191) 2023-04-13 13:44:25 +02:00
Sergio Garcia
25630f1ef5 chore(regions): sort AWS regions (#2198)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-12 13:24:14 +02:00
Sergio Garcia
9b01e3f1c9 chore(regions_update): Changes in regions for AWS services. (#2197)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-12 12:53:03 +02:00
Sergio Garcia
99450400eb chore(regions_update): Changes in regions for AWS services. (#2189)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-12 10:47:21 +02:00
Gabriel Soltz
2f8a8988d7 feat(checks): New IAM Checks no full access to critical services (#2183) 2023-04-12 07:47:21 +02:00
Sergio Garcia
9104d2e89e fix(kms): handle empty principal error (#2192) 2023-04-11 16:59:29 +02:00
Gabriel Soltz
e75022763c feat(checks): New iam_securityaudit_role_created (#2182) 2023-04-11 14:15:39 +02:00
Gabriel Soltz
f0f3fb337d feat(check): New CloudTrail check cloudtrail_insights_exist (#2184) 2023-04-11 13:49:54 +02:00
dependabot[bot]
f7f01a34c2 build(deps): bump google-api-python-client from 2.81.0 to 2.84.0 (#2188)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-11 12:13:41 +02:00
dependabot[bot]
f9f9ff0cb8 build(deps): bump alive-progress from 3.1.0 to 3.1.1 (#2187)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-11 08:13:17 +02:00
dependabot[bot]
522ba05ba8 build(deps): bump mkdocs-material from 9.1.5 to 9.1.6 (#2186)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-11 07:54:41 +02:00
Gabriel Soltz
f4f4093466 feat(backup): New backup service and checks (#2172)
Co-authored-by: Nacho Rivera <nacho@verica.io>
2023-04-11 07:43:40 +02:00
dependabot[bot]
2e16ab0c2c build(deps-dev): bump pytest from 7.2.2 to 7.3.0 (#2185)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-11 07:39:09 +02:00
Sergio Garcia
6f02606fb7 fix(iam): handle no display name error in service account (#2176) 2023-04-10 12:06:08 +02:00
Sergio Garcia
df40142b51 chore(regions_update): Changes in regions for AWS services. (#2180)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-10 12:05:48 +02:00
Sergio Garcia
cc290d488b chore(regions_update): Changes in regions for AWS services. (#2178)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-10 12:05:30 +02:00
Nacho Rivera
64328218fc feat(banner): azure credential banner (#2179) 2023-04-10 09:58:28 +02:00
Sergio Garcia
8d1356a085 fix(logging): add default resource id when no resources (#2177) 2023-04-10 08:02:40 +02:00
Sergio Garcia
4f39dd0f73 fix(version): handle request response property (#2175)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-04-05 15:17:30 +02:00
Pepe Fagoaga
54ffc8ae45 chore(release): 3.3.4 (#2174) 2023-04-05 14:18:07 +02:00
Sergio Garcia
78ab1944bd chore(regions_update): Changes in regions for AWS services. (#2173)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-05 12:32:25 +02:00
dependabot[bot]
434cf94657 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:31:58 +02:00
Nacho Rivera
dcb893e230 fix(elbv2 desync check): Mixed elbv2 desync and smuggling (#2171) 2023-04-05 11:36:06 +02:00
Sergio Garcia
ce4fadc378 chore(regions_update): Changes in regions for AWS services. (#2170)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-05 08:47:19 +02:00
dependabot[bot]
5683d1b1bd 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-04 13:24:03 +02:00
dependabot[bot]
0eb88d0c10 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-04 11:07:41 +02:00
Nacho Rivera
eb1367e54d fix(pipeline build): fixed wording when build and push (#2169) 2023-04-04 10:21:28 +02:00
dependabot[bot]
33a4786206 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>
2023-04-04 09:35:10 +02:00
Pepe Fagoaga
8c6606ad95 fix(dax): Call list_tags using the cluster ARN (#2167) 2023-04-04 09:30:36 +02:00
Pepe Fagoaga
cde9519a76 fix(iam): Handle LimitExceededException when calling generate_credential_report (#2168) 2023-04-04 09:29:27 +02:00
Pepe Fagoaga
7b2e0d79cb fix(cloudformation): Handle ValidationError (#2166) 2023-04-04 09:28:11 +02:00
Pepe Fagoaga
5b0da8e92a fix(rds): Handle DBSnapshotNotFound (#2165) 2023-04-04 09:27:36 +02:00
Michael Göhler
0126d2f77c fix(secretsmanager_automatic_rotation_enabled): Improve description for Secrets Manager secret rotation (#2156) 2023-04-03 11:01:29 +02:00
Sergio Garcia
0b436014c9 chore(regions_update): Changes in regions for AWS services. (#2159)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-04-03 11:01:15 +02:00
Igor Ceron
2cb7f223ed fix(docs): check extra_742 name adjusted in the V2 to V3 mapping (#2154) 2023-03-31 12:54:13 +02:00
Sergio Garcia
eca551ed98 chore(regions_update): Changes in regions for AWS services. (#2155)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-31 12:53:49 +02:00
Gabriel Soltz
608fd92861 feat(new_checks): New AWS Organizations related checks (#2133)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-03-30 17:36:23 +02:00
Sergio Garcia
e37d8fe45f chore(release): update Prowler Version to 3.3.2 (#2150)
Co-authored-by: github-actions <noreply@github.com>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2023-03-30 11:33:33 +02:00
Sergio Garcia
4cce91ec97 chore(regions_update): Changes in regions for AWS services. (#2153)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-30 11:29:00 +02:00
Pepe Fagoaga
72fdde35dc fix(pypi): Set base branch when updating release version (#2152) 2023-03-30 10:59:58 +02:00
Pepe Fagoaga
d425187778 fix(pypi): Build from release branch (#2151) 2023-03-30 10:14:49 +02:00
Sergio Garcia
e419aa1f1a chore(regions_update): Changes in regions for AWS services. (#2149)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-29 11:45:35 +02:00
Pepe Fagoaga
5506547f7f fix(ssm): Handle ValidationException when retrieving documents (#2146) 2023-03-29 09:16:52 +02:00
Nacho Rivera
568ed72b3e fix(audit_info): azure subscriptions parsing error (#2147) 2023-03-29 09:15:53 +02:00
Nacho Rivera
e8cc0e6684 fix(delete check): delete check ec2_securitygroup_in_use_without_ingress_filtering (#2148) 2023-03-29 09:13:43 +02:00
Sergio Garcia
4331f69395 chore(regions_update): Changes in regions for AWS services. (#2145)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-28 13:08:02 +02:00
dependabot[bot]
7cc67ae7cb 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-28 13:07:23 +02:00
dependabot[bot]
244b3438fc 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-28 12:39:00 +02:00
Nacho Rivera
1a741f7ca0 fix(azure output): change default values of audit identity metadata (#2144) 2023-03-28 10:42:47 +02:00
dependabot[bot]
1447800e2b 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-28 10:41:09 +02:00
Sergio Garcia
f968fe7512 fix(readme): add GCP provider to README introduction (#2143) 2023-03-28 10:40:56 +02:00
dependabot[bot]
0a2349fad7 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-28 09:55:18 +02:00
Sergio Garcia
941b8cbc1e chore(docs): Developer Guide - how to create a new check (#2137) 2023-03-27 20:20:13 +02:00
Pepe Fagoaga
3b7b16acfd fix(resource_not_found): Handle error (#2136) 2023-03-27 17:27:50 +02:00
Nacho Rivera
fbc7bb68fc feat(defender service): retrieving key dicts with get (#2129) 2023-03-27 17:13:11 +02:00
Pepe Fagoaga
0d16880596 fix(s3): handle if ignore_public_acls is None (#2128) 2023-03-27 17:00:20 +02:00
Sergio Garcia
3b5218128f fix(brew): move brew formula action to the bottom (#2135) 2023-03-27 11:24:28 +02:00
Pepe Fagoaga
cb731bf1db fix(aws_provider): Fix assessment session name (#2132) 2023-03-25 00:11:16 +01:00
Sergio Garcia
7c4d6eb02d fix(gcp): handle error when Project ID is None (#2130) 2023-03-24 18:30:33 +01:00
Sergio Garcia
c14e7fb17a feat(gcp): add Google Cloud provider with 43 checks (#2125) 2023-03-24 13:38:41 +01:00
Sergio Garcia
fe57811bc5 chore(regions_update): Changes in regions for AWS services. (#2126)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-24 10:18:33 +01:00
Sergio Garcia
e073b48f7d chore(regions_update): Changes in regions for AWS services. (#2123)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-23 15:58:47 +01:00
Ben Nugent
a9df609593 fix(quickinventory): AttributError when creating inventory table (#2122) 2023-03-23 10:22:14 +01:00
Sergio Garcia
6c3db9646e fix(output bucket): solve IsADirectoryError using compliance flag (#2121) 2023-03-22 13:38:41 +01:00
Sergio Garcia
ff9c4c717e chore(regions_update): Changes in regions for AWS services. (#2120)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
2023-03-22 12:18:44 +01:00
Sergio Garcia
182374b46f docs: improve reporting documentation (#2119) 2023-03-22 10:02:52 +01:00
Sergio Garcia
0871cda526 docs: improve quick inventory section (#2117) 2023-03-21 18:09:40 +01:00
Toni de la Fuente
1b47cba37a docs(developer-guide): added phase 1 of the developer guide (#1904)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
2023-03-21 15:35:26 +01:00
Pepe Fagoaga
e5bef36905 docs: Remove list severities (#2116) 2023-03-21 14:18:07 +01:00
Sergio Garcia
706d723703 chore(version): check latest version (#2106) 2023-03-21 11:16:13 +01:00
Sergio Garcia
51eacbfac5 feat(allowlist): add tags filter to allowlist (#2105) 2023-03-21 11:14:59 +01:00
2517 changed files with 161040 additions and 28257 deletions

2
.github/CODEOWNERS vendored
View File

@@ -1 +1 @@
* @prowler-cloud/prowler-oss
* @prowler-cloud/prowler-oss @prowler-cloud/prowler-dev

View File

@@ -1,6 +1,6 @@
name: 💡 Feature Request
description: Suggest an idea for this project
labels: ["enhancement", "status/needs-triage"]
labels: ["feature-request", "status/needs-triage"]
body:

View File

@@ -5,11 +5,38 @@
version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
target-branch: master
labels:
- "dependencies"
- "pip"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
target-branch: master
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
target-branch: v3
labels:
- "dependencies"
- "pip"
- "v3"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
target-branch: v3
labels:
- "github_actions"
- "v3"

27
.github/labeler.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
documentation:
- changed-files:
- any-glob-to-any-file: "docs/**"
provider/aws:
- changed-files:
- any-glob-to-any-file: "prowler/providers/aws/**"
- any-glob-to-any-file: "tests/providers/aws/**"
provider/azure:
- changed-files:
- any-glob-to-any-file: "prowler/providers/azure/**"
- any-glob-to-any-file: "tests/providers/azure/**"
provider/gcp:
- changed-files:
- any-glob-to-any-file: "prowler/providers/gcp/**"
- any-glob-to-any-file: "tests/providers/gcp/**"
provider/kubernetes:
- changed-files:
- any-glob-to-any-file: "prowler/providers/kubernetes/**"
- any-glob-to-any-file: "tests/providers/kubernetes/**"
github_actions:
- changed-files:
- any-glob-to-any-file: ".github/workflows/*"

View File

@@ -0,0 +1,24 @@
name: Pull Request Documentation Link
on:
pull_request:
branches:
- 'master'
- 'v3'
paths:
- 'docs/**'
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
jobs:
documentation-link:
name: Documentation Link
runs-on: ubuntu-latest
steps:
- name: Leave PR comment with the SaaS Documentation URI
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ env.PR_NUMBER }}
body: |
You can check the documentation for this PR here -> [SaaS Documentation](https://prowler-prowler-docs--${{ env.PR_NUMBER }}.com.readthedocs.build/projects/prowler-open-source/en/${{ env.PR_NUMBER }}/)

View File

@@ -3,6 +3,7 @@ name: build-lint-push-containers
on:
push:
branches:
- "v3"
- "master"
paths-ignore:
- ".github/**"
@@ -13,52 +14,98 @@ on:
types: [published]
env:
# AWS Configuration
AWS_REGION_STG: eu-west-1
AWS_REGION_PLATFORM: eu-west-1
AWS_REGION: us-east-1
# Container's configuration
IMAGE_NAME: prowler
DOCKERFILE_PATH: ./Dockerfile
# Tags
LATEST_TAG: latest
STABLE_TAG: stable
TEMPORARY_TAG: temporary
DOCKERFILE_PATH: ./Dockerfile
PYTHON_VERSION: 3.9
# The RELEASE_TAG is set during runtime in releases
RELEASE_TAG: ""
# The PROWLER_VERSION and PROWLER_VERSION_MAJOR are set during runtime in releases
PROWLER_VERSION: ""
PROWLER_VERSION_MAJOR: ""
# TEMPORARY_TAG: temporary
# Python configuration
PYTHON_VERSION: 3.12
jobs:
# Build Prowler OSS container
container-build-push:
# needs: dockerfile-linter
runs-on: ubuntu-latest
outputs:
prowler_version_major: ${{ steps.get-prowler-version.outputs.PROWLER_VERSION_MAJOR }}
prowler_version: ${{ steps.update-prowler-version.outputs.PROWLER_VERSION }}
env:
POETRY_VIRTUALENVS_CREATE: "false"
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup python (release)
if: github.event_name == 'release'
uses: actions/setup-python@v2
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies (release)
if: github.event_name == 'release'
- name: Install Poetry
run: |
pipx install poetry
pipx inject poetry poetry-bumpversion
- name: Get Prowler version
id: get-prowler-version
run: |
PROWLER_VERSION="$(poetry version -s 2>/dev/null)"
# Store prowler version major just for the release
PROWLER_VERSION_MAJOR="${PROWLER_VERSION%%.*}"
echo "PROWLER_VERSION_MAJOR=${PROWLER_VERSION_MAJOR}" >> "${GITHUB_ENV}"
echo "PROWLER_VERSION_MAJOR=${PROWLER_VERSION_MAJOR}" >> "${GITHUB_OUTPUT}"
case ${PROWLER_VERSION_MAJOR} in
3)
echo "LATEST_TAG=v3-latest" >> "${GITHUB_ENV}"
echo "STABLE_TAG=v3-stable" >> "${GITHUB_ENV}"
;;
4)
echo "LATEST_TAG=latest" >> "${GITHUB_ENV}"
echo "STABLE_TAG=stable" >> "${GITHUB_ENV}"
;;
*)
# Fallback if any other version is present
echo "Releasing another Prowler major version, aborting..."
exit 1
;;
esac
- name: Update Prowler version (release)
id: update-prowler-version
if: github.event_name == 'release'
run: |
poetry version ${{ github.event.release.tag_name }}
PROWLER_VERSION="${{ github.event.release.tag_name }}"
poetry version "${PROWLER_VERSION}"
echo "PROWLER_VERSION=${PROWLER_VERSION}" >> "${GITHUB_ENV}"
echo "PROWLER_VERSION=${PROWLER_VERSION}" >> "${GITHUB_OUTPUT}"
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Public ECR
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: public.ecr.aws
username: ${{ secrets.PUBLIC_ECR_AWS_ACCESS_KEY_ID }}
@@ -67,32 +114,32 @@ jobs:
AWS_REGION: ${{ env.AWS_REGION }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Build container image (latest)
- name: Build and push container image (latest)
if: github.event_name == 'push'
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
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 }}
file: ${{ env.DOCKERFILE_PATH }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build container image (release)
- name: Build and push container image (release)
if: github.event_name == 'release'
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
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.PROWLER_VERSION }}
${{ 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.PROWLER_VERSION }}
${{ secrets.PUBLIC_ECR_REPOSITORY }}/${{ env.IMAGE_NAME }}:${{ env.STABLE_TAG }}
file: ${{ env.DOCKERFILE_PATH }}
cache-from: type=gha
@@ -102,16 +149,26 @@ jobs:
needs: container-build-push
runs-on: ubuntu-latest
steps:
- name: Get latest commit info
- name: Get latest commit info (latest)
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'
- name: Dispatch event (latest)
if: github.event_name == 'push' && needs.container-build-push.outputs.prowler_version_major == '3'
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'
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":"v3-latest", "tag": "${{ env.LATEST_COMMIT_HASH }}"}}'
- name: Dispatch event (release)
if: github.event_name == 'release' && needs.container-build-push.outputs.prowler_version_major == '3'
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 }}"}}'
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":"${{ needs.container-build-push.outputs.prowler_version }}"}}'

View File

@@ -13,10 +13,10 @@ name: "CodeQL"
on:
push:
branches: [ "master", prowler-2, prowler-3.0-dev ]
branches: [ "master", "v3" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
branches: [ "master", "v3" ]
schedule:
- cron: '00 12 * * *'
@@ -37,11 +37,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -52,6 +52,6 @@ jobs:
# queries: security-extended,security-and-quality
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

View File

@@ -7,12 +7,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: TruffleHog OSS
uses: trufflesecurity/trufflehog@v3.4.4
uses: trufflesecurity/trufflehog@v3.73.0
with:
path: ./
base: ${{ github.event.repository.default_branch }}
head: HEAD
extra_args: --only-verified

16
.github/workflows/labeler.yml vendored Normal file
View File

@@ -0,0 +1,16 @@
name: "Pull Request Labeler"
on:
pull_request_target:
branches:
- "master"
- "v3"
jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5

View File

@@ -4,29 +4,44 @@ on:
push:
branches:
- "master"
- "v3"
pull_request:
branches:
- "master"
- "v3"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Test if changes are in not ignored paths
id: are-non-ignored-files-changed
uses: tj-actions/changed-files@v44
with:
files: ./**
files_ignore: |
.github/**
README.md
docs/**
permissions/**
mkdocs.yml
- name: Install poetry
if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true'
run: |
python -m pip install --upgrade pip
pipx install poetry
python -m pip install --upgrade pip
pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true'
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
cache: "poetry"
- name: Install dependencies
if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true'
run: |
poetry install
poetry run pip list
@@ -36,29 +51,43 @@ jobs:
) && 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
if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true'
run: |
poetry lock --check
- name: Lint with flake8
if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true'
run: |
poetry run flake8 . --ignore=E266,W503,E203,E501,W605,E128 --exclude contrib
- name: Checking format with black
if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true'
run: |
poetry run black --check .
- name: Lint with pylint
if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true'
run: |
poetry run pylint --disable=W,C,R,E -j 0 -rn -sn prowler/
- name: Bandit
if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true'
run: |
poetry run bandit -q -lll -x '*_test.py,./contrib/' -r .
- name: Safety
if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true'
run: |
poetry run safety check
- name: Vulture
if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true'
run: |
poetry run vulture --exclude "contrib" --min-confidence 100 .
- name: Hadolint
if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true'
run: |
/tmp/hadolint Dockerfile --ignore=DL3013
- name: Test with pytest
if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true'
run: |
poetry run pytest tests -n auto
poetry run pytest -n auto --cov=./prowler --cov-report=xml tests
- name: Upload coverage reports to Codecov
if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true'
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

View File

@@ -6,7 +6,10 @@ on:
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
GITHUB_BRANCH: master
PYTHON_VERSION: 3.11
CACHE: "poetry"
# TODO: create a bot user for this kind of tasks, like prowler-bot
GIT_COMMITTER_EMAIL: "sergio@prowler.com"
jobs:
release-prowler-job:
@@ -15,63 +18,80 @@ jobs:
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
with:
ref: ${{ env.GITHUB_BRANCH }}
- name: Get Prowler version
run: |
PROWLER_VERSION="${{ env.RELEASE_TAG }}"
case ${PROWLER_VERSION%%.*} in
3)
echo "Releasing Prowler v3 with tag ${PROWLER_VERSION}"
;;
4)
echo "Releasing Prowler v4 with tag ${PROWLER_VERSION}"
;;
*)
echo "Releasing another Prowler major version, aborting..."
exit 1
;;
esac
- uses: actions/checkout@v4
- name: Install dependencies
run: |
pipx install poetry
pipx inject poetry poetry-bumpversion
- name: setup python
uses: actions/setup-python@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.9
cache: 'poetry'
- name: Change version and Build package
python-version: ${{ env.PYTHON_VERSION }}
cache: ${{ env.CACHE }}
- name: Update Poetry and config version
run: |
poetry version ${{ env.RELEASE_TAG }}
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Push updated version to the release tag
run: |
# Configure Git
git config user.name "github-actions"
git config user.email "<noreply@github.com>"
git config user.email "${{ env.GIT_COMMITTER_EMAIL }}"
# Add the files with the version changed
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 commit -m "chore(release): ${{ env.RELEASE_TAG }}" --no-verify -S
# Replace the tag with the version updated
git tag -fa ${{ env.RELEASE_TAG }} -m "chore(release): ${{ env.RELEASE_TAG }}" --sign
# Push the tag
git push -f origin ${{ env.RELEASE_TAG }}
- name: Build Prowler package
run: |
poetry build
- name: Publish prowler package to PyPI
- 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.
# 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
env:
COMMITTER_TOKEN: ${{ secrets.PROWLER_ACCESS_TOKEN }}
- name: Replicate PyPi Package
- 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 }}

View File

@@ -23,12 +23,12 @@ jobs:
# 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
- uses: actions/checkout@v4
with:
ref: ${{ env.GITHUB_BRANCH }}
- name: setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.9 #install the python needed
@@ -38,7 +38,7 @@ jobs:
pip install boto3
- name: Configure AWS Credentials -- DEV
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ env.AWS_REGION_DEV }}
role-to-assume: ${{ secrets.DEV_IAM_ROLE_ARN }}
@@ -50,12 +50,12 @@ jobs:
# Create pull request
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v6
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"
labels: "status/waiting-for-revision, severity/low, provider/aws, backport-v3"
title: "chore(regions_update): Changes in regions for AWS services."
body: |
### Description

11
.gitignore vendored
View File

@@ -9,8 +9,9 @@
__pycache__
venv/
build/
dist/
/dist/
*.egg-info/
*/__pycache__/*.pyc
# Session
Session.vim
@@ -46,3 +47,11 @@ junit-reports/
# .env
.env*
# Coverage
.coverage*
.coverage
coverage*
# Node
node_modules

View File

@@ -1,7 +1,7 @@
repos:
## GENERAL
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-merge-conflict
- id: check-yaml
@@ -15,19 +15,21 @@ repos:
## TOML
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.7.0
rev: v2.12.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
exclude: contrib
## PYTHON
- repo: https://github.com/myint/autoflake
rev: v2.0.1
rev: v2.2.1
hooks:
- id: autoflake
args:
@@ -38,28 +40,29 @@ repos:
]
- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/psf/black
rev: 23.1.0
rev: 24.1.1
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 7.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
rev: 1.7.0
hooks:
- id: poetry-check
- id: poetry-lock
args: ["--no-update"]
- repo: https://github.com/hadolint/hadolint
rev: v2.12.1-beta
@@ -73,17 +76,23 @@ repos:
name: pylint
entry: bash -c 'pylint --disable=W,C,R,E -j 0 -rn -sn prowler/'
language: system
files: '.*\.py'
- id: pytest-check
name: pytest-check
entry: bash -c 'pytest tests -n auto'
- id: trufflehog
name: TruffleHog
description: Detect secrets in your data.
entry: bash -c 'trufflehog --no-update git file://. --only-verified --fail'
# For running trufflehog in docker, use the following entry instead:
# entry: bash -c 'docker run -v "$(pwd):/workdir" -i --rm trufflesecurity/trufflehog:latest git file:///workdir --only-verified --fail'
language: system
stages: ["commit", "push"]
- 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
files: '.*\.py'
- id: safety
name: safety
@@ -96,3 +105,4 @@ repos:
description: "Vulture finds unused code in Python programs."
entry: bash -c 'vulture --exclude "contrib" --min-confidence 100 .'
language: system
files: '.*\.py'

View File

@@ -8,16 +8,18 @@ version: 2
build:
os: "ubuntu-22.04"
tools:
python: "3.9"
python: "3.11"
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
- python -m pip install poetry
post_install:
- poetry install -E docs
# Install dependencies with 'docs' dependency group
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
# VIRTUAL_ENV needs to be set manually for now.
# See https://github.com/readthedocs/readthedocs.org/pull/11152/
- VIRTUAL_ENV=${READTHEDOCS_VIRTUALENV_PATH} python -m poetry install --only=docs
mkdocs:
configuration: mkdocs.yml

View File

@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at community@prowler.cloud. All
reported by contacting the project team at [support.prowler.com](https://customer.support.prowler.com/servicedesk/customer/portals). All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.

13
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,13 @@
# Do you want to learn on how to...
- Contribute with your code or fixes to Prowler
- Create a new check for a provider
- Create a new security compliance framework
- Add a custom output format
- Add a new integration
- Contribute with documentation
Want some swag as appreciation for your contribution?
# Prowler Developer Guide
https://docs.prowler.com/projects/prowler-open-source/en/latest/developer-guide/introduction/

View File

@@ -1,9 +1,10 @@
FROM python:3.9-alpine
FROM python:3.12-alpine
LABEL maintainer="https://github.com/prowler-cloud/prowler"
# Update system dependencies
RUN apk --no-cache upgrade
#hadolint ignore=DL3018
RUN apk --no-cache upgrade && apk --no-cache add curl
# Create nonroot user
RUN mkdir -p /home/prowler && \
@@ -14,7 +15,8 @@ USER prowler
# Copy necessary files
WORKDIR /home/prowler
COPY prowler/ /home/prowler/prowler/
COPY prowler/ /home/prowler/prowler/
COPY dashboard/ /home/prowler/dashboard/
COPY pyproject.toml /home/prowler
COPY README.md /home/prowler
@@ -25,6 +27,10 @@ ENV PATH="$HOME/.local/bin:$PATH"
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir .
# Remove deprecated dash dependencies
RUN pip uninstall dash-html-components -y && \
pip uninstall dash-core-components -y
# 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

View File

@@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2018 Netflix, Inc.
Copyright @ 2024 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.

View File

@@ -2,12 +2,19 @@
##@ Testing
test: ## Test with pytest
pytest -n auto -vvv -s -x
rm -rf .coverage && \
pytest -n auto -vvv -s --cov=./prowler --cov-report=xml tests
coverage: ## Show Test Coverage
coverage run --skip-covered -m pytest -v && \
coverage report -m && \
rm -rf .coverage
rm -rf .coverage && \
coverage report -m
coverage-html: ## Show Test Coverage
rm -rf ./htmlcov && \
coverage html && \
open htmlcov/index.html
##@ Linting
format: ## Format Code
@@ -20,7 +27,7 @@ lint: ## Lint Code
@echo "Running black... "
black --check .
@echo "Running pylint..."
pylint --disable=W,C,R,E -j 0 providers lib util config
pylint --disable=W,C,R,E -j 0 prowler util
##@ PyPI
pypi-clean: ## Delete the distribution files

236
README.md
View File

@@ -1,25 +1,31 @@
<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%">
<img align="center" src="https://github.com/prowler-cloud/prowler/blob/master/docs/img/prowler-logo-black.png?raw=True#gh-light-mode-only" width="350" height="115">
<img align="center" src="https://github.com/prowler-cloud/prowler/blob/master/docs/img/prowler-logo-white.png?raw=True#gh-dark-mode-only" width="350" height="115">
</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>
<b><i>Prowler SaaS </b> and <b>Prowler Open Source</b> are as dynamic and adaptable as the environment theyre meant to protect. Trusted by the leaders in security.
</p>
<p align="center">
<b>Learn more at <a href="https://prowler.com">prowler.com</i></b>
</p>
<p align="center">
<a href="https://join.slack.com/t/prowler-workspace/shared_invite/zt-1hix76xsl-2uq222JIXrC7Q8It~9ZNog"><img width="30" height="30" alt="Prowler community on Slack" src="https://github.com/prowler-cloud/prowler/assets/3985464/3617e470-670c-47c9-9794-ce895ebdb627"></a>
<br>
<a href="https://join.slack.com/t/prowler-workspace/shared_invite/zt-1hix76xsl-2uq222JIXrC7Q8It~9ZNog">Join our Prowler community!</a>
</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://pypi.org/project/prowler/"><img alt="Python Version" src="https://img.shields.io/pypi/v/prowler.svg"></a>
<a href="https://pypi.python.org/pypi/prowler/"><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>
<a href="https://codecov.io/gh/prowler-cloud/prowler"><img src="https://codecov.io/gh/prowler-cloud/prowler/graph/badge.svg?token=OflBGsdpDl"/></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>
@@ -31,39 +37,56 @@
<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>
<hr>
# 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.
**Prowler** is an Open Source security tool to perform AWS, Azure, Google Cloud and Kubernetes security best practices assessments, audits, incident response, continuous monitoring, hardening and forensics readiness, and also remediations! We have Prowler CLI (Command Line Interface) that we call Prowler Open Source and a service on top of it that we call <a href="https://prowler.com">Prowler SaaS</a>.
It contains hundreds of controls covering CIS, PCI-DSS, ISO27001, GDPR, HIPAA, FFIEC, SOC2, AWS FTR, ENS and custom security frameworks.
## Prowler CLI
# 📖 Documentation
```console
prowler <provider>
```
![Prowler CLI Execution](docs/img/short-display.png)
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.
## Prowler Dashboard
# ⚙️ Install
```console
prowler dashboard
```
![Prowler Dashboard](docs/img/dashboard.png)
It contains hundreds of controls covering CIS, NIST 800, NIST CSF, CISA, RBI, FedRAMP, PCI-DSS, GDPR, HIPAA, FFIEC, SOC2, GXP, AWS Well-Architected Framework Security Pillar, AWS Foundational Technical Review (FTR), ENS (Spanish National Security Scheme) and your custom security frameworks.
| Provider | Checks | Services | [Compliance Frameworks](https://docs.prowler.com/projects/prowler-open-source/en/latest/tutorials/compliance/) | [Categories](https://docs.prowler.com/projects/prowler-open-source/en/latest/tutorials/misc/#categories) |
|---|---|---|---|---|
| AWS | 304 | 61 -> `prowler aws --list-services` | 28 -> `prowler aws --list-compliance` | 6 -> `prowler aws --list-categories` |
| GCP | 75 | 11 -> `prowler gcp --list-services` | 1 -> `prowler gcp --list-compliance` | 2 -> `prowler gcp --list-categories`|
| Azure | 127 | 16 -> `prowler azure --list-services` | 2 -> `prowler azure --list-compliance` | 2 -> `prowler azure --list-categories` |
| Kubernetes | 83 | 7 -> `prowler kubernetes --list-services` | 1 -> `prowler kubernetes --list-compliance` | 7 -> `prowler kubernetes --list-categories` |
# 💻 Installation
## 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:
Prowler is available as a project in [PyPI](https://pypi.org/project/prowler-cloud/), thus can be installed using pip with Python >= 3.9, < 3.13:
```console
pip install prowler
prowler -v
```
More details at https://docs.prowler.cloud
More details at [https://docs.prowler.com](https://docs.prowler.com/projects/prowler-open-source/en/latest/)
## Containers
The available versions of Prowler are the following:
- `latest`: in sync with master branch (bear in mind that it is not a stable version)
- `latest`: in sync with `master` branch (bear in mind that it is not a stable version)
- `v3-latest`: in sync with `v3` 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.
- `v3-stable`: this tag always point to the latest release for v3.
The container images are available here:
- [DockerHub](https://hub.docker.com/r/toniblyx/prowler/tags)
@@ -71,7 +94,7 @@ The container images are available here:
## From Github
Python >= 3.9 is required with pip and poetry:
Python >= 3.9, < 3.13 is required with pip and poetry:
```
git clone https://github.com/prowler-cloud/prowler
@@ -83,167 +106,30 @@ python prowler.py -v
# 📐✏️ High level architecture
You can run Prowler from your workstation, an EC2 instance, Fargate or any other container, Codebuild, CloudShell and Cloud9.
You can run Prowler from your workstation, a Kubernetes Job, a Google Compute Engine, an Azure VM, an EC2 instance, Fargate or any other container, CloudShell and many more.
![Architecture](https://github.com/prowler-cloud/prowler/blob/62c1ce73bbcdd6b9e5ba03dfcae26dfd165defd9/docs/img/architecture.png?raw=True)
![Architecture](docs/img/architecture.png)
# 📝 Requirements
# Deprecations from v3
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
## General
- `Allowlist` now is called `Mutelist`.
- The `--quiet` option has been deprecated, now use the `--status` flag to select the finding's status you want to get from PASS, FAIL or MANUAL.
- All `INFO` finding's status has changed to `MANUAL`.
- The CSV output format is common for all the providers.
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):
```console
aws configure
```
or
```console
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 following AWS managed policies to the user or role being used:
- arn:aws:iam::aws:policy/SecurityAudit
- arn:aws:iam::aws:policy/job-function/ViewOnlyAccess
> 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"
```
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
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.
### Permissions
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>
```
![Prowler Execution](https://github.com/prowler-cloud/prowler/blob/b91b0103ff38e66a915c8a0ed84905a07e4aae1d/docs/img/short-display.png?raw=True)
> 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
```
The html report will be located in the `output` directory as the other files and it will look like:
![Prowler Execution](https://github.com/prowler-cloud/prowler/blob/62c1ce73bbcdd6b9e5ba03dfcae26dfd165defd9/docs/img/html-output.png?raw=True)
You can use `-l`/`--list-checks` or `--list-services` to list all available checks or services within the provider.
```console
prowler <provider> --list-checks
prowler <provider> --list-services
```
For executing specific checks or services you can use options `-c`/`--checks` or `-s`/`--services`:
```console
prowler aws --checks s3_bucket_public_access
prowler aws --services s3 ec2
```
Also, checks and services can be excluded with options `-e`/`--excluded-checks` or `--excluded-services`:
```console
prowler aws --excluded-checks s3_bucket_public_access
prowler aws --excluded-services s3 ec2
```
You can always use `-h`/`--help` to access to the usage information and all the possible options:
```console
prowler -h
```
## 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
```
We have deprecated some of our outputs formats:
- The HTML is replaced for the new Prowler Dashboard, run `prowler dashboard`.
- The native JSON is replaced for the JSON [OCSF](https://schema.ocsf.io/) v1.1.0, common for all the providers.
## AWS
- Deprecate the AWS flag --sts-endpoint-region since we use AWS STS regional tokens.
- To send only FAILS to AWS Security Hub, now use either `--send-sh-only-fails` or `--security-hub --status FAIL`.
Use a custom AWS profile with `-p`/`--profile` and/or AWS regions which you want to audit with `-f`/`--filter-region`:
```console
prowler aws --profile custom-profile -f us-east-1 eu-south-2
```
> By default, `prowler` will scan all AWS regions.
# 📖 Documentation
## Azure
With Azure you need to specify which auth method is going to be used:
```console
prowler azure [--sp-env-auth, --az-cli-auth, --browser-auth, --managed-identity-auth]
```
> By default, `prowler` will scan all Azure subscriptions.
# 🎉 New Features
- 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!
Install, Usage, Tutorials and Developer Guide is at https://docs.prowler.com/
# 📃 License

View File

@@ -14,7 +14,7 @@ As an **AWS Partner** and we have passed the [AWS Foundation Technical Review (F
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.
The information you share with ProwlerPro as part of this process is kept confidential within ProwlerPro. 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.

View File

@@ -1,17 +1,8 @@
#!/bin/bash
# Install system dependencies
sudo yum -y install openssl-devel bzip2-devel libffi-devel gcc
# Upgrade to Python 3.9
cd /tmp && wget https://www.python.org/ftp/python/3.9.13/Python-3.9.13.tgz
tar zxf Python-3.9.13.tgz
cd Python-3.9.13/ || exit
./configure --enable-optimizations
sudo make altinstall
python3.9 --version
# Install Prowler
cd ~ || exit
python3.9 -m pip install prowler-cloud
prowler -v
# Run Prowler
prowler
sudo bash
adduser prowler
su prowler
pip install prowler
cd /tmp
prowler aws

View File

@@ -1,45 +1,24 @@
# Build command
# docker build --platform=linux/amd64 --no-cache -t prowler:latest .
FROM public.ecr.aws/amazonlinux/amazonlinux:2022
ARG PROWLER_VERSION=latest
ARG PROWLERVER=2.9.0
ARG USERNAME=prowler
ARG USERID=34000
FROM toniblyx/prowler:${PROWLER_VERSION}
# Install Dependencies
RUN \
dnf update -y && \
dnf install -y bash file findutils git jq python3 python3-pip \
python3-setuptools python3-wheel shadow-utils tar unzip which && \
dnf remove -y awscli && \
dnf clean all && \
useradd -l -s /bin/sh -U -u ${USERID} ${USERNAME} && \
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
pip3 install --no-cache-dir --upgrade pip && \
pip3 install --no-cache-dir "git+https://github.com/ibm/detect-secrets.git@master#egg=detect-secrets" && \
rm -rf aws awscliv2.zip /var/cache/dnf
USER 0
# hadolint ignore=DL3018
RUN apk --no-cache add bash aws-cli jq
# Place script and env vars
COPY .awsvariables run-prowler-securityhub.sh /
ARG MULTI_ACCOUNT_SECURITY_HUB_PATH=/home/prowler/multi-account-securityhub
# Installs prowler and change permissions
RUN \
curl -L "https://github.com/prowler-cloud/prowler/archive/refs/tags/${PROWLERVER}.tar.gz" -o "prowler.tar.gz" && \
tar xvzf prowler.tar.gz && \
rm -f prowler.tar.gz && \
mv prowler-${PROWLERVER} prowler && \
chown ${USERNAME}:${USERNAME} /run-prowler-securityhub.sh && \
chmod 500 /run-prowler-securityhub.sh && \
chown ${USERNAME}:${USERNAME} /.awsvariables && \
chmod 400 /.awsvariables && \
chown ${USERNAME}:${USERNAME} -R /prowler && \
chmod +x /prowler/prowler
USER prowler
# Drop to user
USER ${USERNAME}
# Move script and environment variables
RUN mkdir "${MULTI_ACCOUNT_SECURITY_HUB_PATH}"
COPY --chown=prowler:prowler .awsvariables run-prowler-securityhub.sh "${MULTI_ACCOUNT_SECURITY_HUB_PATH}"/
RUN chmod 500 "${MULTI_ACCOUNT_SECURITY_HUB_PATH}"/run-prowler-securityhub.sh & \
chmod 400 "${MULTI_ACCOUNT_SECURITY_HUB_PATH}"/.awsvariables
# Run script
ENTRYPOINT ["/run-prowler-securityhub.sh"]
WORKDIR ${MULTI_ACCOUNT_SECURITY_HUB_PATH}
ENTRYPOINT ["./run-prowler-securityhub.sh"]

View File

@@ -1,20 +1,17 @@
#!/bin/bash
# Run Prowler against All AWS Accounts in an AWS Organization
# Change Directory (rest of the script, assumes you're in the root directory)
cd / || exit
# Show Prowler Version
./prowler/prowler -V
prowler -v
# Source .awsvariables
# shellcheck disable=SC1091
source .awsvariables
# Get Values from Environment Variables
echo "ROLE: $ROLE"
echo "PARALLEL_ACCOUNTS: $PARALLEL_ACCOUNTS"
echo "REGION: $REGION"
echo "ROLE: ${ROLE}"
echo "PARALLEL_ACCOUNTS: ${PARALLEL_ACCOUNTS}"
echo "REGION: ${REGION}"
# Function to unset AWS Profile Variables
unset_aws() {
@@ -24,33 +21,33 @@ unset_aws
# Find THIS Account AWS Number
CALLER_ARN=$(aws sts get-caller-identity --output text --query "Arn")
PARTITION=$(echo "$CALLER_ARN" | cut -d: -f2)
THISACCOUNT=$(echo "$CALLER_ARN" | cut -d: -f5)
echo "THISACCOUNT: $THISACCOUNT"
echo "PARTITION: $PARTITION"
PARTITION=$(echo "${CALLER_ARN}" | cut -d: -f2)
THISACCOUNT=$(echo "${CALLER_ARN}" | cut -d: -f5)
echo "THISACCOUNT: ${THISACCOUNT}"
echo "PARTITION: ${PARTITION}"
# Function to Assume Role to THIS Account & Create Session
this_account_session() {
unset_aws
role_credentials=$(aws sts assume-role --role-arn arn:"$PARTITION":iam::"$THISACCOUNT":role/"$ROLE" --role-session-name ProwlerRun --output json)
AWS_ACCESS_KEY_ID=$(echo "$role_credentials" | jq -r .Credentials.AccessKeyId)
AWS_SECRET_ACCESS_KEY=$(echo "$role_credentials" | jq -r .Credentials.SecretAccessKey)
AWS_SESSION_TOKEN=$(echo "$role_credentials" | jq -r .Credentials.SessionToken)
role_credentials=$(aws sts assume-role --role-arn arn:"${PARTITION}":iam::"${THISACCOUNT}":role/"${ROLE}" --role-session-name ProwlerRun --output json)
AWS_ACCESS_KEY_ID=$(echo "${role_credentials}" | jq -r .Credentials.AccessKeyId)
AWS_SECRET_ACCESS_KEY=$(echo "${role_credentials}" | jq -r .Credentials.SecretAccessKey)
AWS_SESSION_TOKEN=$(echo "${role_credentials}" | jq -r .Credentials.SessionToken)
export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN
}
# Find AWS Master Account
this_account_session
AWSMASTER=$(aws organizations describe-organization --query Organization.MasterAccountId --output text)
echo "AWSMASTER: $AWSMASTER"
echo "AWSMASTER: ${AWSMASTER}"
# Function to Assume Role to Master Account & Create Session
master_account_session() {
unset_aws
role_credentials=$(aws sts assume-role --role-arn arn:"$PARTITION":iam::"$AWSMASTER":role/"$ROLE" --role-session-name ProwlerRun --output json)
AWS_ACCESS_KEY_ID=$(echo "$role_credentials" | jq -r .Credentials.AccessKeyId)
AWS_SECRET_ACCESS_KEY=$(echo "$role_credentials" | jq -r .Credentials.SecretAccessKey)
AWS_SESSION_TOKEN=$(echo "$role_credentials" | jq -r .Credentials.SessionToken)
role_credentials=$(aws sts assume-role --role-arn arn:"${PARTITION}":iam::"${AWSMASTER}":role/"${ROLE}" --role-session-name ProwlerRun --output json)
AWS_ACCESS_KEY_ID=$(echo "${role_credentials}" | jq -r .Credentials.AccessKeyId)
AWS_SECRET_ACCESS_KEY=$(echo "${role_credentials}" | jq -r .Credentials.SecretAccessKey)
AWS_SESSION_TOKEN=$(echo "${role_credentials}" | jq -r .Credentials.SessionToken)
export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN
}
@@ -60,20 +57,20 @@ ACCOUNTS_IN_ORGS=$(aws organizations list-accounts --query Accounts[*].Id --outp
# Run Prowler against Accounts in AWS Organization
echo "AWS Accounts in Organization"
echo "$ACCOUNTS_IN_ORGS"
for accountId in $ACCOUNTS_IN_ORGS; do
echo "${ACCOUNTS_IN_ORGS}"
for accountId in ${ACCOUNTS_IN_ORGS}; do
# shellcheck disable=SC2015
test "$(jobs | wc -l)" -ge $PARALLEL_ACCOUNTS && wait -n || true
test "$(jobs | wc -l)" -ge "${PARALLEL_ACCOUNTS}" && wait -n || true
{
START_TIME=$SECONDS
START_TIME=${SECONDS}
# Unset AWS Profile Variables
unset_aws
# Run Prowler
echo -e "Assessing AWS Account: $accountId, using Role: $ROLE on $(date)"
echo -e "Assessing AWS Account: ${accountId}, using Role: ${ROLE} on $(date)"
# Pipe stdout to /dev/null to reduce unnecessary Cloudwatch logs
./prowler/prowler -R "$ROLE" -A "$accountId" -M json-asff -q -S -f "$REGION" > /dev/null
prowler aws -R arn:"${PARTITION}":iam::"${accountId}":role/"${ROLE}" -q -S -f "${REGION}" > /dev/null
TOTAL_SEC=$((SECONDS - START_TIME))
printf "Completed AWS Account: $accountId in %02dh:%02dm:%02ds" $((TOTAL_SEC / 3600)) $((TOTAL_SEC % 3600 / 60)) $((TOTAL_SEC % 60))
printf "Completed AWS Account: ${accountId} in %02dh:%02dm:%02ds" $((TOTAL_SEC / 3600)) $((TOTAL_SEC % 3600 / 60)) $((TOTAL_SEC % 60))
echo ""
} &
done

View File

@@ -1,6 +1,6 @@
# Organizational Prowler with Serverless
Langage: [Korean](README_kr.md)
Language: [Korean](README_kr.md)
This project is created to apply prowler in a multi-account environment within AWS Organizations.
CloudWatch triggers CodeBuild every fixed time.
@@ -18,12 +18,12 @@ For more information on how to use prowler, see [here](https://github.com/prowle
2. **Master Account**
1. Deploy [ProwlerRole.yaml](templates/ProwlerRole.yaml) stack to CloudFormation in a bid to create resources to master account itself.
(The template will be also deployed for other member accounts as a StackSet)
- ProwlerCodeBuildAccount : Audit Acccount ID where CodeBuild resides. (preferably Audit/Security account)
- ProwlerCodeBuildAccount : Audit Account ID where CodeBuild resides. (preferably Audit/Security account)
- ProwlerCodeBuildRole : Role name to use in CodeBuild service
- ProwlerCrossAccountRole : Role name to assume for Cross account
- ProwlerS3 : The S3 bucket name where reports will be put
1. Create **StackSet** with [ProwlerRole.yaml](templates/ProwlerRole.yaml) to deploy Role into member accounts in AWS Organizations.
- ProwlerCodeBuildAccount : Audit Acccount ID where CodeBuild resides. (preferably Audit/Security account)
- ProwlerCodeBuildAccount : Audit Account ID where CodeBuild resides. (preferably Audit/Security account)
- ProwlerCodeBuildRole : Role name to use in CodeBuild service
- ProwlerCrossAccountRole : Role name to assume for Cross account
- ProwlerS3 : The S3 bucket name where reports will be put
@@ -45,4 +45,4 @@ For more information on how to use prowler, see [here](https://github.com/prowle
- ProwlerReportS3Account : The account where the report S3 bucket resides.
1. If you'd like to change the scheduled time,
1. You can change the cron expression of ScheduleExpression within [ProwlerCodeBuildStack.yaml](templates/ProwlerCodeBuildStack.yaml).
2. Alternatively, you can make changes directrly from Events > Rules > ProwlerExecuteRule > Actions > Edit in CloudWatch console.
2. Alternatively, you can make changes directly from Events > Rules > ProwlerExecuteRule > Actions > Edit in CloudWatch console.

View File

@@ -1,6 +1,6 @@
# Organizational Prowler with Serverless
Langage: [English](README.md)
Language: [English](README.md)
이 문서는 AWS Organization 내의 multi account 환경에서 prowler 를 적용하기 위해 작성된 문서입니다.
일정 시간마다 CloudWatch는 CodeBuild 를 트리거합니다.
@@ -22,7 +22,7 @@ prowler 의 자세한 사용방법은 [이 곳](https://github.com/prowler-cloud
[ProwlerRole.yaml](templates/ProwlerRole.yaml)
- ProwlerCodeBuildAccount : CodeBuild 가 있는 Audit Acccount ID
- ProwlerCodeBuildAccount : CodeBuild 가 있는 Audit Account ID
- ProwlerCodeBuildRole : CodeBuild의 생성될 Role 이름
- ProwlerCrossAccountRole : Cross account 용 Assume할 Role 이름
- ProwlerS3 : report 가 저장될 S3 bucket 명
@@ -30,7 +30,7 @@ prowler 의 자세한 사용방법은 [이 곳](https://github.com/prowler-cloud
[ProwlerRole.yaml](templates/ProwlerRole.yaml)
- ProwlerCodeBuildAccount : CodeBuild 가 있는 Audit Acccount
- ProwlerCodeBuildAccount : CodeBuild 가 있는 Audit Account
- ProwlerCodeBuildRole : CodeBuild에서 사용할 Role 이름
- ProwlerCrossAccountRole : Cross account 용 Assume할 Role 이름
- ProwlerS3 : report 가 저장될 S3 bucket 명

View File

@@ -2,7 +2,7 @@
## Introduction
The following demonstartes how to quickly install the resources necessary to perform a security baseline using Prowler. The speed is based on the prebuilt terraform module that can configure all the resources necessuary to run Prowler with the findings being sent to AWS Security Hub.
The following demonstrates how to quickly install the resources necessary to perform a security baseline using Prowler. The speed is based on the prebuilt terraform module that can configure all the resources necessary to run Prowler with the findings being sent to AWS Security Hub.
## Install
@@ -24,7 +24,7 @@ Installing Prowler with Terraform is simple and can be completed in under 1 minu
![Prowler Install](https://prowler-docs.s3.amazonaws.com/Prowler-Terraform-Install.gif)
- It is likely an error will return related to the SecurityHub subscription. This appears to be Terraform related and you can validate the configuration by navigating to the SecurityHub console. Click Integreations and search for Prowler. Take note of the green check where it says *Accepting findings*
- It is likely an error will return related to the SecurityHub subscription. This appears to be Terraform related and you can validate the configuration by navigating to the SecurityHub console. Click Integrations and search for Prowler. Take note of the green check where it says *Accepting findings*
![Prowler Subscription](https://prowler-docs.s3.amazonaws.com/Validate-Prowler-Subscription.gif)

View File

@@ -92,7 +92,7 @@ To make sure rules are working fine, run `/var/ossec/bin/ossec-logtest` and copy
```
You must see 3 phases goin on.
To check if there is any error you can enable the debug mode of `modulesd` setting the `wazuh_modules.debug=0` variable to 2 in `/var/ossec/etc/internal_options.conf` file. Restart wazun-manager and errors should appear in the `/var/ossec/logs/ossec.log` file.
To check if there is any error you can enable the debug mode of `modulesd` setting the `wazuh_modules.debug=0` variable to 2 in `/var/ossec/etc/internal_options.conf` file. Restart wazuh-manager and errors should appear in the `/var/ossec/logs/ossec.log` file.
## Thanks

2
dashboard/__init__.py Normal file
View File

@@ -0,0 +1,2 @@
DASHBOARD_PORT = 11666
DASHBOARD_ARGS = {"debug": True, "port": DASHBOARD_PORT, "use_reloader": False}

176
dashboard/__main__.py Normal file
View File

@@ -0,0 +1,176 @@
# Importing Packages
import sys
import warnings
import click
import dash
import dash_bootstrap_components as dbc
from colorama import Fore, Style
from dash import dcc, html
from dash.dependencies import Input, Output
from dashboard.config import folder_path_overview
from prowler.config.config import orange_color
from prowler.lib.banner import print_banner
warnings.filterwarnings("ignore")
cli = sys.modules["flask.cli"]
print_banner(verbose=False)
print(
f"{Fore.GREEN}Loading all CSV files from the folder {folder_path_overview} ...\n{Style.RESET_ALL}"
)
cli.show_server_banner = lambda *x: click.echo(
f"{Fore.YELLOW}NOTE:{Style.RESET_ALL} If you are a {Fore.GREEN}{Style.BRIGHT}Prowler SaaS{Style.RESET_ALL} customer and you want to use your data from your S3 bucket,\nrun: `{orange_color}aws s3 cp s3://<your-bucket>/output/csv ./output --recursive{Style.RESET_ALL}`\nand then run `prowler dashboard` again to load the new files."
)
# Initialize the app - incorporate css
dashboard = dash.Dash(
__name__,
external_stylesheets=[dbc.themes.DARKLY],
use_pages=True,
suppress_callback_exceptions=True,
title="Prowler Dashboard",
)
# Logo
prowler_logo = html.Img(
src="https://prowler.com/wp-content/uploads/logo-dashboard.png", alt="Prowler Logo"
)
menu_icons = {
"overview": "/assets/images/icons/overview.svg",
"compliance": "/assets/images/icons/compliance.svg",
}
# Function to generate navigation links
def generate_nav_links(current_path):
nav_links = []
for page in dash.page_registry.values():
# Gets the icon URL based on the page name
icon_url = menu_icons.get(page["name"].lower())
is_active = (
" bg-prowler-stone-950 border-r-4 border-solid border-prowler-lime"
if current_path == page["relative_path"]
else ""
)
link_class = f"block hover:bg-prowler-stone-950 hover:border-r-4 hover:border-solid hover:border-prowler-lime{is_active}"
link_content = html.Span(
[
html.Img(src=icon_url, className="w-5"),
html.Span(page["name"], className="font-medium text-base leading-6"),
],
className="flex justify-center lg:justify-normal items-center gap-x-3 py-2 px-3",
)
nav_link = html.Li(
dcc.Link(link_content, href=page["relative_path"], className=link_class)
)
nav_links.append(nav_link)
return nav_links
def generate_help_menu():
help_links = [
{
"title": "Help",
"url": "https://github.com/prowler-cloud/prowler/issues",
"icon": "/assets/images/icons/help.png",
},
{
"title": "Docs",
"url": "https://docs.prowler.com",
"icon": "/assets/images/icons/docs.png",
},
]
link_class = "block hover:bg-prowler-stone-950 hover:border-r-4 hover:border-solid hover:border-prowler-lime"
menu_items = []
for link in help_links:
menu_item = html.Li(
html.A(
html.Span(
[
html.Img(src=link["icon"], className="w-5"),
html.Span(
link["title"], className="font-medium text-base leading-6"
),
],
className="flex items-center gap-x-3 py-2 px-3",
),
href=link["url"],
target="_blank",
className=link_class,
)
)
menu_items.append(menu_item)
return menu_items
# Layout
dashboard.layout = html.Div(
[
dcc.Location(id="url", refresh=False),
html.Link(rel="icon", href="assets/favicon.ico"),
# Placeholder for dynamic navigation bar
html.Div(
[
html.Div(
id="navigation-bar", className="bg-prowler-stone-900 min-w-36 z-10"
),
html.Div(
[
dash.page_container,
],
id="content_select",
className="bg-prowler-white w-full col-span-11 h-screen mx-auto overflow-y-scroll no-scrollbar px-10 py-7",
),
],
className="grid custom-grid 2xl:custom-grid-large h-screen",
),
],
className="h-screen mx-auto",
)
# Callback to update navigation bar
@dashboard.callback(Output("navigation-bar", "children"), [Input("url", "pathname")])
def update_nav_bar(pathname):
return html.Div(
[
html.Div([prowler_logo], className="mb-8 px-3"),
html.H6(
"Dashboards",
className="px-3 text-prowler-stone-500 text-sm opacity-90 font-regular mb-2",
),
html.Nav(
[html.Ul(generate_nav_links(pathname), className="")],
className="flex flex-col gap-y-6",
),
html.Nav(
[
html.A(
[
html.Span(
[
html.Img(src="assets/favicon.ico", className="w-5"),
"Subscribe to prowler SaaS",
],
className="flex items-center gap-x-3",
),
],
href="https://prowler.com/",
target="_blank",
className="block p-3 uppercase text-xs hover:bg-prowler-stone-950 hover:border-r-4 hover:border-solid hover:border-prowler-lime",
),
html.Ul(generate_help_menu(), className=""),
],
className="flex flex-col gap-y-6 mt-auto",
),
],
className="flex flex-col bg-prowler-stone-900 py-7 h-full",
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="#FFF" aria-hidden="true" class="h-5 w-5" viewBox="0 0 24 24">
<path fill-rule="evenodd" d="M9 1.5H5.625c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5zm6.61 10.936a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 14.47a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25z" clip-rule="evenodd"/>
<path d="M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963z"/>
</svg>

After

Width:  |  Height:  |  Size: 650 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 734 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 934 B

View File

@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="#FFF" aria-hidden="true" class="h-5 w-5" viewBox="0 0 24 24">
<path fill-rule="evenodd" d="M2.25 13.5a8.25 8.25 0 0 1 8.25-8.25.75.75 0 0 1 .75.75v6.75H18a.75.75 0 0 1 .75.75 8.25 8.25 0 0 1-16.5 0z" clip-rule="evenodd"/>
<path fill-rule="evenodd" d="M12.75 3a.75.75 0 0 1 .75-.75 8.25 8.25 0 0 1 8.25 8.25.75.75 0 0 1-.75.75h-7.5a.75.75 0 0 1-.75-.75V3z" clip-rule="evenodd"/>
</svg>

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
dashboard/assets/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

1301
dashboard/assets/styles/dist/output.css vendored Normal file

File diff suppressed because it is too large Load Diff

2221
dashboard/common_methods.py Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,23 @@
import warnings
from dashboard.common_methods import get_section_containers_format2
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_format2(
aux, "REQUIREMENTS_ATTRIBUTES_SECTION", "REQUIREMENTS_ID"
)

View File

@@ -0,0 +1,23 @@
import warnings
from dashboard.common_methods import get_section_containers_format1
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_format1(
aux, "REQUIREMENTS_ATTRIBUTES_SECTION", "REQUIREMENTS_ID"
)

View File

@@ -0,0 +1,23 @@
import warnings
from dashboard.common_methods import get_section_containers_format1
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_format1(
aux, "REQUIREMENTS_ATTRIBUTES_SECTION", "REQUIREMENTS_ID"
)

View File

@@ -0,0 +1,22 @@
import warnings
from dashboard.common_methods import get_section_containers_format2
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ATTRIBUTES_NAME",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
]
return get_section_containers_format2(
aux, "REQUIREMENTS_ATTRIBUTES_NAME", "REQUIREMENTS_ATTRIBUTES_SECTION"
)

View File

@@ -0,0 +1,23 @@
import warnings
from dashboard.common_methods import get_section_containers_format2
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ATTRIBUTES_NAME",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
]
return get_section_containers_format2(
aux, "REQUIREMENTS_ATTRIBUTES_SECTION", "REQUIREMENTS_ATTRIBUTES_NAME"
)

View File

@@ -0,0 +1,24 @@
import warnings
from dashboard.common_methods import get_section_containers_cis
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_DESCRIPTION",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_cis(
aux, "REQUIREMENTS_ID", "REQUIREMENTS_ATTRIBUTES_SECTION"
)

View File

@@ -0,0 +1,24 @@
import warnings
from dashboard.common_methods import get_section_containers_cis
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_DESCRIPTION",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_cis(
aux, "REQUIREMENTS_ID", "REQUIREMENTS_ATTRIBUTES_SECTION"
)

View File

@@ -0,0 +1,24 @@
import warnings
from dashboard.common_methods import get_section_containers_cis
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_DESCRIPTION",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_cis(
aux, "REQUIREMENTS_ID", "REQUIREMENTS_ATTRIBUTES_SECTION"
)

View File

@@ -0,0 +1,24 @@
import warnings
from dashboard.common_methods import get_section_containers_cis
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_DESCRIPTION",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_cis(
aux, "REQUIREMENTS_ID", "REQUIREMENTS_ATTRIBUTES_SECTION"
)

View File

@@ -0,0 +1,24 @@
import warnings
from dashboard.common_methods import get_section_containers_cis
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_DESCRIPTION",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_cis(
aux, "REQUIREMENTS_ID", "REQUIREMENTS_ATTRIBUTES_SECTION"
)

View File

@@ -0,0 +1,24 @@
import warnings
from dashboard.common_methods import get_section_containers_cis
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_DESCRIPTION",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_cis(
aux, "REQUIREMENTS_ID", "REQUIREMENTS_ATTRIBUTES_SECTION"
)

View File

@@ -0,0 +1,24 @@
import warnings
from dashboard.common_methods import get_section_containers_cis
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_DESCRIPTION",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_cis(
aux, "REQUIREMENTS_ID", "REQUIREMENTS_ATTRIBUTES_SECTION"
)

View File

@@ -0,0 +1,24 @@
import warnings
from dashboard.common_methods import get_section_containers_cis
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_DESCRIPTION",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_cis(
aux, "REQUIREMENTS_ID", "REQUIREMENTS_ATTRIBUTES_SECTION"
)

View File

@@ -0,0 +1,23 @@
import warnings
from dashboard.common_methods import get_section_containers_format1
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_format1(
aux, "REQUIREMENTS_ATTRIBUTES_SECTION", "REQUIREMENTS_ID"
)

View File

@@ -0,0 +1,29 @@
import warnings
from dashboard.common_methods import get_section_containers_ens
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ATTRIBUTES_MARCO",
"REQUIREMENTS_ATTRIBUTES_CATEGORIA",
"REQUIREMENTS_ATTRIBUTES_IDGRUPOCONTROL",
"REQUIREMENTS_ATTRIBUTES_TIPO",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
]
return get_section_containers_ens(
aux,
"REQUIREMENTS_ATTRIBUTES_MARCO",
"REQUIREMENTS_ATTRIBUTES_CATEGORIA",
"REQUIREMENTS_ATTRIBUTES_IDGRUPOCONTROL",
"REQUIREMENTS_ATTRIBUTES_TIPO",
)

View File

@@ -0,0 +1,24 @@
import warnings
from dashboard.common_methods import get_section_containers_format3
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"REQUIREMENTS_DESCRIPTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_format3(
aux, "REQUIREMENTS_ATTRIBUTES_SECTION", "REQUIREMENTS_ID"
)

View File

@@ -0,0 +1,24 @@
import warnings
from dashboard.common_methods import get_section_containers_format3
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"REQUIREMENTS_DESCRIPTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_format3(
aux, "REQUIREMENTS_ATTRIBUTES_SECTION", "REQUIREMENTS_ID"
)

View File

@@ -0,0 +1,24 @@
import warnings
from dashboard.common_methods import get_section_containers_format3
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"REQUIREMENTS_DESCRIPTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_format3(
aux, "REQUIREMENTS_ATTRIBUTES_SECTION", "REQUIREMENTS_ID"
)

View File

@@ -0,0 +1,23 @@
import warnings
from dashboard.common_methods import get_section_containers_format1
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_format1(
aux, "REQUIREMENTS_ATTRIBUTES_SECTION", "REQUIREMENTS_ID"
)

View File

@@ -0,0 +1,24 @@
import warnings
from dashboard.common_methods import get_section_containers_format3
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"REQUIREMENTS_DESCRIPTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_format3(
aux, "REQUIREMENTS_ATTRIBUTES_SECTION", "REQUIREMENTS_ID"
)

View File

@@ -0,0 +1,23 @@
import warnings
from dashboard.common_methods import get_section_containers_format1
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_format1(
aux, "REQUIREMENTS_ATTRIBUTES_SECTION", "REQUIREMENTS_ID"
)

View File

@@ -0,0 +1,24 @@
import warnings
from dashboard.common_methods import get_section_containers_format3
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"REQUIREMENTS_DESCRIPTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_format3(
aux, "REQUIREMENTS_ATTRIBUTES_SECTION", "REQUIREMENTS_ID"
)

View File

@@ -0,0 +1,23 @@
import warnings
from dashboard.common_methods import get_section_container_iso
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ATTRIBUTES_CATEGORY",
"REQUIREMENTS_ATTRIBUTES_OBJETIVE_ID",
"REQUIREMENTS_ATTRIBUTES_OBJETIVE_NAME",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
]
return get_section_container_iso(
aux, "REQUIREMENTS_ATTRIBUTES_CATEGORY", "REQUIREMENTS_ATTRIBUTES_OBJETIVE_ID"
)

View File

@@ -0,0 +1,23 @@
import warnings
from dashboard.common_methods import get_section_containers_format2
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_SUBTECHNIQUES",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_format2(
aux, "REQUIREMENTS_ID", "REQUIREMENTS_SUBTECHNIQUES"
)

View File

@@ -0,0 +1,24 @@
import warnings
from dashboard.common_methods import get_section_containers_format3
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"REQUIREMENTS_DESCRIPTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_format3(
aux, "REQUIREMENTS_ATTRIBUTES_SECTION", "REQUIREMENTS_ID"
)

View File

@@ -0,0 +1,24 @@
import warnings
from dashboard.common_methods import get_section_containers_format3
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"REQUIREMENTS_DESCRIPTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_format3(
aux, "REQUIREMENTS_ATTRIBUTES_SECTION", "REQUIREMENTS_ID"
)

View File

@@ -0,0 +1,24 @@
import warnings
from dashboard.common_methods import get_section_containers_format3
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"REQUIREMENTS_DESCRIPTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_format3(
aux, "REQUIREMENTS_ATTRIBUTES_SECTION", "REQUIREMENTS_ID"
)

View File

@@ -0,0 +1,24 @@
import warnings
from dashboard.common_methods import get_section_containers_format3
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"REQUIREMENTS_DESCRIPTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_format3(
aux, "REQUIREMENTS_ATTRIBUTES_SECTION", "REQUIREMENTS_ID"
)

View File

@@ -0,0 +1,20 @@
import warnings
from dashboard.common_methods import get_section_containers_pci
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
]
return get_section_containers_pci(aux, "REQUIREMENTS_ID")

View File

@@ -0,0 +1,20 @@
import warnings
from dashboard.common_methods import get_section_containers_rbi
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_DESCRIPTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
]
return get_section_containers_rbi(aux, "REQUIREMENTS_ID")

View File

@@ -0,0 +1,24 @@
import warnings
from dashboard.common_methods import get_section_containers_format3
warnings.filterwarnings("ignore")
def get_table(data):
aux = data[
[
"REQUIREMENTS_ID",
"REQUIREMENTS_DESCRIPTION",
"REQUIREMENTS_ATTRIBUTES_SECTION",
"CHECKID",
"STATUS",
"REGION",
"ACCOUNTID",
"RESOURCEID",
]
].copy()
return get_section_containers_format3(
aux, "REQUIREMENTS_ATTRIBUTES_SECTION", "REQUIREMENTS_ID"
)

32
dashboard/config.py Normal file
View File

@@ -0,0 +1,32 @@
import os
# Emojis to be used in the compliance table
pass_emoji = ""
fail_emoji = ""
info_emoji = ""
manual_emoji = "✋🏽"
# Main colors
fail_color = "#e67272"
pass_color = "#54d283"
info_color = "#2684FF"
manual_color = "#636c78"
# Muted colors
muted_fail_color = "#fca903"
muted_pass_color = "#03fccf"
muted_manual_color = "#b33696"
# Severity colors
critical_color = "#951649"
high_color = "#e11d48"
medium_color = "#ee6f15"
low_color = "#f9f5e6"
informational_color = "#3274d9"
# Folder output path
folder_path_overview = os.getcwd() + "/output"
folder_path_compliance = os.getcwd() + "/output/compliance"
# Encoding
encoding_format = "utf-8"

View File

@@ -0,0 +1,5 @@
def init_dashboard_parser(self):
"""Init the Dashboard CLI parser"""
# If we don't set `help="Dashboard"` this won't be rendered
# We don't want the dashboard to inherit from the common providers parser since it's a different component
self.subparsers.add_parser("dashboard")

157
dashboard/lib/cards.py Normal file
View File

@@ -0,0 +1,157 @@
from typing import List
from dash import html
def create_provider_card(
provider: str, provider_logo: str, account_type: str, filtered_data
) -> List[html.Div]:
"""
Card to display the provider's name and icon.
Args:
provider (str): Name of the provider.
provider_icon (str): Icon of the provider.
Returns:
html.Div: Card to display the provider's name and icon.
"""
accounts = len(
filtered_data[filtered_data["PROVIDER"] == provider]["ACCOUNT_UID"].unique()
)
checks_executed = len(
filtered_data[filtered_data["PROVIDER"] == provider]["CHECK_ID"].unique()
)
fails = len(
filtered_data[
(filtered_data["PROVIDER"] == provider)
& (filtered_data["STATUS"] == "FAIL")
]
)
passes = len(
filtered_data[
(filtered_data["PROVIDER"] == provider)
& (filtered_data["STATUS"] == "PASS")
]
)
# Take the values in the MUTED colum that are true for the provider
if "MUTED" in filtered_data.columns:
muted = len(
filtered_data[
(filtered_data["PROVIDER"] == provider)
& (filtered_data["MUTED"] == "True")
]
)
else:
muted = 0
return [
html.Div(
[
html.Div(
[
html.Div(
[
html.Div(
[
html.Div([provider_logo], className="w-8"),
],
className="p-2 shadow-box-up rounded-full",
),
html.H5(
f"{provider.upper()} {account_type}",
className="text-base font-semibold leading-snug tracking-normal text-gray-900",
),
],
className="flex justify-between items-center mb-3",
),
html.Div(
[
html.Div(
[
html.Span(
account_type,
className="text-prowler-stone-900 inline-block text-3xs font-bold uppercase transition-all rounded-lg text-prowler-stone-900 shadow-box-up px-4 py-1 text-center col-span-6 flex justify-center items-center",
),
html.Div(
accounts,
className="inline-block text-xs text-prowler-stone-900 font-bold shadow-box-down px-4 py-1 rounded-lg text-center col-span-5 col-end-13",
),
],
className="grid grid-cols-12",
),
html.Div(
[
html.Span(
"Checks",
className="text-prowler-stone-900 inline-block text-3xs font-bold uppercase transition-all rounded-lg text-prowler-stone-900 shadow-box-up px-4 py-1 text-center col-span-6 flex justify-center items-center",
),
html.Div(
checks_executed,
className="inline-block text-xs text-prowler-stone-900 font-bold shadow-box-down px-4 py-1 rounded-lg text-center col-span-5 col-end-13",
),
],
className="grid grid-cols-12",
),
html.Div(
[
html.Span(
"FAILED",
className="text-prowler-stone-900 inline-block text-3xs font-bold uppercase transition-all rounded-lg text-prowler-stone-900 shadow-box-up px-4 py-1 text-center col-span-6 flex justify-center items-center",
),
html.Div(
[
html.Div(
fails,
className="m-[2px] px-4 py-1 rounded-lg bg-gradient-failed",
),
],
className="inline-block text-xs font-bold shadow-box-down rounded-lg text-center col-span-5 col-end-13",
),
],
className="grid grid-cols-12",
),
html.Div(
[
html.Span(
"PASSED",
className="text-prowler-stone-900 inline-block text-3xs font-bold uppercase transition-all rounded-lg text-prowler-stone-900 shadow-box-up px-4 py-1 text-center col-span-6 flex justify-center items-center",
),
html.Div(
[
html.Div(
passes,
className="m-[2px] px-4 py-1 rounded-lg bg-gradient-passed",
),
],
className="inline-block text-xs font-bold shadow-box-down rounded-lg text-center col-span-5 col-end-13",
),
],
className="grid grid-cols-12",
),
html.Div(
[
html.Span(
"MUTED",
className="text-prowler-stone-900 inline-block text-3xs font-bold uppercase transition-all rounded-lg text-prowler-stone-900 shadow-box-up px-4 py-1 text-center col-span-6 flex justify-center items-center",
),
html.Div(
[
html.Div(
muted,
className="m-[2px] px-4 py-1 rounded-lg bg-gradient-muted",
),
],
className="inline-block text-xs font-bold shadow-box-down rounded-lg text-center col-span-5 col-end-13",
),
],
className="grid grid-cols-12",
),
],
className="grid gap-x-8 gap-y-4",
),
],
className="px-4 py-3",
),
],
className="relative flex flex-col bg-white shadow-provider rounded-xl w-full transition ease-in-out delay-100 hover:-translate-y-1 hover:scale-110 hover:z-50 hover:cursor-pointer",
)
]

289
dashboard/lib/dropdowns.py Normal file
View File

@@ -0,0 +1,289 @@
from dash import dcc, html
def create_date_dropdown(assesment_times: list) -> html.Div:
"""
Dropdown to select the date of the last available scan for each account.
Args:
assesment_times (list): List of dates of the last available scan for each account.
Returns:
html.Div: Dropdown to select the date of the last available scan for each account.
"""
return html.Div(
[
html.Div(
[
html.Label(
"Assessment date (last available scan) ",
className="text-prowler-stone-900 font-bold text-sm",
),
html.Img(
id="info-file-over",
src="/assets/images/icons/help-black.png",
className="w-5",
title="The date of the last available scan for each account is displayed here. If you have not run prowler yet, the date will be empty.",
),
],
style={"display": "inline-flex"},
),
dcc.Dropdown(
id="report-date-filter",
options=[
{"label": account, "value": account} for account in assesment_times
],
value=assesment_times[0],
clearable=False,
multi=False,
style={"color": "#000000", "width": "100%"},
),
],
)
def create_date_dropdown_compliance(assesment_times: list) -> html.Div:
"""
Dropdown to select the date of the last available scan for each account.
Args:
assesment_times (list): List of dates of the last available scan for each account.
Returns:
html.Div: Dropdown to select the date of the last available scan for each account.
"""
return html.Div(
[
html.Label(
"Assesment Date:", className="text-prowler-stone-900 font-bold text-sm"
),
dcc.Dropdown(
id="date-filter-analytics",
options=[
{"label": account, "value": account} for account in assesment_times
],
value=assesment_times[0],
clearable=False,
multi=False,
style={"color": "#000000", "width": "100%"},
),
],
)
def create_region_dropdown(regions: list) -> html.Div:
"""
Dropdown to select the region of the account.
Args:
regions (list): List of regions of the account.
Returns:
html.Div: Dropdown to select the region of the account.
"""
return html.Div(
[
html.Label(
"Region / Location / Namespace :",
className="text-prowler-stone-900 font-bold text-sm",
),
dcc.Dropdown(
id="region-filter",
options=[{"label": region, "value": region} for region in regions],
value=["All"], # Initial selection is ALL
clearable=False,
multi=True,
style={"color": "#000000", "width": "100%"},
),
],
)
def create_region_dropdown_compliance(regions: list) -> html.Div:
"""
Dropdown to select the region of the account.
Args:
regions (list): List of regions of the account.
Returns:
html.Div: Dropdown to select the region of the account.
"""
return html.Div(
[
html.Label(
"Region / Location / Namespace :",
className="text-prowler-stone-900 font-bold text-sm",
),
dcc.Dropdown(
id="region-filter-compliance",
options=[{"label": region, "value": region} for region in regions],
value=["All"], # Initial selection is ALL
clearable=False,
multi=True,
style={"color": "#000000", "width": "100%"},
),
],
)
def create_account_dropdown(accounts: list) -> html.Div:
"""
Dropdown to select the account.
Args:
accounts (list): List of accounts.
Returns:
html.Div: Dropdown to select the account.
"""
return html.Div(
[
html.Label(
"Account / Subscription / Project / Cluster :",
className="text-prowler-stone-900 font-bold text-sm",
),
dcc.Dropdown(
id="cloud-account-filter",
options=[{"label": account, "value": account} for account in accounts],
value=["All"], # Initial selection is ALL
clearable=False,
multi=True,
style={"color": "#000000", "width": "100%"},
),
],
)
def create_account_dropdown_compliance(accounts: list) -> html.Div:
"""
Dropdown to select the account.
Args:
accounts (list): List of accounts.
Returns:
html.Div: Dropdown to select the account.
"""
return html.Div(
[
html.Label(
"Account / Subscription / Project / Cluster :",
className="text-prowler-stone-900 font-bold text-sm",
),
dcc.Dropdown(
id="cloud-account-filter-compliance",
options=[{"label": account, "value": account} for account in accounts],
value=["All"], # Initial selection is ALL
clearable=False,
multi=True,
style={"color": "#000000", "width": "100%"},
),
],
)
def create_compliance_dropdown(compliance: list) -> html.Div:
"""
Dropdown to select the compliance.
Args:
compliance (list): List of compliance.
Returns:
html.Div: Dropdown to select the compliance.
"""
return html.Div(
[
html.Label(
"Compliance:", className="text-prowler-stone-900 font-bold text-sm"
),
dcc.Dropdown(
id="report-compliance-filter",
options=[{"label": i, "value": i} for i in compliance],
value=compliance[0],
clearable=False,
style={"color": "#000000"},
),
],
)
def create_severity_dropdown(severity: list) -> html.Div:
"""
Dropdown to select the severity.
Args:
severity (list): List of severity.
Returns:
html.Div: Dropdown to select the severity.
"""
return html.Div(
[
html.Label(
"Severity:", className="text-prowler-stone-900 font-bold text-sm"
),
dcc.Dropdown(
id="severity-filter",
options=[{"label": i, "value": i} for i in severity],
value=["All"],
clearable=False,
multi=True,
style={"color": "#000000"},
),
],
)
def create_service_dropdown(services: list) -> html.Div:
"""
Dropdown to select the service.
Args:
services (list): List of services.
Returns:
html.Div: Dropdown to select the service.
"""
return html.Div(
[
html.Label(
"Service:", className="text-prowler-stone-900 font-bold text-sm"
),
dcc.Dropdown(
id="service-filter",
options=[{"label": i, "value": i} for i in services],
value=["All"],
clearable=False,
multi=True,
style={"color": "#000000"},
),
],
)
def create_status_dropdown(status: list) -> html.Div:
"""
Dropdown to select the status.
Args:
status (list): List of status.
Returns:
html.Div: Dropdown to select the status.
"""
return html.Div(
[
html.Label("Status:", className="text-prowler-stone-900 font-bold text-sm"),
dcc.Dropdown(
id="status-filter",
options=[{"label": i, "value": i} for i in status],
value=["All"],
clearable=False,
multi=True,
style={"color": "#000000"},
),
],
)
def create_table_row_dropdown(table_rows: list) -> html.Div:
"""
Dropdown to select the number of rows in the table.
Args:
table_rows (list): List of number of rows.
Returns:
html.Div: Dropdown to select the number of rows in the table.
"""
return html.Div(
[
dcc.Dropdown(
id="table-rows",
options=[{"label": i, "value": i} for i in table_rows],
value=table_rows[0],
clearable=False,
style={"color": "#000000", "margin-right": "10px"},
),
],
)

174
dashboard/lib/layouts.py Normal file
View File

@@ -0,0 +1,174 @@
from dash import dcc, html
def create_layout_overview(
account_dropdown: html.Div,
date_dropdown: html.Div,
region_dropdown: html.Div,
download_button_csv: html.Button,
download_button_xlsx: html.Button,
severity_dropdown: html.Div,
service_dropdown: html.Div,
table_row_dropdown: html.Div,
status_dropdown: html.Div,
) -> html.Div:
"""
Create the layout of the dashboard.
Args:
account_dropdown (html.Div): Dropdown to select the account.
date_dropdown (html.Div): Dropdown to select the date of the last available scan for each account.
region_dropdown (html.Div): Dropdown to select the region of the account.
Returns:
html.Div: Layout of the dashboard.
"""
return html.Div(
[
dcc.Location(id="url", refresh=False),
html.Div(
[
html.H1(
"Scan Overview",
className="text-prowler-stone-900 text-2xxl font-bold",
),
html.Div(className="d-flex flex-wrap", id="subscribe_card"),
],
className="flex justify-between border-b border-prowler-500 pb-3",
),
html.Div(
[
html.Div([date_dropdown], className=""),
html.Div([account_dropdown], className=""),
html.Div([region_dropdown], className=""),
],
className="grid gap-x-4 gap-y-4 sm:grid-cols-2 lg:grid-cols-3 lg:gap-y-0",
),
html.Div(
[
html.Div([severity_dropdown], className=""),
html.Div([service_dropdown], className=""),
html.Div([status_dropdown], className=""),
],
className="grid gap-x-4 gap-y-4 sm:grid-cols-2 lg:grid-cols-3 lg:gap-y-0",
),
html.Div(
[
html.Div(className="flex", id="aws_card", n_clicks=0),
html.Div(className="flex", id="azure_card", n_clicks=0),
html.Div(className="flex", id="gcp_card", n_clicks=0),
html.Div(className="flex", id="k8s_card", n_clicks=0),
],
className="grid gap-x-4 gap-y-4 sm:grid-cols-2 lg:grid-cols-4 lg:gap-y-0",
),
html.H4(
"Count of Findings by severity",
className="text-prowler-stone-900 text-lg font-bold",
),
html.Div(
[
html.Div(
className="flex flex-col col-span-12 sm:col-span-6 lg:col-span-3 gap-y-4",
id="status_graph",
),
html.Div(
className="flex flex-col col-span-12 sm:col-span-6 lg:col-span-3 gap-y-4",
id="two_pie_chart",
),
html.Div(
className="flex flex-col col-span-12 sm:col-span-6 lg:col-span-6 col-end-13 gap-y-4",
id="line_plot",
),
],
className="grid gap-x-4 gap-y-4 grid-cols-12 lg:gap-y-0",
),
html.Div(
[
html.H4(
"Top Findings by Severity",
className="text-prowler-stone-900 text-lg font-bold",
),
html.Div(
[
(
html.Label(
"Table Rows:",
className="text-prowler-stone-900 font-bold text-sm",
style={"margin-right": "10px"},
)
),
table_row_dropdown,
download_button_csv,
download_button_xlsx,
],
className="flex justify-between items-center",
),
dcc.Download(id="download-data"),
],
className="flex justify-between items-center",
),
html.Div(id="table", className="grid"),
],
className="grid gap-x-8 gap-y-8 2xl:container mx-auto",
)
def create_layout_compliance(
account_dropdown: html.Div,
date_dropdown: html.Div,
region_dropdown: html.Div,
compliance_dropdown: html.Div,
) -> html.Div:
return html.Div(
[
dcc.Location(id="url", refresh=False),
html.Div(
[
html.H1(
"Compliance",
className="text-prowler-stone-900 text-2xxl font-bold",
),
html.A(
[
html.Img(src="assets/favicon.ico", className="w-5 mr-3"),
html.Span("Subscribe to prowler SaaS"),
],
href="https://prowler.pro/",
target="_blank",
className="text-prowler-stone-900 inline-flex px-4 py-2 text-xs font-bold uppercase transition-all rounded-lg text-gray-900 hover:bg-prowler-stone-900/10 border-solid border-1 hover:border-prowler-stone-900/10 hover:border-solid hover:border-1 border-prowler-stone-900/10",
),
],
className="flex justify-between border-b border-prowler-500 pb-3",
),
html.Div(
[
html.Div([date_dropdown], className=""),
html.Div([account_dropdown], className=""),
html.Div([region_dropdown], className=""),
html.Div([compliance_dropdown], className=""),
],
className="grid gap-x-4 gap-y-4 sm:grid-cols-2 lg:grid-cols-4 lg:gap-y-0",
),
html.Div(
[
html.Div(
className="flex flex-col col-span-12 md:col-span-4 gap-y-4",
id="overall_status_result_graph",
),
html.Div(
className="flex flex-col col-span-12 md:col-span-7 md:col-end-13 gap-y-4",
id="security_level_graph",
),
html.Div(
className="flex flex-col col-span-12 md:col-span-2 gap-y-4",
id="",
),
],
className="grid gap-x-4 gap-y-4 grid-cols-12 lg:gap-y-0",
),
html.H4(
"Details compliance:",
className="text-prowler-stone-900 text-lg font-bold",
),
html.Div(className="flex flex-wrap", id="output"),
],
className="grid gap-x-8 gap-y-8 2xl:container mx-auto",
)

View File

@@ -0,0 +1,593 @@
# Standard library imports
import csv
import glob
import importlib
import os
import re
import warnings
# Third-party imports
import dash
import pandas as pd
import plotly.express as px
from dash import callback, dcc, html
from dash.dependencies import Input, Output
# Config import
from dashboard.config import (
encoding_format,
fail_color,
folder_path_compliance,
info_color,
manual_color,
pass_color,
)
from dashboard.lib.dropdowns import (
create_account_dropdown_compliance,
create_compliance_dropdown,
create_date_dropdown_compliance,
create_region_dropdown_compliance,
)
from dashboard.lib.layouts import create_layout_compliance
# Suppress warnings
warnings.filterwarnings("ignore")
# Global variables
# TODO: Create a flag to let the user put a custom path
csv_files = []
for file in glob.glob(os.path.join(folder_path_compliance, "*.csv")):
with open(file, "r", newline="", encoding=encoding_format) as csvfile:
reader = csv.reader(csvfile)
num_rows = sum(1 for row in reader)
if num_rows > 1:
csv_files.append(file)
def load_csv_files(csv_files):
# Load CSV files into a single pandas DataFrame.
dfs = []
results = []
for file in csv_files:
df = pd.read_csv(file, sep=";", on_bad_lines="skip")
if "CHECKID" in df.columns:
dfs.append(df)
result = file
result = result.split("/")[-1]
result = re.sub(r"^.*?_", "", result)
result = result.replace(".csv", "")
result = result.upper()
if "AWS" in result:
if "AWS_" in result:
result = result.replace("_AWS", "")
else:
result = result.replace("_AWS", " - AWS")
if "GCP" in result:
result = result.replace("_GCP", " - GCP")
if "AZURE" in result:
result = result.replace("_AZURE", " - AZURE")
if "KUBERNETES" in result:
result = result.replace("_KUBERNETES", " - KUBERNETES")
result = result[result.find("CIS_") :]
results.append(result)
unique_results = set(results)
results = list(unique_results)
# Check if there is any CIS report in the list and divide it in level 1 and level 2
new_results = []
old_results = results.copy()
for compliance_name in results:
if "CIS_" in compliance_name:
old_results.remove(compliance_name)
new_results.append(compliance_name + " - Level_1")
new_results.append(compliance_name + " - Level_2")
results = old_results + new_results
results.sort()
# Handle the case where there are no CSV files
try:
data = pd.concat(dfs, ignore_index=True)
except ValueError:
data = None
return data, results
data, results = load_csv_files(csv_files)
if data is None:
dash.register_page(__name__)
layout = html.Div(
[
html.Div(
[
html.H5(
"No data found, check if the CSV files are in the correct folder.",
className="card-title",
style={"text-align": "left"},
)
],
style={
"width": "99%",
"margin-right": "0.8%",
"margin-bottom": "10px",
},
)
]
)
else:
data["ASSESSMENTDATE"] = pd.to_datetime(data["ASSESSMENTDATE"])
data["ASSESSMENT_TIME"] = data["ASSESSMENTDATE"].dt.strftime("%Y-%m-%d %H:%M:%S")
data_values = data["ASSESSMENT_TIME"].unique()
data_values.sort()
data_values = data_values[::-1]
aux = []
for value in data_values:
if value.split(" ")[0] not in [aux[i].split(" ")[0] for i in range(len(aux))]:
aux.append(value)
data_values = aux
data = data[data["ASSESSMENT_TIME"].isin(data_values)]
data["ASSESSMENT_TIME"] = data["ASSESSMENT_TIME"].apply(lambda x: x.split(" ")[0])
# Select Compliance - Dropdown
compliance_dropdown = create_compliance_dropdown(results)
# Select Account - Dropdown
select_account_dropdown_list = ["All"]
# Append to the list the unique values of the columns ACCOUNTID, PROJECTID and SUBSCRIPTIONID if they exist
if "ACCOUNTID" in data.columns:
select_account_dropdown_list = select_account_dropdown_list + list(
data["ACCOUNTID"].unique()
)
if "PROJECTID" in data.columns:
select_account_dropdown_list = select_account_dropdown_list + list(
data["PROJECTID"].unique()
)
if "SUBSCRIPTIONID" in data.columns:
select_account_dropdown_list = select_account_dropdown_list + list(
data["SUBSCRIPTIONID"].unique()
)
if "SUBSCRIPTION" in data.columns:
select_account_dropdown_list = select_account_dropdown_list + list(
data["SUBSCRIPTION"].unique()
)
list_items = []
for item in select_account_dropdown_list:
if item.__class__.__name__ == "str" and "nan" not in item:
list_items.append(item)
account_dropdown = create_account_dropdown_compliance(list_items)
# Select Region - Dropdown
select_region_dropdown_list = ["All"]
# Append to the list the unique values of the column REGION or LOCATION if it exists
if "REGION" in data.columns:
# Handle the case where the column REGION is empty
data["REGION"] = data["REGION"].fillna("-")
select_region_dropdown_list = select_region_dropdown_list + list(
data["REGION"].unique()
)
if "LOCATION" in data.columns:
# Handle the case where the column LOCATION is empty
data["LOCATION"] = data["LOCATION"].fillna("-")
select_region_dropdown_list = select_region_dropdown_list + list(
data["LOCATION"].unique()
)
# Clear the list from None and NaN values
list_items = []
for item in select_region_dropdown_list:
if item.__class__.__name__ == "str":
list_items.append(item)
region_dropdown = create_region_dropdown_compliance(list_items)
# Select Date - Dropdown
date_dropdown = create_date_dropdown_compliance(
list(data["ASSESSMENT_TIME"].unique())
)
dash.register_page(__name__)
layout = create_layout_compliance(
account_dropdown, date_dropdown, region_dropdown, compliance_dropdown
)
@callback(
[
Output("output", "children"),
Output("overall_status_result_graph", "children"),
Output("security_level_graph", "children"),
Output("cloud-account-filter-compliance", "value"),
Output("cloud-account-filter-compliance", "options"),
Output("region-filter-compliance", "value"),
Output("region-filter-compliance", "options"),
Output("date-filter-analytics", "value"),
Output("date-filter-analytics", "options"),
],
Input("report-compliance-filter", "value"),
Input("cloud-account-filter-compliance", "value"),
Input("region-filter-compliance", "value"),
Input("date-filter-analytics", "value"),
)
def display_data(
analytics_input, account_filter, region_filter_analytics, date_filter_analytics
):
current_compliance = analytics_input
analytics_input = analytics_input.replace(" - ", "_")
analytics_input = analytics_input.lower()
# Check if the compliance selected is the level 1 or level 2 of the CIS
is_level_1 = "level_1" in analytics_input
analytics_input = analytics_input.replace("_level_1", "").replace("_level_2", "")
# Filter the data based on the compliance selected
files = [file for file in csv_files if analytics_input in file]
def load_csv_files(files):
"""Load CSV files into a single pandas DataFrame."""
dfs = []
for file in files:
df = pd.read_csv(file, sep=";", on_bad_lines="skip")
dfs.append(df.astype(str))
return pd.concat(dfs, ignore_index=True)
data = load_csv_files(files)
# Rename the column LOCATION to REGION for GCP or Azure
if "gcp" in analytics_input or "azure" in analytics_input:
data = data.rename(columns={"LOCATION": "REGION"})
# Add the column ACCOUNTID to the data if the provider is kubernetes
if "kubernetes" in analytics_input:
data.rename(columns={"CONTEXT": "ACCOUNTID"}, inplace=True)
data.rename(columns={"NAMESPACE": "REGION"}, inplace=True)
if "REQUIREMENTS_ATTRIBUTES_PROFILE" in data.columns:
data["REQUIREMENTS_ATTRIBUTES_PROFILE"] = data[
"REQUIREMENTS_ATTRIBUTES_PROFILE"
].apply(lambda x: x.split(" - ")[0])
# Filter the chosen level of the CIS
if is_level_1:
data = data[data["REQUIREMENTS_ATTRIBUTES_PROFILE"] == "Level 1"]
# Rename the column PROJECTID to ACCOUNTID for GCP
if data.columns.str.contains("PROJECTID").any():
data.rename(columns={"PROJECTID": "ACCOUNTID"}, inplace=True)
# Rename the column SUBSCRIPTIONID to ACCOUNTID for Azure
if data.columns.str.contains("SUBSCRIPTIONID").any():
data.rename(columns={"SUBSCRIPTIONID": "ACCOUNTID"}, inplace=True)
# Handle v3 azure cis compliance
if data.columns.str.contains("SUBSCRIPTION").any():
data.rename(columns={"SUBSCRIPTION": "ACCOUNTID"}, inplace=True)
data["REGION"] = "-"
# Filter ACCOUNT
if account_filter == ["All"]:
updated_cloud_account_values = data["ACCOUNTID"].unique()
elif "All" in account_filter and len(account_filter) > 1:
# Remove 'All' from the list
account_filter.remove("All")
updated_cloud_account_values = account_filter
elif len(account_filter) == 0:
updated_cloud_account_values = data["ACCOUNTID"].unique()
account_filter = ["All"]
else:
updated_cloud_account_values = account_filter
data = data[data["ACCOUNTID"].isin(updated_cloud_account_values)]
account_filter_options = list(data["ACCOUNTID"].unique())
account_filter_options = account_filter_options + ["All"]
for item in account_filter_options:
if "nan" in item or item.__class__.__name__ != "str" or item is None:
account_filter_options.remove(item)
# Filter REGION
if region_filter_analytics == ["All"]:
updated_region_account_values = data["REGION"].unique()
elif "All" in region_filter_analytics and len(region_filter_analytics) > 1:
# Remove 'All' from the list
region_filter_analytics.remove("All")
updated_region_account_values = region_filter_analytics
elif len(region_filter_analytics) == 0:
updated_region_account_values = data["REGION"].unique()
region_filter_analytics = ["All"]
else:
updated_region_account_values = region_filter_analytics
data = data[data["REGION"].isin(updated_region_account_values)]
region_filter_options = list(data["REGION"].unique())
region_filter_options = region_filter_options + ["All"]
for item in region_filter_options:
if item == "nan" or item.__class__.__name__ != "str":
region_filter_options.remove(item)
data["ASSESSMENTDATE"] = pd.to_datetime(data["ASSESSMENTDATE"], errors="coerce")
data["ASSESSMENTDATE"] = data["ASSESSMENTDATE"].dt.strftime("%Y-%m-%d %H:%M:%S")
# Choosing the date that is the most recent
data_values = data["ASSESSMENTDATE"].unique()
data_values.sort()
data_values = data_values[::-1]
aux = []
data_values = [str(i) for i in data_values]
for value in data_values:
if value.split(" ")[0] not in [aux[i].split(" ")[0] for i in range(len(aux))]:
aux.append(value)
data_values = [str(i) for i in aux]
data = data[data["ASSESSMENTDATE"].isin(data_values)]
data["ASSESSMENTDATE"] = data["ASSESSMENTDATE"].apply(lambda x: x.split(" ")[0])
options_date = data["ASSESSMENTDATE"].unique()
options_date.sort()
options_date = options_date[::-1]
# Filter DATE
if date_filter_analytics in options_date:
data = data[data["ASSESSMENTDATE"] == date_filter_analytics]
else:
date_filter_analytics = options_date[0]
data = data[data["ASSESSMENTDATE"] == date_filter_analytics]
if data.empty:
fig = px.pie()
pie_1 = dcc.Graph(
figure=fig,
config={"displayModeBar": False},
style={"height": "250px", "width": "250px", "right": "0px"},
)
return [
html.Div(
[
html.H5(
"No data found for this compliance",
className="card-title",
style={"text-align": "left"},
)
],
style={
"width": "99%",
"margin-right": "0.8%",
"margin-bottom": "10px",
},
)
]
else:
# Check cases where the compliance start with AWS_
if "aws_" in analytics_input:
analytics_input = analytics_input + "_aws"
try:
current = analytics_input.replace(".", "_")
compliance_module = importlib.import_module(
f"dashboard.compliance.{current}"
)
data.drop_duplicates(keep="first", inplace=True)
table = compliance_module.get_table(data)
except ModuleNotFoundError:
table = html.Div(
[
html.H5(
"No data found for this compliance",
className="card-title",
style={"text-align": "left", "color": "black"},
)
],
style={
"width": "99%",
"margin-right": "0.8%",
"margin-bottom": "10px",
},
)
df = data.copy()
df = df.groupby(["STATUS"]).size().reset_index(name="counts")
df = df.sort_values(by=["counts"], ascending=False)
# Pie 1
pie_1 = get_pie(df)
# Get the pie2 depending on the compliance
df = data.copy()
current_filter = ""
if "pci" in analytics_input:
pie_2 = get_bar_graph(df, "REQUIREMENTS_ID")
current_filter = "req_id"
elif (
"REQUIREMENTS_ATTRIBUTES_SECTION" in df.columns
and not df["REQUIREMENTS_ATTRIBUTES_SECTION"].isnull().values.any()
):
pie_2 = get_bar_graph(df, "REQUIREMENTS_ATTRIBUTES_SECTION")
current_filter = "sections"
elif (
"REQUIREMENTS_ATTRIBUTES_CATEGORIA" in df.columns
and not df["REQUIREMENTS_ATTRIBUTES_CATEGORIA"].isnull().values.any()
):
pie_2 = get_bar_graph(df, "REQUIREMENTS_ATTRIBUTES_CATEGORIA")
current_filter = "categorias"
elif (
"REQUIREMENTS_ATTRIBUTES_CATEGORY" in df.columns
and not df["REQUIREMENTS_ATTRIBUTES_CATEGORY"].isnull().values.any()
):
pie_2 = get_bar_graph(df, "REQUIREMENTS_ATTRIBUTES_CATEGORY")
current_filter = "categories"
elif (
"REQUIREMENTS_ATTRIBUTES_SERVICE" in df.columns
and not df["REQUIREMENTS_ATTRIBUTES_SERVICE"].isnull().values.any()
):
pie_2 = get_bar_graph(df, "REQUIREMENTS_ATTRIBUTES_SERVICE")
current_filter = "services"
else:
fig = px.pie()
fig.update_layout(
margin=dict(l=0, r=0, t=0, b=0),
autosize=True,
showlegend=False,
paper_bgcolor="#303030",
)
pie_2 = dcc.Graph(
figure=fig,
config={"displayModeBar": False},
style={"height": "250px", "width": "250px", "right": "0px"},
)
current_filter = "none"
# Analytics table
if not analytics_input:
analytics_input = ""
table_output = get_table(current_compliance, table)
overall_status_result_graph = get_graph(pie_1, "Overall Status Result")
security_level_graph = get_graph(
pie_2, f"Top 5 failed {current_filter} by findings"
)
return (
table_output,
overall_status_result_graph,
security_level_graph,
account_filter,
account_filter_options,
region_filter_analytics,
region_filter_options,
date_filter_analytics,
options_date,
)
def get_graph(pie, title):
return [
html.Span(
title,
className="text-center text-prowler-stone-900 uppercase text-xs font-bold",
),
html.Div(
[pie],
className="",
style={
"display": "flex",
"justify-content": "center",
"align-items": "center",
"margin-top": "7%",
},
),
]
def get_bar_graph(df, column_name):
df = df[df["STATUS"] == "FAIL"]
df = df.groupby([column_name, "STATUS"]).size().reset_index(name="counts")
df = df.sort_values(by=["counts"], ascending=True)
# take the top 5
df = df.tail(5)
colums = df[column_name].unique()
# Cut the text if it is too long
for i in range(len(colums)):
if len(colums[i]) > 15:
colums[i] = colums[i][:15] + "..."
fig = px.bar(
df,
x="counts",
y=colums,
color="STATUS",
color_discrete_map={"FAIL": fail_color},
orientation="h",
)
fig.update_layout(
margin=dict(l=0, r=0, t=0, b=0),
autosize=True,
showlegend=False,
xaxis_title=None,
yaxis_title=None,
font=dict(size=14, color="#292524"),
hoverlabel=dict(font_size=12),
paper_bgcolor="#FFF",
)
return dcc.Graph(
figure=fig,
config={"displayModeBar": False},
style={"height": "20rem", "width": "40rem"},
)
def get_pie(df):
# Define custom colors
color_mapping = {
"FAIL": fail_color,
"PASS": pass_color,
"INFO": info_color,
"WARN": "#260000",
"MANUAL": manual_color,
}
# Use the color_discrete_map parameter to map categories to custom colors
fig = px.pie(
df,
names="STATUS",
values="counts",
hole=0.7,
color="STATUS",
color_discrete_map=color_mapping,
)
fig.update_traces(
hovertemplate=None,
textposition="outside",
textinfo="percent+label",
rotation=50,
)
fig.update_layout(
margin=dict(l=0, r=0, t=0, b=0),
autosize=True,
showlegend=False,
font=dict(size=14, color="#292524"),
hoverlabel=dict(font_size=12),
paper_bgcolor="#FFF",
)
pie = dcc.Graph(
figure=fig,
config={"displayModeBar": False},
style={"height": "20rem", "width": "20rem"},
)
return pie
def get_table(current_compliance, table):
return [
html.Div(
[
html.H5(
f"{current_compliance}",
className="text-prowler-stone-900 text-md font-bold uppercase mb-4",
),
table,
],
className="relative flex flex-col bg-white shadow-provider rounded-xl px-4 py-3 flex-wrap w-full",
),
]

1222
dashboard/pages/overview.py Normal file

File diff suppressed because it is too large Load Diff

112
dashboard/src/input.css Normal file
View File

@@ -0,0 +1,112 @@
/*
/*
/*
/*
/* Use this file to add custom styles using Tailwind's utility classes. */
@tailwind base;
@tailwind components;
@tailwind utilities;
#_dash-app-content {
@apply bg-prowler-stone-500;
}
@layer components {
.custom-grid {
grid-template-columns: minmax(0, 16fr) repeat(11, minmax(0, 11fr));
}
.custom-grid-large {
grid-template-columns: minmax(0, 10fr) repeat(11, minmax(0, 11fr));
}
/* Styles for the accordion in the compliance page */
#_dash-app-content .accordion .accordion-header .accordion-button {
@apply text-prowler-stone-900 inline-block px-4 text-xs font-bold uppercase transition-all rounded-lg bg-prowler-stone-300 hover:bg-prowler-stone-900/10;
}
#_dash-app-content .accordion .accordion-item {
@apply text-prowler-stone-900 bg-prowler-white rounded-lg;
}
#_dash-app-content .accordion .accordion-button:not(.collapsed) {
@apply text-prowler-stone-900 bg-prowler-stone-500;
}
#_dash-app-content .accordion .dash-table-container {
@apply grid;
}
#_dash-app-content .accordion table {
@apply rounded-lg;
}
/* Styles for thead */
#_dash-app-content .accordion th {
@apply text-prowler-white text-left bg-prowler-stone-900 text-xs py-1 font-bold;
}
/* Styles for td */
#_dash-app-content .accordion td {
@apply text-prowler-stone-900 text-left bg-prowler-white text-xs py-1 font-light;
}
/* Styles for table cells */
#_dash-app-content .accordion table tbody thead,
#_dash-app-content .accordion table tbody tr {
@apply w-full;
}
/* Check ID */
#_dash-app-content .accordion table th:nth-child(1) {
@apply w-[60%];
}
/* Status */
#_dash-app-content .accordion table th:nth-child(2) {
@apply w-[10%] text-center;
}
#_dash-app-content .accordion table td:nth-child(2) {
@apply text-center;
}
/* Region */
#_dash-app-content .accordion table th:nth-child(3) {
@apply w-[10%];
}
/* Account ID */
#_dash-app-content .accordion table th:nth-child(4) {
@apply w-[10%];
}
/* Resource ID */
#_dash-app-content .accordion table th:nth-child(5) {
@apply w-[10%];
}
#_dash-app-content .compliance-data-layout,
#_dash-app-content .accordion-body,
#_dash-app-content .compliance-data-layout .accordion.accordion-flush {
@apply grid gap-y-4;
}
#_dash-app-content .accordion-inner--child,
#_dash-app-content .accordion-inner {
@apply relative;
}
#_dash-app-content .info-bar {
@apply absolute left-1/2 transform -translate-x-1/2 top-2 h-8 z-50;
}
#_dash-app-content .info-bar-child {
@apply absolute right-6 top-2 w-auto h-8 z-50;
}
@layer utilities {
/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
}

View File

@@ -0,0 +1,90 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./assets/**/*.{py,html,js}",
"./components/**/*.{py,html,js}",
"./pages/**/*.{py,html,js}",
"./utils/**/*.{py,html,js}",
"./app.py",
],
theme: {
extend: {
colors: {
prowler: {
stone: {
950: "#1C1917",
900: "#292524",
500: "#E7E5E4",
300: "#F5F5F4",
},
gray: {
900: "#9bAACF",
700: "#BEC8E4",
500: "#C8D0E7",
300: "#E4EBF5",
},
status: {
passed: "#1FB53F",
failed: "#A3231F",
},
lime: "#84CC16",
white: "#FFFFFF",
error: "#B91C1C",
},
},
fontSize: {
'3xs': '0.625rem', // 10px
'2xs': '0.6875rem', // 11px
xs: '0.75rem', // 12px
sm: '0.875rem', // 14px
base: '1rem', // 16px
lg: '1.125rem', // 18px
xl: '1.25rem', // 20px
'2xl': '1.375rem', // 22px
'2xxl': '1.5rem', // 24px
'3xl': '1.75rem', // 28px
'4xl': '2rem', // 32px
'5xl': '2.25rem', // 36px
'6xl': '2.75rem', // 44px
'7xl': '3.5rem' // 56px
},
fontWeight: {
light: 300,
regular: 400,
medium: 500,
bold: 700,
heavy: 800
},
lineHeight: {
14: "0.875rem", // 14px
22: "1.375rem", // 22px
26: "1.625rem", // 26px
28: "1.75rem", // 28px
30: "1.875rem", // 30px
32: "2rem", // 32px
34: "2.125rem", // 34px
36: "2.25rem", // 36px
40: "2.5rem", // 40px
44: "2.75rem", // 44px
48: "3rem", // 48px
56: "3.5rem", // 56px
68: "4.25rem", // 68px
},
boxShadow: {
"provider":
".3rem .3rem .6rem #c8d0e7, -.2rem -.2rem .5rem #FFF",
"box-up":
"0.3rem 0.3rem 0.6rem #c8d0e7, -0.2rem -0.2rem 0.5rem #FFF",
"box-down":
"inset .2rem .2rem .5rem #c8d0e7, inset -.2rem -.2rem .5rem #FFF",
},
backgroundImage: {
"gradient-passed":
"linear-gradient(127.43deg, #F1F5F8 -177.68%, #4ADE80 87.35%)",
"gradient-failed":
"linear-gradient(127.43deg, #F1F5F8 -177.68%, #EF4444 87.35%)",
},
},
},
plugins: [],
};

View File

@@ -0,0 +1,325 @@
# Create a new Check for a Provider
Here you can find how to create new checks for Prowler.
**To create a check is required to have a Prowler provider service already created, so if the service is not present or the attribute you want to audit is not retrieved by the service, please refer to the [Service](./services.md) documentation.**
## Introduction
The checks are the fundamental piece of Prowler. A check is a simply piece of code that ensures if something is configured against cybersecurity best practices. Then the check generates a finding with the result and includes the check's metadata to give the user more contextual information about the result, the risk and how to remediate it.
To create a new check for a supported Prowler provider, you will need to create a folder with the check name inside the specific service for the selected provider.
We are going to use the `ec2_ami_public` check from the `AWS` provider as an example. So the folder name will be `prowler/providers/aws/services/ec2/ec2_ami_public` (following the format `prowler/providers/<provider>/services/<service>/<check_name>`), with the name of check following the pattern: `service_subservice_resource_action`.
???+ note
A subservice is an specific component of a service that is gonna be audited. Sometimes it could be the shortened name of the class attribute that is gonna be accessed in the check.
Inside that folder, we need to create three files:
- An empty `__init__.py`: to make Python treat this check folder as a package.
- A `check_name.py` with the above format containing the check's logic. Refer to the [check](./checks.md#check)
- A `check_name.metadata.json` containing the check's metadata. Refer to the [check metadata](./checks.md#check-metadata)
## Check
The Prowler's check structure is very simple and following it there is nothing more to do to include a check in a provider's service because the load is done dynamically based on the paths.
The following is the code for the `ec2_ami_public` check:
```python title="Check Class"
# At the top of the file we need to import the following:
# - Check class which is in charge of the following:
# - Retrieve the check metadata and expose the `metadata()`
# to return a JSON representation of the metadata,
# read more at Check Metadata Model down below.
# - Enforce that each check requires to have the `execute()` function
from prowler.lib.check.models import Check, Check_Report_AWS
# Then you have to import the provider service client
# read more at the Service documentation.
from prowler.providers.aws.services.ec2.ec2_client import ec2_client
# For each check we need to create a python class called the same as the
# file which inherits from the Check class.
class ec2_ami_public(Check):
"""ec2_ami_public verifies if an EC2 AMI is publicly shared"""
# Then, within the check's class we need to create the "execute(self)"
# function, which is enforce by the "Check" class to implement
# the Check's interface and let Prowler to run this check.
def execute(self):
# Inside the execute(self) function we need to create
# the list of findings initialised to an empty list []
findings = []
# Then, using the service client we need to iterate by the resource we
# want to check, in this case EC2 AMIs stored in the
# "ec2_client.images" object.
for image in ec2_client.images:
# Once iterating for the images, we have to intialise
# the Check_Report_AWS class passing the check's metadata
# using the "metadata" function explained above.
report = Check_Report_AWS(self.metadata())
# For each Prowler check we MUST fill the following
# Check_Report_AWS fields:
# - region
# - resource_id
# - resource_arn
# - resource_tags
# - status
# - status_extended
report.region = image.region
report.resource_id = image.id
report.resource_arn = image.arn
# The resource_tags should be filled if the resource has the ability
# of having tags, please check the service first.
report.resource_tags = image.tags
# Then we need to create the business logic for the check
# which always should be simple because the Prowler service
# must do the heavy lifting and the check should be in charge
# of parsing the data provided
report.status = "PASS"
report.status_extended = f"EC2 AMI {image.id} is not public."
# In this example each "image" object has a boolean attribute
# called "public" to set if the AMI is publicly shared
if image.public:
report.status = "FAIL"
report.status_extended = (
f"EC2 AMI {image.id} is currently public."
)
# Then at the same level as the "report"
# object we need to append it to the findings list.
findings.append(report)
# Last thing to do is to return the findings list to Prowler
return findings
```
### Check Status
All the checks MUST fill the `report.status` and `report.status_extended` with the following criteria:
- Status -- `report.status`
- `PASS` --> If the check is passing against the configured value.
- `FAIL` --> If the check is failing against the configured value.
- `MANUAL` --> This value cannot be used unless a manual operation is required in order to determine if the `report.status` is whether `PASS` or `FAIL`.
- Status Extended -- `report.status_extended`
- MUST end in a dot `.`
- MUST include the service audited with the resource and a brief explanation of the result generated, e.g.: `EC2 AMI ami-0123456789 is not public.`
### Check Region
All the checks MUST fill the `report.region` with the following criteria:
- If the audited resource is regional use the `region` (the name changes depending on the provider: `location` in Azure and GCP and `namespace` in K8s) attribute within the resource object.
- If the audited resource is global use the `service_client.region` within the service client object.
### Resource ID, Name and ARN
All the checks MUST fill the `report.resource_id` and `report.resource_arn` with the following criteria:
- AWS
- Resource ID -- `report.resource_id`
- AWS Account --> Account Number `123456789012`
- AWS Resource --> Resource ID / Name
- Root resource --> `<root_account>`
- Resource ARN -- `report.resource_arn`
- AWS Account --> Root ARN `arn:aws:iam::123456789012:root`
- AWS Resource --> Resource ARN
- Root resource --> Resource Type ARN `f"arn:{service_client.audited_partition}:<service_name>:{service_client.region}:{service_client.audited_account}:<resource_type>"`
- GCP
- Resource ID -- `report.resource_id`
- GCP Resource --> Resource ID
- Resource Name -- `report.resource_name`
- GCP Resource --> Resource Name
- Azure
- Resource ID -- `report.resource_id`
- Azure Resource --> Resource ID
- Resource Name -- `report.resource_name`
- Azure Resource --> Resource Name
### Python Model
The following is the Python model for the check's class.
As per April 11th 2024 the `Check_Metadata_Model` can be found [here](https://github.com/prowler-cloud/prowler/blob/master/prowler/lib/check/models.py#L36-L82).
```python
class Check(ABC, Check_Metadata_Model):
"""Prowler Check"""
def __init__(self, **data):
"""Check's init function. Calls the CheckMetadataModel init."""
# Parse the Check's metadata file
metadata_file = (
os.path.abspath(sys.modules[self.__module__].__file__)[:-3]
+ ".metadata.json"
)
# Store it to validate them with Pydantic
data = Check_Metadata_Model.parse_file(metadata_file).dict()
# Calls parents init function
super().__init__(**data)
def metadata(self) -> dict:
"""Return the JSON representation of the check's metadata"""
return self.json()
@abstractmethod
def execute(self):
"""Execute the check's logic"""
```
### Using the audit config
Prowler has a [configuration file](../tutorials/configuration_file.md) which is used to pass certain configuration values to the checks, like the following:
```python title="ec2_securitygroup_with_many_ingress_egress_rules.py"
class ec2_securitygroup_with_many_ingress_egress_rules(Check):
def execute(self):
findings = []
# max_security_group_rules, default: 50
max_security_group_rules = ec2_client.audit_config.get(
"max_security_group_rules", 50
)
for security_group in ec2_client.security_groups:
```
```yaml title="config.yaml"
# AWS Configuration
aws:
# AWS EC2 Configuration
# aws.ec2_securitygroup_with_many_ingress_egress_rules
# The default value is 50 rules
max_security_group_rules: 50
```
As you can see in the above code, within the service client, in this case the `ec2_client`, there is an object called `audit_config` which is a Python dictionary containing the values read from the configuration file.
In order to use it, you have to check first if the value is present in the configuration file. If the value is not present, you can create it in the `config.yaml` file and then, read it from the check.
???+ note
It is mandatory to always use the `dictionary.get(value, default)` syntax to set a default value in the case the configuration value is not present.
## Check Metadata
Each Prowler check has metadata associated which is stored at the same level of the check's folder in a file called A `check_name.metadata.json` containing the check's metadata.
???+ note
We are going to include comments in this example metadata JSON but they cannot be included because the JSON format does not allow comments.
```json
{
# Provider holds the Prowler provider which the checks belongs to
"Provider": "aws",
# CheckID holds check name
"CheckID": "ec2_ami_public",
# CheckTitle holds the title of the check
"CheckTitle": "Ensure there are no EC2 AMIs set as Public.",
# CheckType holds Software and Configuration Checks, check more here
# https://docs.aws.amazon.com/securityhub/latest/userguide/asff-required-attributes.html#Types
"CheckType": [
"Infrastructure Security"
],
# ServiceName holds the provider service name
"ServiceName": "ec2",
# SubServiceName holds the service's subservice or resource used by the check
"SubServiceName": "ami",
# ResourceIdTemplate holds the unique ID for the resource used by the check
"ResourceIdTemplate": "arn:partition:service:region:account-id:resource-id",
# Severity holds the check's severity, always in lowercase (critical, high, medium, low or informational)
"Severity": "critical",
# ResourceType only for AWS, holds the type from here
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html
"ResourceType": "Other",
# Description holds the title of the check, for now is the same as CheckTitle
"Description": "Ensure there are no EC2 AMIs set as Public.",
# Risk holds the check risk if the result is FAIL
"Risk": "When your AMIs are publicly accessible, they are available in the Community AMIs where everyone with an AWS account can use them to launch EC2 instances. Your AMIs could contain snapshots of your applications (including their data), therefore exposing your snapshots in this manner is not advised.",
# RelatedUrl holds an URL with more information about the check purpose
"RelatedUrl": "",
# Remediation holds the information to help the practitioner to fix the issue in the case of the check raise a FAIL
"Remediation": {
# Code holds different methods to remediate the FAIL finding
"Code": {
# CLI holds the command in the provider native CLI to remediate it
"CLI": "https://docs.bridgecrew.io/docs/public_8#cli-command",
# NativeIaC holds the native IaC code to remediate it, use "https://docs.bridgecrew.io/docs"
"NativeIaC": "",
# Other holds the other commands, scripts or code to remediate it, use "https://www.trendmicro.com/cloudoneconformity"
"Other": "https://docs.bridgecrew.io/docs/public_8#aws-console",
# Terraform holds the Terraform code to remediate it, use "https://docs.bridgecrew.io/docs"
"Terraform": ""
},
# Recommendation holds the recommendation for this check with a description and a related URL
"Recommendation": {
"Text": "We recommend your EC2 AMIs are not publicly accessible, or generally available in the Community AMIs.",
"Url": "https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cancel-sharing-an-AMI.html"
}
},
# Categories holds the category or categories where the check can be included, if applied
"Categories": [
"internet-exposed"
],
# DependsOn is not actively used for the moment but it will hold other
# checks wich this check is dependant to
"DependsOn": [],
# RelatedTo is not actively used for the moment but it will hold other
# checks wich this check is related to
"RelatedTo": [],
# Notes holds additional information not covered in this file
"Notes": ""
}
```
### Remediation Code
For the Remediation Code we use the following knowledge base to fill it:
- Official documentation for the provider
- https://docs.bridgecrew.io
- https://www.trendmicro.com/cloudoneconformity
- https://github.com/cloudmatos/matos/tree/master/remediations
### RelatedURL and Recommendation
The RelatedURL field must be filled with an URL from the provider's official documentation like https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sharingamis-intro.html
Also, if not present you can use the Risk and Recommendation texts from the TrendMicro [CloudConformity](https://www.trendmicro.com/cloudoneconformity) guide.
### Python Model
The following is the Python model for the check's metadata model. We use the Pydantic's [BaseModel](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel) as the parent class.
As per August 5th 2023 the `Check_Metadata_Model` can be found [here](https://github.com/prowler-cloud/prowler/blob/master/prowler/lib/check/models.py#L34-L56).
```python
class Check_Metadata_Model(BaseModel):
"""Check Metadata Model"""
Provider: str
CheckID: str
CheckTitle: str
CheckType: list[str]
ServiceName: str
SubServiceName: str
ResourceIdTemplate: str
Severity: str
ResourceType: str
Description: str
Risk: str
RelatedUrl: str
Remediation: Remediation
Categories: list[str]
DependsOn: list[str]
RelatedTo: list[str]
Notes: str
# We set the compliance to None to
# store the compliance later if supplied
Compliance: list = None
```

View File

@@ -0,0 +1,45 @@
# Debugging
Debugging in Prowler make things easier!
If you are developing Prowler, it's possible that you will encounter some situations where you have to inspect the code in depth to fix some unexpected issues during the execution. To do that, if you are using VSCode you can run the code using the integrated debugger. Please, refer to this [documentation](https://code.visualstudio.com/docs/editor/debugging) for guidance about the debugger in VSCode.
The following file is an example of the [debugging configuration](https://code.visualstudio.com/docs/editor/debugging#_launch-configurations) file that you can add to [Virtual Studio Code](https://code.visualstudio.com/).
This file should inside the *.vscode* folder and its name has to be *launch.json*:
```json
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "prowler.py",
"args": [
"aws",
"-f",
"eu-west-1",
"--service",
"cloudwatch",
"--log-level",
"ERROR",
"-p",
"dev",
],
"console": "integratedTerminal",
"justMyCode": false
},
{
"name": "Python: Debug Tests",
"type": "python",
"request": "launch",
"program": "${file}",
"purpose": [
"debug-test"
],
"console": "integratedTerminal",
"justMyCode": false
}
]
}
```

View File

@@ -0,0 +1,8 @@
## Contribute with documentation
We use `mkdocs` to build this Prowler documentation site so you can easily contribute back with new docs or improving them. To install all necessary dependencies use `poetry install --with docs`.
1. Install `mkdocs` with your favorite package manager.
2. Inside the `prowler` repository folder run `mkdocs serve` and point your browser to `http://localhost:8000` and you will see live changes to your local copy of this documentation site.
3. Make all needed changes to docs or add new documents. To do so just edit existing md files inside `prowler/docs` and if you are adding a new section or file please make sure you add it to `mkdocs.yaml` file in the root folder of the Prowler repo.
4. Once you are done with changes, please send a pull request to us for review and merge. Thank you in advance!

View File

@@ -0,0 +1,3 @@
# Integration Tests
Coming soon ...

View File

@@ -0,0 +1,3 @@
# Create a new integration
Coming soon ...

View File

@@ -0,0 +1,61 @@
# Developer Guide
You can extend Prowler Open Source in many different ways, in most cases you will want to create your own checks and compliance security frameworks, here is where you can learn about how to get started with it. We also include how to create custom outputs, integrations and more.
## Get the code and install all dependencies
First of all, you need a version of Python 3.9 or higher and also pip installed to be able to install all dependencies required. Once that is satisfied go a head and clone the repo:
```
git clone https://github.com/prowler-cloud/prowler
cd prowler
```
For isolation and avoid conflicts with other environments, we recommend usage of `poetry`:
```
pip install poetry
```
Then install all dependencies including the ones for developers:
```
poetry install --with dev
poetry shell
```
## Contributing with your code or fixes to Prowler
This repo has git pre-commit hooks managed via the [pre-commit](https://pre-commit.com/) tool. [Install](https://pre-commit.com/#install) it how ever you like, then in the root of this repo run:
```shell
pre-commit install
```
You should get an output like the following:
```shell
pre-commit installed at .git/hooks/pre-commit
```
Before we merge any of your pull requests we pass checks to the code, we use the following tools and automation to make sure the code is secure and dependencies up-to-dated:
???+ note
These should have been already installed if you ran `poetry install --with dev`
- [`bandit`](https://pypi.org/project/bandit/) for code security review.
- [`safety`](https://pypi.org/project/safety/) and [`dependabot`](https://github.com/features/security) for dependencies.
- [`hadolint`](https://github.com/hadolint/hadolint) and [`dockle`](https://github.com/goodwithtech/dockle) for our containers security.
- [`Snyk`](https://docs.snyk.io/integrations/snyk-container-integrations/container-security-with-docker-hub-integration) in Docker Hub.
- [`clair`](https://github.com/quay/clair) in Amazon ECR.
- [`vulture`](https://pypi.org/project/vulture/), [`flake8`](https://pypi.org/project/flake8/), [`black`](https://pypi.org/project/black/) and [`pylint`](https://pypi.org/project/pylint/) for formatting and best practices.
You can see all dependencies in file `pyproject.toml`.
## Pull Request Checklist
If you create or review a PR in https://github.com/prowler-cloud/prowler please follow this checklist:
- [ ] Make sure you've read the Prowler Developer Guide at https://docs.prowler.cloud/en/latest/developer-guide/introduction/
- [ ] Are we following the style guide, hence installed all the linters and formatters? Please check https://docs.prowler.cloud/en/latest/developer-guide/introduction/#contributing-with-your-code-or-fixes-to-prowler
- [ ] Are we increasing/decreasing the test coverage? Please, review if we need to include/modify tests for the new code.
- [ ] Are we modifying outputs? Please review it carefully.
- [ ] Do we need to modify the Prowler documentation to reflect the changes introduced?
- [ ] Are we introducing possible breaking changes? Are we modifying a core feature?
## Want some swag as appreciation for your contribution?
If you are like us and you love swag, we are happy to thank you for your contribution with some laptop stickers or whatever other swag we may have at that time. Please, tell us more details and your pull request link in our [Slack workspace here](https://join.slack.com/t/prowler-workspace/shared_invite/zt-1hix76xsl-2uq222JIXrC7Q8It~9ZNog). You can also reach out to Toni de la Fuente on Twitter [here](https://twitter.com/ToniBlyx), his DMs are open.

View File

@@ -0,0 +1,3 @@
# Create a custom output format
Coming soon ...

View File

@@ -0,0 +1,281 @@
# Create a new Provider for Prowler
Here you can find how to create a new Provider in Prowler to give support for making all security checks needed and make your cloud safer!
## Introduction
Providers are the foundation on which Prowler is built, a simple definition for a cloud provider could be "third-party company that offers a platform where any IT resource you need is available at any time upon request". The most well-known cloud providers are Amazon Web Services, Azure from Microsoft and Google Cloud which are already supported by Prowler.
To create a new provider that is not supported now by Prowler and add your security checks you must create a new folder to store all the related files within it (services, checks, etc.). It must be store in route `prowler/providers/<new_provider_name>/`.
Inside that folder, you MUST create the following files and folders:
- A `lib` folder: to store all extra functions.
- A `services` folder: to store all [services](./services.md) to audit.
- An empty `__init__.py`: to make Python treat this service folder as a package.
- A `<new_provider_name>_provider.py`, containing all the provider's logic necessary to get authenticated in the provider, configurations and extra data useful for final report.
- A `models.py`, containing all the models necessary for the new provider.
## Provider
The structure for Prowler's providers is set up in such a way that they can be utilized through a generic service specific to each provider. This is achieved by passing the required parameters to the constructor, which in turn initializes all the necessary session values.
### Base Class
All the providers in Prowler inherits from the same [base class](https://github.com/prowler-cloud/prowler/blob/master/prowler/providers/common/provider.py). It is an [abstract base class](https://docs.python.org/3/library/abc.html) that defines the interface for all provider classes. The code of the class is the next:
```python title="Provider Base Class"
from abc import ABC, abstractmethod
from typing import Any
class Provider(ABC):
"""
The Provider class is an abstract base class that defines the interface for all provider classes in the auditing system.
Attributes:
type (property): The type of the provider.
identity (property): The identity of the provider for auditing.
session (property): The session of the provider for auditing.
audit_config (property): The audit configuration of the provider.
output_options (property): The output configuration of the provider for auditing.
Methods:
print_credentials(): Displays the provider's credentials used for auditing in the command-line interface.
setup_session(): Sets up the session for the provider.
get_output_mapping(): Returns the output mapping between the provider and the generic model.
validate_arguments(): Validates the arguments for the provider.
get_checks_to_execute_by_audit_resources(): Returns a set of checks based on the input resources to scan.
Note:
This is an abstract base class and should not be instantiated directly. Each provider should implement its own
version of the Provider class by inheriting from this base class and implementing the required methods and properties.
"""
@property
@abstractmethod
def type(self) -> str:
"""
type method stores the provider's type.
This method needs to be created in each provider.
"""
raise NotImplementedError()
@property
@abstractmethod
def identity(self) -> str:
"""
identity method stores the provider's identity to audit.
This method needs to be created in each provider.
"""
raise NotImplementedError()
@abstractmethod
def setup_session(self) -> Any:
"""
setup_session sets up the session for the provider.
This method needs to be created in each provider.
"""
raise NotImplementedError()
@property
@abstractmethod
def session(self) -> str:
"""
session method stores the provider's session to audit.
This method needs to be created in each provider.
"""
raise NotImplementedError()
@property
@abstractmethod
def audit_config(self) -> str:
"""
audit_config method stores the provider's audit configuration.
This method needs to be created in each provider.
"""
raise NotImplementedError()
@abstractmethod
def print_credentials(self) -> None:
"""
print_credentials is used to display in the CLI the provider's credentials used to audit.
This method needs to be created in each provider.
"""
raise NotImplementedError()
@property
@abstractmethod
def output_options(self) -> str:
"""
output_options method returns the provider's audit output configuration.
This method needs to be created in each provider.
"""
raise NotImplementedError()
@output_options.setter
@abstractmethod
def output_options(self, value: str) -> Any:
"""
output_options.setter sets the provider's audit output configuration.
This method needs to be created in each provider.
"""
raise NotImplementedError()
@abstractmethod
def get_output_mapping(self) -> dict:
"""
get_output_mapping returns the output mapping between the provider and the generic model.
This method needs to be created in each provider.
"""
raise NotImplementedError()
def validate_arguments(self) -> None:
"""
validate_arguments validates the arguments for the provider.
This method can be overridden in each provider if needed.
"""
raise NotImplementedError()
def get_checks_to_execute_by_audit_resources(self) -> set:
"""
get_checks_to_execute_by_audit_resources returns a set of checks based on the input resources to scan.
This is a fallback that returns None if the service has not implemented this function.
"""
return set()
@property
@abstractmethod
def mutelist(self):
"""
mutelist method returns the provider's mutelist.
This method needs to be created in each provider.
"""
raise NotImplementedError()
@mutelist.setter
@abstractmethod
def mutelist(self, path: str):
"""
mutelist.setter sets the provider's mutelist.
This method needs to be created in each provider.
"""
raise NotImplementedError()
```
### Provider Class
Due to the complexity and differences of each provider use the rest of the providers as a template for the implementation.
- [AWS](https://github.com/prowler-cloud/prowler/blob/master/prowler/providers/aws/aws_provider.py)
- [GCP](https://github.com/prowler-cloud/prowler/blob/master/prowler/providers/gcp/gcp_provider.py)
- [Azure](https://github.com/prowler-cloud/prowler/blob/master/prowler/providers/azure/azure_provider.py)
- [Kubernetes](https://github.com/prowler-cloud/prowler/blob/master/prowler/providers/kubernetes/kubernetes_provider.py)
To facilitate understanding here is a pseudocode of how the most basic provider could be with examples.
```python title="Provider Example Class"
# Library imports to authenticate in the Provider
from prowler.config.config import load_and_validate_config_file
from prowler.lib.logger import logger
from prowler.lib.mutelist.mutelist import parse_mutelist_file
from prowler.lib.utils.utils import print_boxes
from prowler.providers.common.models import Audit_Metadata
from prowler.providers.common.provider import Provider
from prowler.providers.<new_provider_name>.models import (
# All providers models needed
ProvierSessionModel,
ProvierIdentityModel,
ProvierOutputOptionsModel
)
class NewProvider(Provider):
# All properties from the class, some of this are properties in the base class
_type: str = "<provider_name>"
_session: <ProvierSessionModel>
_identity: <ProvierIdentityModel>
_audit_config: dict
_output_options: ProvierOutputOptionsModel
_mutelist: dict
audit_metadata: Audit_Metadata
def __init__(self, arguments):
"""
Initializes the NewProvider instance.
Args:
arguments (dict): A dictionary containing configuration arguments.
"""
logger.info("Setting <NewProviderName> provider ...")
# First get from arguments the necesary from the cloud acount (subscriptions or projects or whatever the provider use for storing services)
# Set the session with the method enforced by parent class
self._session = self.setup_session(credentials_file)
# Set the Identity class normaly the provider class give by Python provider library
self._identity = <ProvierIdentityModel>()
# Set the provider configuration
self._audit_config = load_and_validate_config_file(
self._type, arguments.config_file
)
# All enforced properties by the parent class
@property
def identity(self):
return self._identity
@property
def session(self):
return self._session
@property
def type(self):
return self._type
@property
def audit_config(self):
return self._audit_config
@property
def output_options(self):
return self._output_options
def setup_session(self, <all_needed_for_auth>):
"""
Sets up the Provider session.
Args:
<all_needed_for_auth> Can include all necessary arguments to setup the session
Returns:
Credentials necesary to communicate with the provider.
"""
pass
"""
This method is enforced by parent class and is used to print all relevant
information during the prowler execution as a header of execution.
Normally the Account ID, User name or stuff like this is displayed in colors using the colorama module (Fore).
"""
def print_credentials(self):
pass
```

View File

@@ -0,0 +1,41 @@
# Create a new security compliance framework
## Introduction
If you want to create or contribute with your own security frameworks or add public ones to Prowler you need to make sure the checks are available if not you have to create your own. Then create a compliance file per provider like in `prowler/compliance/<provider>/` and name it as `<framework>_<version>_<provider>.json` then follow the following format to create yours.
## Compliance Framework
Each file version of a framework will have the following structure at high level with the case that each framework needs to be generally identified, one requirement can be also called one control but one requirement can be linked to multiple prowler checks.:
- `Framework`: string. Distinguish name of the framework, like CIS
- `Provider`: string. Provider where the framework applies, such as AWS, Azure, OCI,...
- `Version`: string. Version of the framework itself, like 1.4 for CIS.
- `Requirements`: array of objects. Include all requirements or controls with the mapping to Prowler.
- `Requirements_Id`: string. Unique identifier per each requirement in the specific framework
- `Requirements_Description`: string. Description as in the framework.
- `Requirements_Attributes`: array of objects. Includes all needed attributes per each requirement, like levels, sections, etc. Whatever helps to create a dedicated report with the result of the findings. Attributes would be taken as closely as possible from the framework's own terminology directly.
- `Requirements_Checks`: array. Prowler checks that are needed to prove this requirement. It can be one or multiple checks. In case of no automation possible this can be empty.
```
{
"Framework": "<framework>-<provider>",
"Version": "<version>",
"Requirements": [
{
"Id": "<unique-id>",
"Description": "Requirement full description",
"Checks": [
"Here is the prowler check or checks that is going to be executed"
],
"Attributes": [
{
<Add here your custom attributes.>
}
]
},
...
]
}
```
Finally, to have a proper output file for your reports, your framework data model has to be created in `prowler/lib/outputs/models.py` and also the CLI table output in `prowler/lib/outputs/compliance.py`. Also, you need to add a new conditional in `prowler/lib/outputs/file_descriptors.py` if you create a new CSV model.

View File

@@ -0,0 +1,238 @@
# Create a new Provider Service
Here you can find how to create a new service, or to complement an existing one, for a Prowler Provider.
## Introduction
In Prowler, a service is basically a solution that is offered by a cloud provider i.e. [ec2](https://aws.amazon.com/ec2/). Essentially it is a class that stores all the necessary stuff that we will need later in the checks to audit some aspects of our Cloud account.
To create a new service, you will need to create a folder inside the specific provider, i.e. `prowler/providers/<provider>/services/<new_service_name>/`.
Inside that folder, you MUST create the following files:
- An empty `__init__.py`: to make Python treat this service folder as a package.
- A `<new_service_name>_service.py`, containing all the service's logic and API calls.
- A `<new_service_name>_client_.py`, containing the initialization of the service's class we have just created so the checks's checks can use it.
## Service
The Prowler's service structure is the following and the way to initialise it is just by importing the service client in a check.
### Service Base Class
All the Prowler provider's services inherits from a base class depending on the provider used.
- [AWS Service Base Class](https://github.com/prowler-cloud/prowler/blob/master/prowler/providers/aws/lib/service/service.py)
- [GCP Service Base Class](https://github.com/prowler-cloud/prowler/blob/master/prowler/providers/azure/lib/service/service.py)
- [Azure Service Base Class](https://github.com/prowler-cloud/prowler/blob/master/prowler/providers/gcp/lib/service/service.py)
- [Kubernetes Service Base Class](https://github.com/prowler-cloud/prowler/blob/master/prowler/providers/kubernetes/lib/service/service.py)
Each class is used to initialize the credentials and the API's clients to be used in the service. If some threading is used it must be coded there.
### Service Class
Due to the complexity and differences of each provider API we are going to use an example service to guide you in how can it be created.
The following is the `<new_service_name>_service.py` file:
```python title="Service Class"
from datetime import datetime
from typing import Optional
# The following is just for the AWS provider
from botocore.client import ClientError
# To use the Pydantic's BaseModel
from pydantic import BaseModel
# Prowler logging library
from prowler.lib.logger import logger
# Prowler resource filter, only for the AWS provider
from prowler.lib.scan_filters.scan_filters import is_resource_filtered
# Provider parent class
from prowler.providers.<provider>.lib.service.service import ServiceParentClass
# Create a class for the Service
################## <Service>
class <Service>(ServiceParentClass):
def __init__(self, audit_info):
# Call Service Parent Class __init__
# We use the __class__.__name__ to get it automatically
# from the Service Class name but you can pass a custom
# string if the provider's API service name is different
super().__init__(__class__.__name__, audit_info)
# Create an empty dictionary of items to be gathered,
# using the unique ID as the dictionary key
# e.g., instances
self.<items> = {}
# If you can parallelize by regions or locations
# you can use the __threading_call__ function
# available in the Service Parent Class
self.__threading_call__(self.__describe_<items>__)
# Optionally you can create another function to retrieve
# more data about each item without parallel
self.__describe_<item>__()
def __describe_<items>__(self, regional_client):
"""Get ALL <Service> <Items>"""
logger.info("<Service> - Describing <Items>...")
# We MUST include a try/except block in each function
try:
# Call to the provider API to retrieve the data we want
describe_<items>_paginator = regional_client.get_paginator("describe_<items>")
# Paginator to get every item
for page in describe_<items>_paginator.paginate():
# Another try/except within the loop for to continue looping
# if something unexpected happens
try:
for <item> in page["<Items>"]:
# For the AWS provider we MUST include the following lines to retrieve
# or not data for the resource passed as argument using the --resource-arn
if not self.audit_resources or (
is_resource_filtered(<item>["<item_arn>"], self.audit_resources)
):
# Then we have to include the retrieved resource in the object
# previously created
self.<items>[<item_unique_id>] =
<Item>(
arn=stack["<item_arn>"],
name=stack["<item_name>"],
tags=stack.get("Tags", []),
region=regional_client.region,
)
except Exception as error:
logger.error(
f"{<provider_specific_field>} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}"
)
# In the except part we have to use the following code to log the errors
except Exception as error:
# Depending on each provider we can use the following fields in the logger:
# - AWS: regional_client.region or self.region
# - GCP: project_id and location
# - Azure: subscription
logger.error(
f"{<provider_specific_field>} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}"
)
def __describe_<item>__(self):
"""Get Details for a <Service> <Item>"""
logger.info("<Service> - Describing <Item> to get specific details...")
# We MUST include a try/except block in each function
try:
# Loop over the items retrieved in the previous function
for <item> in self.<items>:
# When we perform calls to the Provider API within a for loop we have
# to include another try/except block because in the cloud there are
# ephemeral resources that can be deleted at the time we are checking them
try:
<item>_details = self.regional_clients[<item>.region].describe_<item>(
<Attribute>=<item>.name
)
# For example, check if item is Public. Here is important if we are
# getting values from a dictionary we have to use the "dict.get()"
# function with a default value in the case this value is not present
<item>.public = <item>_details.get("Public", False)
# In this except block, for example for the AWS Provider we can use
# the botocore.ClientError exception and check for a specific error code
# to raise a WARNING instead of an ERROR if some resource is not present.
except ClientError as error:
if error.response["Error"]["Code"] == "InvalidInstanceID.NotFound":
logger.warning(
f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}"
)
else:
logger.error(
f"{<provider_specific_field>} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}"
)
continue
# In the except part we have to use the following code to log the errors
except Exception as error:
# Depending on each provider we can use the following fields in the logger:
# - AWS: regional_client.region or self.region
# - GCP: project_id and location
# - Azure: subscription
logger.error(
f"{<item>.region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}"
)
```
#### Service Models
Service models are classes that are used in the service to design all that we need to store in each class object extrated from API calls. We use the Pydantic's [BaseModel](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel) to take advantage of the data validation.
```python title="Service Model"
# In each service class we have to create some classes using
# the Pydantic's Basemodel for the resources we want to audit.
class <Item>(BaseModel):
"""<Item> holds a <Service> <Item>"""
arn: str
"""<Items>[].arn"""
name: str
"""<Items>[].name"""
region: str
"""<Items>[].region"""
public: bool
"""<Items>[].public"""
# We can create Optional attributes set to None by default
tags: Optional[list]
"""<Items>[].tags"""
```
#### Service Objects
In the service each group of resources should be created as a Python [dictionary](https://docs.python.org/3/tutorial/datastructures.html#dictionaries). This is because we are performing lookups all the time and the Python dictionary lookup has [O(1) complexity](https://en.wikipedia.org/wiki/Big_O_notation#Orders_of_common_functions).
We MUST set as the dictionary key a unique ID, like the resource Unique ID or ARN.
Example:
```python
self.vpcs = {}
self.vpcs["vpc-01234567890abcdef"] = VPC_Object_Class()
```
### Service Client
Each Prowler service requires a service client to use the service in the checks.
The following is the `<new_service_name>_client.py` containing the initialization of the service's class we have just created so the service's checks can use them:
```python
from prowler.providers.<provider>.lib.audit_info.audit_info import audit_info
from prowler.providers.<provider>.services.<new_service_name>.<new_service_name>_service import <Service>
<new_service_name>_client = <Service>(audit_info)
```
## Permissions
It is really important to check if the current Prowler's permissions for each provider are enough to implement a new service. If we need to include more please refer to the following documentaion and update it:
- AWS: https://docs.prowler.cloud/en/latest/getting-started/requirements/#aws-authentication
- Azure: https://docs.prowler.cloud/en/latest/getting-started/requirements/#permissions
- GCP: https://docs.prowler.cloud/en/latest/getting-started/requirements/#gcp-authentication

View File

@@ -0,0 +1,725 @@
# Unit Tests
The unit tests for the Prowler checks varies between each provider supported.
Here we left some good reads about unit testing and things we've learnt through all the process.
**Python Testing**
- https://docs.python-guide.org/writing/tests/
**Where to patch**
- https://docs.python.org/3/library/unittest.mock.html#where-to-patch
- https://stackoverflow.com/questions/893333/multiple-variables-in-a-with-statement
- https://docs.python.org/3/reference/compound_stmts.html#the-with-statement
**Utils to trace mocking and test execution**
- https://news.ycombinator.com/item?id=36054868
- https://docs.python.org/3/library/sys.html#sys.settrace
- https://github.com/kunalb/panopticon
## General Recommendations
When creating tests for some provider's checks we follow these guidelines trying to cover as much test scenarios as possible:
1. Create a test without resource to generate 0 findings, because Prowler will generate 0 findings if a service does not contain the resources the check is looking for audit.
2. Create test to generate both a `PASS` and a `FAIL` result.
3. Create tests with more than 1 resource to evaluate how the check behaves and if the number of findings is right.
## How to run Prowler tests
To run the Prowler test suite you need to install the testing dependencies already included in the `pyproject.toml` file. If you didn't install it yet please read the developer guide introduction [here](./introduction.md#get-the-code-and-install-all-dependencies).
Then in the project's root path execute `pytest -n auto -vvv -s -x` or use the `Makefile` with `make test`.
Other commands to run tests:
- Run tests for a provider: `pytest -n auto -vvv -s -x tests/providers/<provider>/services`
- Run tests for a provider service: `pytest -n auto -vvv -s -x tests/providers/<provider>/services/<service>`
- Run tests for a provider check: `pytest -n auto -vvv -s -x tests/providers/<provider>/services/<service>/<check>`
???+ note
Refer to the [pytest documentation](https://docs.pytest.org/en/7.1.x/getting-started.html) documentation for more information.
## AWS
For the AWS provider we have ways to test a Prowler check based on the following criteria:
???+ note
We use and contribute to the [Moto](https://github.com/getmoto/moto) library which allows us to easily mock out tests based on AWS infrastructure. **It's awesome!**
- AWS API calls covered by [Moto](https://github.com/getmoto/moto):
- Service tests with `@mock_<service>`
- Checks tests with `@mock_<service>`
- AWS API calls not covered by Moto:
- Service test with `mock_make_api_call`
- Checks tests with [MagicMock](https://docs.python.org/3/library/unittest.mock.html#unittest.mock.MagicMock)
- AWS API calls partially covered by Moto:
- Service test with `@mock_<service>` and `mock_make_api_call`
- Checks tests with `@mock_<service>` and `mock_make_api_call`
In the following section we are going to explain all of the above scenarios with examples. The main difference between those scenarios comes from if the [Moto](https://github.com/getmoto/moto) library covers the AWS API calls made by the service. You can check the covered API calls [here](https://github.com/getmoto/moto/blob/master/IMPLEMENTATION_COVERAGE.md).
An important point for the AWS testing is that in each check we MUST have a unique `audit_info` which is the key object during the AWS execution to isolate the test execution.
Check the [Audit Info](./audit-info.md) section to get more details.
```python
# We need to import the AWS_Audit_Info and the Audit_Metadata
# to set the audit_info to call AWS APIs
from prowler.providers.aws.lib.audit_info.models import AWS_Audit_Info
from prowler.providers.common.models import Audit_Metadata
AWS_ACCOUNT_NUMBER = "123456789012"
def set_mocked_audit_info(self):
audit_info = AWS_Audit_Info(
session_config=None,
original_session=None,
audit_session=session.Session(
profile_name=None,
botocore_session=None,
),
audit_config=None,
audited_account=AWS_ACCOUNT_NUMBER,
audited_account_arn=f"arn:aws:iam::{AWS_ACCOUNT_NUMBER}:root",
audited_user_id=None,
audited_partition="aws",
audited_identity_arn=None,
profile=None,
profile_region=None,
credentials=None,
assumed_role_info=None,
audited_regions=["us-east-1", "eu-west-1"],
organizations_metadata=None,
audit_resources=None,
mfa_enabled=False,
audit_metadata=Audit_Metadata(
services_scanned=0,
expected_checks=[],
completed_checks=0,
audit_progress=0,
),
)
return audit_info
```
### Checks
For the AWS tests examples we are going to use the tests for the `iam_password_policy_uppercase` check.
This section is going to be divided based on the API coverage of the [Moto](https://github.com/getmoto/moto) library.
#### API calls covered
If the [Moto](https://github.com/getmoto/moto) library covers the API calls we want to test, we can use the `@mock_<service>` decorator. This will mocked out all the API calls made to AWS keeping the state within the code decorated, in this case the test function.
```python
# We need to import the unittest.mock to allow us to patch some objects
# not to use shared ones between test, hence to isolate the test
from unittest import mock
# Boto3 client and session to call the AWS APIs
from boto3 import client, session
# Moto decorator for the IAM service we want to mock
from moto import mock_iam
# Constants used
AWS_ACCOUNT_NUMBER = "123456789012"
AWS_REGION = "us-east-1"
# We always name the test classes like Test_<check_name>
class Test_iam_password_policy_uppercase:
# We include the Moto decorator for the service we want to use
# You can include more than one if two or more services are
# involved in test
@mock_iam
# We name the tests with test_<service>_<check_name>_<test_action>
def test_iam_password_policy_no_uppercase_flag(self):
# First, we have to create an IAM client
iam_client = client("iam", region_name=AWS_REGION)
# Then, since all the AWS accounts have a password
# policy we want to set to False the RequireUppercaseCharacters
iam_client.update_account_password_policy(RequireUppercaseCharacters=False)
# We set a mocked audit_info for AWS not to share the same audit state
# between checks
current_audit_info = self.set_mocked_audit_info()
# The Prowler service import MUST be made within the decorated
# code not to make real API calls to the AWS service.
from prowler.providers.aws.services.iam.iam_service import IAM
# Prowler for AWS uses a shared object called `current_audit_info` where it stores
# the audit's state, credentials and configuration.
with mock.patch(
"prowler.providers.aws.lib.audit_info.audit_info.current_audit_info",
new=current_audit_info,
),
# We have to mock also the iam_client from the check to enforce that the iam_client used is the one
# created within this check because patch != import, and if you execute tests in parallel some objects
# can be already initialised hence the check won't be isolated
mock.patch(
"prowler.providers.aws.services.iam.iam_password_policy_uppercase.iam_password_policy_uppercase.iam_client",
new=IAM(current_audit_info),
):
# We import the check within the two mocks not to initialise the iam_client with some shared information from
# the current_audit_info or the IAM service.
from prowler.providers.aws.services.iam.iam_password_policy_uppercase.iam_password_policy_uppercase import (
iam_password_policy_uppercase,
)
# Once imported, we only need to instantiate the check's class
check = iam_password_policy_uppercase()
# And then, call the execute() function to run the check
# against the IAM client we've set up.
result = check.execute()
# Last but not least, we need to assert all the fields
# from the check's results
assert len(results) == 1
assert result[0].status == "FAIL"
assert result[0].status_extended == "IAM password policy does not require at least one uppercase letter."
assert result[0].resource_arn == f"arn:aws:iam::{AWS_ACCOUNT_NUMBER}:root"
assert result[0].resource_id == AWS_ACCOUNT_NUMBER
assert result[0].resource_tags == []
assert result[0].region == AWS_REGION
```
#### API calls not covered
If the IAM service for the check's we want to test is not covered by Moto, we have to inject the objects in the service client using [MagicMock](https://docs.python.org/3/library/unittest.mock.html#unittest.mock.MagicMock). As we have pointed above, we cannot instantiate the service since it will make real calls to the AWS APIs.
???+ note
The following example uses the IAM GetAccountPasswordPolicy which is covered by Moto but this is only for demonstration purposes.
The following code shows how to use MagicMock to create the service objects.
```python
# We need to import the unittest.mock to allow us to patch some objects
# not to use shared ones between test, hence to isolate the test
from unittest import mock
# Constants used
AWS_ACCOUNT_NUMBER = "123456789012"
AWS_REGION = "us-east-1"
# We always name the test classes like Test_<check_name>
class Test_iam_password_policy_uppercase:
# We name the tests with test_<service>_<check_name>_<test_action>
def test_iam_password_policy_no_uppercase_flag(self):
# Mocked client with MagicMock
mocked_iam_client = mock.MagicMock
# Since the IAM Password Policy has their own model we have to import it
from prowler.providers.aws.services.iam.iam_service import PasswordPolicy
# Create the mock PasswordPolicy object
mocked_iam_client.password_policy = PasswordPolicy(
length=5,
symbols=True,
numbers=True,
# We set the value to False to test the check
uppercase=False,
lowercase=True,
allow_change=False,
expiration=True,
)
# We set a mocked audit_info for AWS not to share the same audit state
# between checks
current_audit_info = self.set_mocked_audit_info()
# In this scenario we have to mock also the IAM service and the iam_client from the check to enforce # that the iam_client used is the one created within this check because patch != import, and if you # execute tests in parallel some objects can be already initialised hence the check won't be isolated.
# In this case we don't use the Moto decorator, we use the mocked IAM client for both objects
with mock.patch(
"prowler.providers.aws.services.iam.iam_service.IAM",
new=mocked_iam_client,
), mock.patch(
"prowler.providers.aws.services.iam.iam_client.iam_client",
new=mocked_iam_client,
):
# We import the check within the two mocks not to initialise the iam_client with some shared information from
# the current_audit_info or the IAM service.
from prowler.providers.aws.services.iam.iam_password_policy_uppercase.iam_password_policy_uppercase import (
iam_password_policy_uppercase,
)
# Once imported, we only need to instantiate the check's class
check = iam_password_policy_uppercase()
# And then, call the execute() function to run the check
# against the IAM client we've set up.
result = check.execute()
# Last but not least, we need to assert all the fields
# from the check's results
assert len(results) == 1
assert result[0].status == "FAIL"
assert result[0].status_extended == "IAM password policy does not require at least one uppercase letter."
assert result[0].resource_arn == f"arn:aws:iam::{AWS_ACCOUNT_NUMBER}:root"
assert result[0].resource_id == AWS_ACCOUNT_NUMBER
assert result[0].resource_tags == []
assert result[0].region == AWS_REGION
```
As it can be seen in the above scenarios, the check execution should always be into the context of mocked/patched objects. This way we ensure it reviews only the objects created under the scope the test.
#### API calls partially covered
If the API calls we want to use in the service are partially covered by the Moto decorator we have to create our own mocked API calls to use it in combination.
To do so, you need to mock the `botocore.client.BaseClient._make_api_call` function, which is the Boto3 function in charge of making the real API call to the AWS APIs, using `mock.patch <https://docs.python.org/3/library/unittest.mock.html#patch>`:
```python
import boto3
import botocore
from unittest.mock import patch
from moto import mock_iam
# Original botocore _make_api_call function
orig = botocore.client.BaseClient._make_api_call
# Mocked botocore _make_api_call function
def mock_make_api_call(self, operation_name, kwarg):
# As you can see the operation_name has the get_account_password_policy snake_case form but
# we are using the GetAccountPasswordPolicy form.
# Rationale -> https://github.com/boto/botocore/blob/develop/botocore/client.py#L810:L816
if operation_name == 'GetAccountPasswordPolicy':
return {
'PasswordPolicy': {
'MinimumPasswordLength': 123,
'RequireSymbols': True|False,
'RequireNumbers': True|False,
'RequireUppercaseCharacters': True|False,
'RequireLowercaseCharacters': True|False,
'AllowUsersToChangePassword': True|False,
'ExpirePasswords': True|False,
'MaxPasswordAge': 123,
'PasswordReusePrevention': 123,
'HardExpiry': True|False
}
}
# If we don't want to patch the API call
return orig(self, operation_name, kwarg)
# We always name the test classes like Test_<check_name>
class Test_iam_password_policy_uppercase:
# We include the custom API call mock decorator for the service we want to use
@patch("botocore.client.BaseClient._make_api_call", new=mock_make_api_call)
# We include also the IAM Moto decorator for the API calls supported
@mock_iam
# We name the tests with test_<service>_<check_name>_<test_action>
def test_iam_password_policy_no_uppercase_flag(self):
# Check the previous section to see the check test since is the same
```
Note that this does not use Moto, to keep it simple, but if you use any `moto`-decorators in addition to the patch, the call to `orig(self, operation_name, kwarg)` will be intercepted by Moto.
???+ note
The above code comes from here https://docs.getmoto.org/en/latest/docs/services/patching_other_services.html
#### Mocking more than one service
If the test your are creating belongs to a check that uses more than one provider service, you should mock each of the services used. For example, the check `cloudtrail_logs_s3_bucket_access_logging_enabled` requires the CloudTrail and the S3 client, hence the service's mock part of the test will be as follows:
```python
with mock.patch(
"prowler.providers.aws.lib.audit_info.audit_info.current_audit_info",
new=mock_audit_info,
), mock.patch(
"prowler.providers.aws.services.cloudtrail.cloudtrail_logs_s3_bucket_access_logging_enabled.cloudtrail_logs_s3_bucket_access_logging_enabled.cloudtrail_client",
new=Cloudtrail(mock_audit_info),
), mock.patch(
"prowler.providers.aws.services.cloudtrail.cloudtrail_logs_s3_bucket_access_logging_enabled.cloudtrail_logs_s3_bucket_access_logging_enabled.s3_client",
new=S3(mock_audit_info),
):
```
As you can see in the above code, it is required to mock the AWS audit info and both services used.
#### Patching vs. Importing
This is an important topic within the Prowler check's unit testing. Due to the dynamic nature of the check's load, the process of importing the service client from a check is the following:
1. `<check>.py`:
```python
from prowler.providers.<provider>.services.<service>.<service>_client import <service>_client
```
2. `<service>_client.py`:
```python
from prowler.providers.<provider>.lib.audit_info.audit_info import audit_info
from prowler.providers.<provider>.services.<service>.<service>_service import <SERVICE>
<service>_client = <SERVICE>(audit_info)
```
Due to the above import path it's not the same to patch the following objects because if you run a bunch of tests, either in parallel or not, some clients can be already instantiated by another check, hence your test execution will be using another test's service instance:
- `<service>_client` imported at `<check>.py`
- `<service>_client` initialised at `<service>_client.py`
- `<SERVICE>` imported at `<service>_client.py`
A useful read about this topic can be found in the following article: https://stackoverflow.com/questions/8658043/how-to-mock-an-import
#### Different ways to mock the service client
##### Mocking the service client at the service client level
Mocking a service client using the following code ...
```python title="Mocking the service_client"
with mock.patch(
"prowler.providers.<provider>.lib.audit_info.audit_info.audit_info",
new=audit_info,
), mock.patch(
"prowler.providers.<provider>.services.<service>.<check>.<check>.<service>_client",
new=<SERVICE>(audit_info),
):
```
will cause that the service will be initialised twice:
1. When the `<SERVICE>(audit_info)` is mocked out using `mock.patch` to have the object ready for the patching.
2. At the `<service>_client.py` when we are patching it since the `mock.patch` needs to go to that object an initialise it, hence the `<SERVICE>(audit_info)` will be called again.
Then, when we import the `<service>_client.py` at `<check>.py`, since we are mocking where the object is used, Python will use the mocked one.
In the [next section](./unit-testing.md#mocking-the-service-and-the-service-client-at-the-service-client-level) you will see an improved version to mock objects.
##### Mocking the service and the service client at the service client level
Mocking a service client using the following code ...
```python title="Mocking the service and the service_client"
with mock.patch(
"prowler.providers.<provider>.lib.audit_info.audit_info.audit_info",
new=audit_info,
), mock.patch(
"prowler.providers.<provider>.services.<service>.<SERVICE>",
new=<SERVICE>(audit_info),
) as service_client, mock.patch(
"prowler.providers.<provider>.services.<service>.<service>_client.<service>_client",
new=service_client,
):
```
will cause that the service will be initialised once, just when the `<SERVICE>(audit_info)` is mocked out using `mock.patch`.
Then, at the check_level when Python tries to import the client with `from prowler.providers.<provider>.services.<service>.<service>_client`, since it is already mocked out, the execution will continue using the `service_client` without getting into the `<service>_client.py`.
### Services
For testing the AWS services we have to follow the same logic as with the AWS checks, we have to check if the AWS API calls made by the service are covered by Moto and we have to test the service `__init__` to verifiy that the information is being correctly retrieved.
The service tests could act as *Integration Tests* since we test how the service retrieves the information from the provider, but since Moto or the custom mock objects mocks that calls this test will fall into *Unit Tests*.
Please refer to the [AWS checks tests](./unit-testing.md#checks) for more information on how to create tests and check the existing services tests [here](https://github.com/prowler-cloud/prowler/tree/master/tests/providers/aws/services).
## GCP
### Checks
For the GCP Provider we don't have any library to mock out the API calls we use. So in this scenario we inject the objects in the service client using [MagicMock](https://docs.python.org/3/library/unittest.mock.html#unittest.mock.MagicMock).
The following code shows how to use MagicMock to create the service objects for a GCP check test. It is a real example adapted for informative purposes.
```python
from re import search
from unittest import mock
# Import some constant values needed in every check
from tests.providers.gcp.gcp_fixtures import GCP_PROJECT_ID, set_mocked_gcp_provider
# We are going to create a test for the compute_project_os_login_enabled check
class Test_compute_project_os_login_enabled:
def test_one_compliant_project(self):
# Import the service resource model to create the mocked object
from prowler.providers.gcp.services.compute.compute_service import Project
# Create the custom Project object to be tested
project = Project(
id=GCP_PROJECT_ID,
enable_oslogin=True,
)
# Mocked client with MagicMock
compute_client = mock.MagicMock
compute_client.project_ids = [GCP_PROJECT_ID]
compute_client.projects = [project]
# In this scenario we have to mock the app_client from the check to enforce that the compute_client used is the one created above
# And also is mocked the return value of get_global_provider function to return our GCP mocked provider defined in fixtures
with mock.patch(
"prowler.providers.common.common.get_global_provider",
return_value=set_mocked_gcp_provider(),
), mock.patch(
"prowler.providers.gcp.services.compute.compute_project_os_login_enabled.compute_project_os_login_enabled.compute_client",
new=compute_client,
):
# We import the check within the two mocks
from prowler.providers.gcp.services.compute.compute_project_os_login_enabled.compute_project_os_login_enabled import (
compute_project_os_login_enabled,
)
# Once imported, we only need to instantiate the check's class
check = compute_project_os_login_enabled()
# And then, call the execute() function to run the check
# against the Compute client we've set up.
result = check.execute()
# Assert the expected results
assert len(result) == 1
assert result[0].status == "PASS"
assert search(
f"Project {project.id} has OS Login enabled",
result[0].status_extended,
)
assert result[0].resource_id == project.id
assert result[0].location == "global"
assert result[0].project_id == GCP_PROJECT_ID
# Complementary test to make more coverage for different scenarios
def test_one_non_compliant_project(self):
from prowler.providers.gcp.services.compute.compute_service import Project
project = Project(
id=GCP_PROJECT_ID,
enable_oslogin=False,
)
compute_client = mock.MagicMock
compute_client.project_ids = [GCP_PROJECT_ID]
compute_client.projects = [project]
with mock.patch(
"prowler.providers.common.common.get_global_provider",
return_value=set_mocked_gcp_provider(),
), mock.patch(
"prowler.providers.gcp.services.compute.compute_project_os_login_enabled.compute_project_os_login_enabled.compute_client",
new=compute_client,
):
from prowler.providers.gcp.services.compute.compute_project_os_login_enabled.compute_project_os_login_enabled import (
compute_project_os_login_enabled,
)
check = compute_project_os_login_enabled()
result = check.execute()
assert len(result) == 1
assert result[0].status == "FAIL"
assert search(
f"Project {project.id} does not have OS Login enabled",
result[0].status_extended,
)
assert result[0].resource_id == project.id
assert result[0].location == "global"
assert result[0].project_id == GCP_PROJECT_ID
```
### Services
Coming soon ...
## Azure
### Checks
For the Azure Provider we don't have any library to mock out the API calls we use. So in this scenario we inject the objects in the service client using [MagicMock](https://docs.python.org/3/library/unittest.mock.html#unittest.mock.MagicMock).
The following code shows how to use MagicMock to create the service objects for a Azure check test. It is a real example adapted for informative purposes.
```python title="app_ensure_http_is_redirected_to_https_test.py"
# We need to import the unittest.mock to allow us to patch some objects
# not to use shared ones between test, hence to isolate the test
from unittest import mock
from uuid import uuid4
# Import some constans values needed in almost every check
from tests.providers.azure.azure_fixtures import (
AZURE_SUBSCRIPTION_ID,
set_mocked_azure_provider,
)
# We are going to create a test for the app_ensure_http_is_redirected_to_https check
class Test_app_ensure_http_is_redirected_to_https:
# We name the tests with test_<service>_<check_name>_<test_action>
def test_app_http_to_https_disabled(self):
resource_id = f"/subscriptions/{uuid4()}"
# Mocked client with MagicMock
app_client = mock.MagicMock
# In this scenario we have to mock the app_client from the check to enforce that the app_client used is the one created above
# And also is mocked the return value of get_global_provider function to return our Azure mocked provider defined in fixtures
with mock.patch(
"prowler.providers.common.common.get_global_provider",
return_value=set_mocked_azure_provider(),
), mock.patch(
"prowler.providers.azure.services.app.app_ensure_http_is_redirected_to_https.app_ensure_http_is_redirected_to_https.app_client",
new=app_client,
):
# We import the check within the two mocks
from prowler.providers.azure.services.app.app_ensure_http_is_redirected_to_https.app_ensure_http_is_redirected_to_https import (
app_ensure_http_is_redirected_to_https,
)
# Import the service resource model to create the mocked object
from prowler.providers.azure.services.app.app_service import WebApp
# Create the custom App object to be tested
app_client.apps = {
AZURE_SUBSCRIPTION_ID: {
"app_id-1": WebApp(
resource_id=resource_id,
auth_enabled=True,
configurations=mock.MagicMock(),
client_cert_mode="Ignore",
https_only=False,
identity=None,
location="West Europe",
)
}
}
# Once imported, we only need to instantiate the check's class
check = app_ensure_http_is_redirected_to_https()
# And then, call the execute() function to run the check
# against the App client we've set up.
result = check.execute()
# Assert the expected results
assert len(result) == 1
assert result[0].status == "FAIL"
assert (
result[0].status_extended
== f"HTTP is not redirected to HTTPS for app 'app_id-1' in subscription '{AZURE_SUBSCRIPTION_ID}'."
)
assert result[0].resource_name == "app_id-1"
assert result[0].resource_id == resource_id
assert result[0].subscription == AZURE_SUBSCRIPTION_ID
assert result[0].location == "West Europe"
# Complementary test to make more coverage for different scenarios
def test_app_http_to_https_enabled(self):
resource_id = f"/subscriptions/{uuid4()}"
app_client = mock.MagicMock
with mock.patch(
"prowler.providers.common.common.get_global_provider",
return_value=set_mocked_azure_provider(),
), mock.patch(
"prowler.providers.azure.services.app.app_ensure_http_is_redirected_to_https.app_ensure_http_is_redirected_to_https.app_client",
new=app_client,
):
from prowler.providers.azure.services.app.app_ensure_http_is_redirected_to_https.app_ensure_http_is_redirected_to_https import (
app_ensure_http_is_redirected_to_https,
)
from prowler.providers.azure.services.app.app_service import WebApp
app_client.apps = {
AZURE_SUBSCRIPTION_ID: {
"app_id-1": WebApp(
resource_id=resource_id,
auth_enabled=True,
configurations=mock.MagicMock(),
client_cert_mode="Ignore",
https_only=True,
identity=None,
location="West Europe",
)
}
}
check = app_ensure_http_is_redirected_to_https()
result = check.execute()
assert len(result) == 1
assert result[0].status == "PASS"
assert (
result[0].status_extended
== f"HTTP is redirected to HTTPS for app 'app_id-1' in subscription '{AZURE_SUBSCRIPTION_ID}'."
)
assert result[0].resource_name == "app_id-1"
assert result[0].resource_id == resource_id
assert result[0].subscription == AZURE_SUBSCRIPTION_ID
assert result[0].location == "West Europe"
```
### Services
For testing Azure services, we have to follow the same logic as with the Azure checks. We still mock all the API calls, but in this case, every method that uses an API call to set up an attribute is mocked with the [patch](https://docs.python.org/3/library/unittest.mock.html#unittest.mock.patch) decorator at the beginning of the class. Remember that every method of a service MUST be tested.
The following code shows a real example of a testing class, but it has more comments than usual for educational purposes.
```python title="AppInsights Service Test"
# We need to import the unittest.mock.patch to allow us to patch some objects
# not to use shared ones between test, hence to isolate the test
from unittest.mock import patch
# Import the models needed from the service file
from prowler.providers.azure.services.appinsights.appinsights_service import (
AppInsights,
Component,
)
# Import some constans values needed in almost every check
from tests.providers.azure.azure_fixtures import (
AZURE_SUBSCRIPTION_ID,
set_mocked_azure_provider,
)
# Function to mock the service function __get_components__, this function task is to return a possible value that real function could returns
def mock_appinsights_get_components(_):
return {
AZURE_SUBSCRIPTION_ID: {
"app_id-1": Component(
resource_id="/subscriptions/resource_id",
resource_name="AppInsightsTest",
location="westeurope",
)
}
}
# Patch decorator to use the mocked function instead the function with the real API call
@patch(
"prowler.providers.azure.services.appinsights.appinsights_service.AppInsights.__get_components__",
new=mock_appinsights_get_components,
)
class Test_AppInsights_Service:
# Mandatory test for every service, this method test the instance of the client is correct
def test__get_client__(self):
app_insights = AppInsights(set_mocked_azure_provider())
assert (
app_insights.clients[AZURE_SUBSCRIPTION_ID].__class__.__name__
== "ApplicationInsightsManagementClient"
)
# Second typical method that test if subscriptions is defined inside the client object
def test__get_subscriptions__(self):
app_insights = AppInsights(set_mocked_azure_provider())
assert app_insights.subscriptions.__class__.__name__ == "dict"
# Test for the function __get_components__, inside this client is used the mocked function
def test__get_components__(self):
appinsights = AppInsights(set_mocked_azure_provider())
assert len(appinsights.components) == 1
assert (
appinsights.components[AZURE_SUBSCRIPTION_ID]["app_id-1"].resource_id
== "/subscriptions/resource_id"
)
assert (
appinsights.components[AZURE_SUBSCRIPTION_ID]["app_id-1"].resource_name
== "AppInsightsTest"
)
assert (
appinsights.components[AZURE_SUBSCRIPTION_ID]["app_id-1"].location
== "westeurope"
)
```

View File

@@ -1,11 +1,11 @@
# Requirements
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://learn.microsoft.com/en-us/python/api/overview/azure/?view=azure-python).
Prowler has been written in Python using the [AWS SDK (Boto3)](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html#), [Azure SDK](https://azure.github.io/azure-sdk-for-python/) and [GCP API Python Client](https://github.com/googleapis/google-api-python-client/).
## AWS
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).
### AWS Authentication
### Authentication
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):
@@ -23,16 +23,22 @@ 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 following AWS managed policies to the user or role being used:
- arn:aws:iam::aws:policy/SecurityAudit
- arn:aws:iam::aws:policy/job-function/ViewOnlyAccess
- `arn:aws:iam::aws:policy/SecurityAudit`
- `arn:aws:iam::aws:policy/job-function/ViewOnlyAccess`
> 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.
???+ note
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).
> 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).
### Multi-Factor Authentication
If your IAM entity enforces MFA you can use `--mfa` and Prowler will ask you to input the following values to get a new session:
- ARN of your MFA device
- TOTP (Time-Based One-Time Password)
## Azure
Prowler for azure supports the following authentication types:
Prowler for Azure supports the following authentication types:
- Service principal authentication by environment variables (Enterprise Application)
- Current az cli credentials stored
@@ -52,30 +58,73 @@ export AZURE_CLIENT_SECRET="XXXXXXX"
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
The other three cases does 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.
The other three cases does not need additional configuration, `--az-cli-auth` and `--managed-identity-auth` are automated options. To use `--browser-auth` the user needs to authenticate against Azure using the default browser to start the scan, also `tenant-id` is required.
### Permissions
To use each one you need to pass the proper flag to the execution. Prowler fro Azure handles two types of permission scopes, which are:
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)
- **Microsoft Entra ID permissions**: Used to retrieve metadata from the identity assumed by Prowler (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
#### Microsoft Entra ID scope
Azure Active Directory (AAD) permissions required by the tool are the following:
Microsoft Entra ID (AAD earlier) permissions required by the tool are the following:
- `Directory.Read.All`
- `Policy.Read.All`
- `UserAuthenticationMethod.Read.All`
The best way to assign it is through the azure web console:
The best way to assign it is through the Azure web console:
1. Access to Microsoft Entra ID
2. In the left menu bar, go to "App registrations"
3. Once there, in the menu bar click on "+ New registration" to register a new application
4. Fill the "Name, select the "Supported account types" and click on "Register. You will be redirected to the applications page.
![Register an Application page](../img/register-application.png)
4. Select the new application
5. In the left menu bar, select "API permissions"
6. Then click on "+ Add a permission" and select "Microsoft Graph"
7. Once in the "Microsoft Graph" view, select "Application permissions"
8. Finally, search for "Directory", "Policy" and "UserAuthenticationMethod" select the following permissions:
- `Directory.Read.All`
- `Policy.Read.All`
- `UserAuthenticationMethod.Read.All`
![EntraID Permissions](../img/AAD-permissions.png)
![AAD Permissions](../img/AAD-permissions.png)
#### 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:
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`
To assign this roles, follow the instructions:
1. Access your subscription, then select your subscription.
2. Select "Access control (IAM)".
3. In the overview, select "Roles"
![IAM Page](../img/page-IAM.png)
4. Click on "+ Add" and select "Add role assignment"
5. In the search bar, type `Security Reader`, select it and click on "Next"
6. In the Members tab, click on "+ Select members" and add the members you want to assign this role.
7. Click on "Review + assign" to apply the new role.
*Repeat these steps for `Reader` role*
## Google Cloud
### Authentication
Prowler will follow the same credentials search as [Google authentication libraries](https://cloud.google.com/docs/authentication/application-default-credentials#search_order):
1. [GOOGLE_APPLICATION_CREDENTIALS environment variable](https://cloud.google.com/docs/authentication/application-default-credentials#GAC)
2. [User credentials set up by using the Google Cloud CLI](https://cloud.google.com/docs/authentication/application-default-credentials#personal)
3. [The attached service account, returned by the metadata server](https://cloud.google.com/docs/authentication/application-default-credentials#attached-sa)
Those credentials must be associated to a user or service account with proper permissions to do all checks. To make sure, add the `Viewer` role to the member associated with the credentials.
???+ note
By default, `prowler` will scan all accessible GCP Projects, use flag `--project-ids` to specify the projects to be scanned.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 358 KiB

After

Width:  |  Height:  |  Size: 376 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 KiB

After

Width:  |  Height:  |  Size: 338 KiB

BIN
docs/img/dashboard.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

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