Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
392 commits
Select commit Hold shift + click to select a range
4059b58
fix paths instance, subnets
ramimac Jun 21, 2020
b46666f
Added unit tests for get_report_name and authenticate
tkeech1 Jun 22, 2020
4b7c1d1
Updated based on latest in develop branch
tkeech1 Jun 23, 2020
87fa46b
Merge remote-tracking branch 'origin/feature/pyupgrade' into release/…
x4v13r64 Jun 27, 2020
5c581e9
Update version
x4v13r64 Jun 27, 2020
abe3294
conditional SG inclusion
ramimac Jun 28, 2020
b5064fb
Removed IAM test class (now we use Boto3)
JJmako Jun 30, 2020
5a5d52d
Added console tests
JJmako Jun 30, 2020
c294321
Added fs tests
JJmako Jul 1, 2020
4918020
Get owner ID from raw resource
x4v13r64 Jul 1, 2020
c9c9882
Merge branch 'release/5.10' into feature/511-ARN-standard-key
x4v13r64 Jul 1, 2020
cef988d
Merge pull request #733 from nccgroup/feature/511-ARN-standard-key
x4v13r64 Jul 1, 2020
04f0a44
Merge pull request #774 from nccgroup/feature/ec2-instance-profile
x4v13r64 Jul 1, 2020
6da5365
Tweak partial
x4v13r64 Jul 1, 2020
c854336
Merge branch 'release/5.10' into enhancement/azure-support-tags-res_g…
x4v13r64 Jul 1, 2020
26c2c5f
Merge branch 'release/5.10' into enhancement/azure-support-tags-res_g…
x4v13r64 Jul 1, 2020
dc0ebcc
Fix partial
x4v13r64 Jul 1, 2020
77f7a37
Merge pull request #789 from nccgroup/enhancement/azure-support-tags-…
x4v13r64 Jul 1, 2020
1d24588
Remove duplicate reference
x4v13r64 Jul 1, 2020
3390222
Merge branch 'release/5.10' of github.com:nccgroup/ScoutSuite into re…
x4v13r64 Jul 1, 2020
46277da
Remove duplicate reference
x4v13r64 Jul 1, 2020
e41891d
Fixing files path
JJmako Jul 2, 2020
7221a78
Fixing file path
JJmako Jul 2, 2020
b2f1adb
Merge branches 'master' and 'release/5.10' of github.com:nccgroup/Sco…
x4v13r64 Jul 2, 2020
fde9d71
Merge pull request #783 from nccgroup/feature/pytest
x4v13r64 Jul 2, 2020
0b86af6
Merge pull request #804 from nccgroup/release/5.10
x4v13r64 Jul 2, 2020
d6f217f
Remove LGTM
x4v13r64 Jul 2, 2020
0985e7d
Remove coveralls
x4v13r64 Jul 2, 2020
360dde7
Rename workflow and add badge
x4v13r64 Jul 2, 2020
3d7958f
Point to URL
x4v13r64 Jul 2, 2020
a801298
Fixed in SGs for ELBs display name and not internal ID
Jul 2, 2020
4fd8c80
Added: show for each EC2 instance attached roles
Jul 2, 2020
0260091
Merge pull request #771 from nccgroup/feature/lambda-enhancements
x4v13r64 Jul 2, 2020
5174de6
improve iam rules accuracy
alessandrogonzalez3 Jul 3, 2020
c5697ce
Merge branch 'develop' into bugfix/elb_partial
alessandrogonzalez3 Jul 3, 2020
ce2285c
Merge pull request #807 from nccgroup/bugfix/elb_partial
x4v13r64 Jul 3, 2020
241b6a6
Move conditions to single file
x4v13r64 Jul 3, 2020
6a63038
Merge pull request #808 from nccgroup/bugfix/781-false-positive-regex…
x4v13r64 Jul 3, 2020
6c2ea90
Switch to pytest
x4v13r64 Jul 3, 2020
f3bcd48
Merge remote-tracking branch 'origin/develop' into develop
x4v13r64 Jul 3, 2020
9353781
Add id to partial
x4v13r64 Jul 3, 2020
c949ad9
Fix broken partial
x4v13r64 Jul 3, 2020
4d7a73b
Add id to resource
x4v13r64 Jul 3, 2020
4b1b875
Fix service validation
x4v13r64 Jul 4, 2020
ddcff17
Format condition
x4v13r64 Jul 4, 2020
1afbe74
Minor change
x4v13r64 Jul 4, 2020
63fe494
Improve condition
x4v13r64 Jul 4, 2020
7da63bb
Fix typo
x4v13r64 Jul 4, 2020
bdb89a6
Add instance name and public dns to EC2 attack surface #22
alessandrogonzalez3 Jul 6, 2020
ec6e71d
Added instance ID when displaying ENI details within the SG view. Fix…
alessandrogonzalez3 Jul 6, 2020
c6cf52e
Merge branch 'develop' into feature/22-attack-surface-improvements
alessandrogonzalez3 Jul 6, 2020
06b2c55
Fixed template for attack surface (needed to be more generic)
alessandrogonzalez3 Jul 6, 2020
5a8175f
Merge pull request #810 from nccgroup/bugfix/filters-and-callbacks
x4v13r64 Jul 16, 2020
df93239
Merge pull request #805 from nccgroup/feature/migrate-opinel-tests
x4v13r64 Jul 17, 2020
c745853
Cosmetic changes
x4v13r64 Jul 19, 2020
e4e1eaa
Minor changes
x4v13r64 Jul 19, 2020
a8362f0
Cosmetic changes
x4v13r64 Jul 19, 2020
077a050
Merge branch 'develop' into feature/22-attack-surface-improvements
x4v13r64 Jul 19, 2020
340d451
Merge branch 'develop' into nklauer/dynamodb
x4v13r64 Jul 19, 2020
f004750
Merge pull request #811 from nccgroup/feature/22-attack-surface-impro…
x4v13r64 Jul 19, 2020
b8df7da
Add dynamodb support
x4v13r64 Jul 19, 2020
3f42c40
Add tags
x4v13r64 Jul 19, 2020
4c5b8dc
Restore SSE check
x4v13r64 Jul 19, 2020
674c4de
Remove prop references
x4v13r64 Jul 19, 2020
27171b0
Merge branch 'nklauer/dynamodb' into develop
x4v13r64 Jul 19, 2020
ffd5c1a
Merge remote-tracking branch 'origin/develop' into develop
x4v13r64 Jul 19, 2020
eb01de6
Merge branch 'develop' into feature/dockerized
x4v13r64 Jul 19, 2020
795ef17
Merge branch 'develop' into Enhancement/Update_AWS_CIS_Benchmark_to_1…
x4v13r64 Jul 19, 2020
05ee368
Merge remote-tracking branch 'origin/Enhancement/Update_AWS_CIS_Bench…
x4v13r64 Jul 19, 2020
655c0ba
Minor change
x4v13r64 Jul 22, 2020
8ac802c
Minor change
x4v13r64 Jul 22, 2020
153aa76
Update directories
x4v13r64 Jul 22, 2020
c1f8bdb
Update supported python versions
x4v13r64 Jul 22, 2020
5d4f85e
Remove 3.9
x4v13r64 Jul 22, 2020
cbdf613
Fix codecov integration
x4v13r64 Jul 22, 2020
f5036c7
Fix codecov integration
x4v13r64 Jul 22, 2020
b7f4586
Merge branch 'bugfix/5.9.1' into develop
x4v13r64 Jul 28, 2020
ac43fbc
Merge branch 'bugfix/5.9.1' into develop
x4v13r64 Jul 28, 2020
3924ad5
Restore overwritten changes
x4v13r64 Jul 28, 2020
29791d5
Improve exception handling
x4v13r64 Jul 29, 2020
b53b279
Merge branch 'develop' into Enhancement/Update_AWS_CIS_Benchmark_to_1…
x4v13r64 Jul 31, 2020
b97c9db
Implement https://github.com/nccgroup/ScoutSuite/issues/681
x4v13r64 Aug 2, 2020
632e966
Remove not implementable rules from ruleset.
x4v13r64 Aug 2, 2020
89b79c2
Update wording
x4v13r64 Aug 2, 2020
896ae31
Remove outdated ruleset
x4v13r64 Aug 2, 2020
918a9ce
Show flow logs and peering connections
x4v13r64 Aug 3, 2020
ad9d4a2
Polish peering connections
x4v13r64 Aug 3, 2020
f589482
Un-collapse
x4v13r64 Aug 3, 2020
f93872b
Minor change
x4v13r64 Aug 3, 2020
d758673
Un-hide and improve support for flow logs
x4v13r64 Aug 3, 2020
9b5f1bc
Improve support for flow logs
x4v13r64 Aug 3, 2020
043d1ac
Restore VPC flow logs in report and callback
x4v13r64 Aug 3, 2020
2642301
Change id order
x4v13r64 Aug 3, 2020
206ada9
Fix rule
x4v13r64 Aug 3, 2020
30ca64e
Fix rule
x4v13r64 Aug 3, 2020
2d6f463
Remove comment
x4v13r64 Aug 3, 2020
72891b5
Hide as not implemented
x4v13r64 Aug 3, 2020
1b47457
Format findings
x4v13r64 Aug 3, 2020
50e6f80
Set correct dashboard name
x4v13r64 Aug 3, 2020
8fc52ba
Remove nonexistant summary
x4v13r64 Aug 3, 2020
a336639
Remove comment
x4v13r64 Aug 3, 2020
e43cf9c
Minor change
x4v13r64 Aug 3, 2020
7e99f81
Fix bug which didn't hide left menu for CloudWatch metric filters
x4v13r64 Aug 3, 2020
00d8791
Fixed stack traces when using a log file
alessandrogonzalez3 Aug 14, 2020
a83aebd
added missing files
rossja Aug 17, 2020
cf23b0f
added missing build hook
rossja Aug 17, 2020
29ced08
merged in master
rossja Aug 17, 2020
8a04679
merged develop
rossja Aug 17, 2020
b6f9332
merged develop
rossja Aug 17, 2020
87618d2
updated readme
rossja Aug 18, 2020
4ff75ed
updated to remove rossja from the container image name
rossja Aug 18, 2020
ccbbe4b
Sort rulesets
x4v13r64 Aug 19, 2020
190b7ee
Sort rulesets
x4v13r64 Aug 19, 2020
666b167
Copy findings and tweak parameters
x4v13r64 Aug 19, 2020
a34c1af
Copy findings and tweak parameters
x4v13r64 Aug 19, 2020
3856e8a
Move duplicate rule
x4v13r64 Aug 19, 2020
c84e889
Merge pull request #679 from nccgroup/Enhancement/Update_AWS_CIS_Benc…
x4v13r64 Aug 19, 2020
4cef6f0
Merge pull request #832 from nccgroup/bugfix/fix-logfile-option
x4v13r64 Aug 19, 2020
2dc8870
Fix condition
x4v13r64 Aug 20, 2020
6b61a7d
Refactor bucket member parsing.
x4v13r64 Aug 20, 2020
66c22e7
Improve partial and add suffix
x4v13r64 Aug 20, 2020
6068790
Add field
x4v13r64 Aug 20, 2020
0ccca66
Improvements to Dockerfile
Aug 20, 2020
62c5773
Improve partial and add suffixes
x4v13r64 Aug 21, 2020
ca01570
Fix for https://github.com/nccgroup/ScoutSuite/issues/801
x4v13r64 Aug 22, 2020
785e9e0
Remove redundant output
x4v13r64 Aug 22, 2020
72ccd7c
Set debug level
x4v13r64 Aug 22, 2020
6375ed9
Debug
x4v13r64 Aug 22, 2020
3d2481d
Fix tenant ID pulling
x4v13r64 Aug 22, 2020
d566a64
Fixed Azure CLI not installing. Install vim and nano to make the dock…
Aug 26, 2020
4dca0e4
added less to install-additional
rossja Aug 28, 2020
6fc0dae
Scaffhold for GuardDuty
ramimac Aug 29, 2020
3d6303b
fix facade ref
ramimac Aug 29, 2020
c28bfc8
Gather addtional context for Cloudformation Stacks
ramimac Aug 30, 2020
f41a1d8
Merge pull request #840 from nccgroup/enchancement/aws-cloudformation
x4v13r64 Sep 1, 2020
49d0135
Added tags to users
JJmako Sep 1, 2020
f1c5c71
improve rationale, id_suffix, fix #823
ramimac Sep 1, 2020
c11989c
Show user tags on HTML
JJmako Sep 2, 2020
7c68091
Merge branch 'develop' into feature/dockerized
x4v13r64 Sep 5, 2020
50592e0
Merge remote-tracking branch 'origin/feature/dockerized' into feature…
x4v13r64 Sep 5, 2020
375e787
Add badges
x4v13r64 Sep 5, 2020
198e9e8
Prepare for wiki move
x4v13r64 Sep 5, 2020
e9351b2
Remove useless suffixes
x4v13r64 Sep 5, 2020
ab7061c
Merge pull request #842 from nccgroup/bug/aws-improve-sts-findings
x4v13r64 Sep 5, 2020
04a3341
Normalize implementation
x4v13r64 Sep 5, 2020
8d7d9af
Merge pull request #843 from nccgroup/feature/include-tag
x4v13r64 Sep 5, 2020
13c01a6
Merge branch 'develop' into feature/dockerized
x4v13r64 Sep 6, 2020
91c9f68
Restore change
x4v13r64 Sep 6, 2020
fb80aec
Move folder to top directory
x4v13r64 Sep 6, 2020
2967a65
Remove license
x4v13r64 Sep 6, 2020
dad164e
Move readme to wiki
x4v13r64 Sep 6, 2020
d495dc6
Restore develop version
x4v13r64 Sep 6, 2020
082b80b
Merge pull request #775 from nccgroup/feature/dockerized
x4v13r64 Sep 6, 2020
440dd2f
Minor improvements
x4v13r64 Sep 6, 2020
ed24c45
Add regions
x4v13r64 Sep 6, 2020
be1e0ff
Added Tags to IAM Roles
JJmako Sep 7, 2020
c51ff26
Added: show for each IAM role the Lambda functions to which they are …
Sep 7, 2020
7ed1f0c
Improved NSG port/s management
Sep 8, 2020
3fde85e
Normalize implementation
Sep 8, 2020
76eed39
Added: parameter to check if a security group has default rules
Sep 9, 2020
e4841e8
Merge pull request #846 from nccgroup/feature/add-iam-role-tag
x4v13r64 Sep 9, 2020
59dab9c
Added: a check if SG rules have default rules
Sep 9, 2020
c7f9f13
Minor change
x4v13r64 Sep 9, 2020
70a6064
Improve error handling
x4v13r64 Sep 9, 2020
c701779
Merge pull request #847 from nccgroup/enhancement/784-EC2_Lambda-IAM-…
x4v13r64 Sep 9, 2020
5c535d1
Set correct dashboard name
x4v13r64 Sep 15, 2020
6b4592f
Remove reference to Scout Suite
x4v13r64 Sep 17, 2020
0ad01e7
Use generic "Scout" term
x4v13r64 Sep 17, 2020
436d344
Abridge
x4v13r64 Sep 17, 2020
9e4ce6c
Merge branch 'develop' of github.com:nccgroup/ScoutSuite into develop
x4v13r64 Sep 17, 2020
15d11c3
Fix typo in rationale
rbdixon Sep 17, 2020
ef73eb4
Merge pull request #859 from rbdixon/rbdixon-typo-rationale
x4v13r64 Sep 17, 2020
6ff8903
Added export CSV button
JJmako Sep 18, 2020
d815106
Remove conditional
x4v13r64 Sep 19, 2020
45acadf
Fix rules
x4v13r64 Sep 19, 2020
2a38836
Abridge
x4v13r64 Sep 19, 2020
101c4fc
Merge pull request #849 from nccgroup/enhancement/5-aws-default-SG-rules
x4v13r64 Sep 19, 2020
471f657
Merge pull request #848 from nccgroup/bug/793-azure-nsg-reports
x4v13r64 Sep 19, 2020
c0e37f8
Update rulesets
x4v13r64 Sep 19, 2020
3966d3d
Merge remote-tracking branch 'origin/develop' into develop
x4v13r64 Sep 19, 2020
1d75b6c
Merge pull request #839 from nccgroup/enhancement/aws-guardduty
x4v13r64 Sep 19, 2020
4eb888f
Update library import
x4v13r64 Sep 21, 2020
5a22c32
Restore imports
x4v13r64 Sep 21, 2020
040d7a3
Set libraries to specific versions
x4v13r64 Sep 21, 2020
940af9b
Merge pull request #864 from nccgroup/bugfix/861-azure-monitor-import
x4v13r64 Sep 21, 2020
8c8a1bd
Set library versions
x4v13r64 Sep 21, 2020
3424073
Add support for GKE
x4v13r64 Sep 21, 2020
8b5a5bb
Add support for GKE
x4v13r64 Sep 21, 2020
f2a1188
Fix for https://github.com/nccgroup/ScoutSuite-Proprietary/issues/221
x4v13r64 Sep 21, 2020
73ca429
Use beta library
x4v13r64 Sep 21, 2020
b438362
Include pod security policy
x4v13r64 Sep 21, 2020
83be94c
Add rule
x4v13r64 Sep 21, 2020
8c501a9
Add support for master authorized networks
x4v13r64 Sep 21, 2020
12daf05
Improve partial
x4v13r64 Sep 21, 2020
dd7a7ca
Add support for master authorized networks
x4v13r64 Sep 21, 2020
e6e493c
Merge pull request #865 from nccgroup/feature/gcp-gke-improvements
x4v13r64 Sep 21, 2020
aec79bc
Update requirement
x4v13r64 Sep 21, 2020
d115693
Improve parsing and partial
x4v13r64 Sep 21, 2020
ae087de
Set correct about
x4v13r64 Sep 22, 2020
811ba17
Add empty ruleset
x4v13r64 Sep 22, 2020
191932f
Update rds-instance-short-backup-retention-period.json
Techbrunch Sep 22, 2020
01ffb89
Merge pull request #869 from Techbrunch/patch-1
x4v13r64 Sep 22, 2020
7821031
Add rules
x4v13r64 Sep 22, 2020
6d11811
Add rule
x4v13r64 Sep 22, 2020
b2e7291
Remove comment
x4v13r64 Sep 22, 2020
995cfb9
Improve parsing and report
x4v13r64 Sep 22, 2020
fef7172
Sort ruleset
x4v13r64 Sep 22, 2020
79ed0b2
Sort ruleset and format findings
x4v13r64 Sep 22, 2020
0e68468
Change word
x4v13r64 Sep 22, 2020
22333fe
Merge pull request #871 from nccgroup/feature/improve-azure-appservic…
x4v13r64 Sep 22, 2020
aaf979a
Take status into account
x4v13r64 Sep 23, 2020
c5c78c9
Match GCE instances, networks and subnetworks
x4v13r64 Sep 23, 2020
75f9a0f
Match GCE networks and firewall rules
x4v13r64 Sep 23, 2020
82eeb81
Merge pull request #872 from nccgroup/enhancement/gce-support
x4v13r64 Sep 23, 2020
2794c3e
Add AWS user agent
x4v13r64 Sep 23, 2020
d2a400c
Remove unused import
x4v13r64 Sep 23, 2020
1578a70
Add method
x4v13r64 Sep 23, 2020
647bb84
Minor change
x4v13r64 Sep 23, 2020
7c537fd
Add user agent for Azure provider
x4v13r64 Sep 23, 2020
56ec49a
Fix list output
x4v13r64 Sep 24, 2020
f8e28a8
Add user agent for client libraries
x4v13r64 Sep 24, 2020
67a79bc
Add user agent for native
x4v13r64 Sep 24, 2020
83a8214
Fix test
x4v13r64 Sep 24, 2020
9ba42ee
Move concurrency to paginator
x4v13r64 Sep 24, 2020
9b815c6
Add throttling detection for GCP
x4v13r64 Sep 24, 2020
b9a1d94
Add user agent setting into this method too
x4v13r64 Sep 24, 2020
6d58c9f
Reformat code
x4v13r64 Sep 24, 2020
9a8f1d2
Merge pull request #875 from nccgroup/bugfix/gcp-usage-quotas
x4v13r64 Sep 25, 2020
b5ca0dd
Merge pull request #874 from nccgroup/enhancement/provider-user-agents
x4v13r64 Sep 25, 2020
b763d28
Fix button positioning
x4v13r64 Sep 25, 2020
82cf869
Merge branch 'develop' into feature/438_export_finding_summary
x4v13r64 Sep 25, 2020
78ae4af
Clean code
x4v13r64 Sep 25, 2020
ea7ce31
Merge pull request #860 from nccgroup/feature/438_export_finding_summary
x4v13r64 Sep 25, 2020
fa9d98c
Upgrade CLI core version
x4v13r64 Sep 28, 2020
c010622
Update AWS IPs
x4v13r64 Sep 28, 2020
53dabf5
Format finding
x4v13r64 Sep 28, 2020
818be5e
Format code
x4v13r64 Sep 28, 2020
a42da41
Format rulesets and filters
x4v13r64 Sep 28, 2020
47aba77
Reformat code
x4v13r64 Sep 28, 2020
9057043
Minor changes
x4v13r64 Sep 28, 2020
c794c79
Reformat code
x4v13r64 Sep 28, 2020
315e6e2
Set correct dependency name
x4v13r64 Sep 28, 2020
4f12073
Minor changes
x4v13r64 Sep 28, 2020
e2f1d31
Basic testing module
x4v13r64 Sep 28, 2020
8190727
Improve error handling
x4v13r64 Sep 29, 2020
31900ff
Remove duplicate header setting
x4v13r64 Sep 29, 2020
c207efa
Remove debug message
x4v13r64 Sep 29, 2020
fc56d42
Remove debug message
x4v13r64 Sep 29, 2020
a8d3c48
Add missing service
x4v13r64 Sep 29, 2020
577c233
Handle project not configured as a workspace
x4v13r64 Sep 29, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ include = ScoutSuite/*.py
ScoutSuite/core/*.py
ScoutSuite/output/*.py
ScoutSuite/providers/aws/*.py
ScoutSuite/providers/aws/configs/*.py
ScoutSuite/providers/aws/services/*.py
ScoutSuite/providers/aws/facade/*.py
ScoutSuite/providers/aws/resources/*.py
ScoutSuite/providers/azure/*.py
ScoutSuite/providers/azure/configs/*.py
ScoutSuite/providers/azure/services/*.py
ScoutSuite/providers/azure/facade/*.py
ScoutSuite/providers/azure/resources/*.py
ScoutSuite/providers/gcp/*.py
ScoutSuite/providers/gcp/configs/*.py
ScoutSuite/providers/gcp/services/*.py
ScoutSuite/providers/gcp/facade/*.py
ScoutSuite/providers/gcp/resources/*.py
9 changes: 0 additions & 9 deletions Dockerfile

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

#

[![Travis](https://travis-ci.org/nccgroup/ScoutSuite.svg?branch=master)](https://travis-ci.org/nccgroup/ScoutSuite)
[![Coverage Status](https://coveralls.io/repos/github/nccgroup/ScoutSuite/badge.svg?branch=master)](https://coveralls.io/github/nccgroup/ScoutSuite?branch=master)
[![Workflow](https://github.com/nccgroup/ScoutSuite/workflows/CI%20Workflow/badge.svg)](https://github.com/nccgroup/ScoutSuite/actions)
[![CodeCov](https://codecov.io/gh/nccgroup/ScoutSuite/branch/master/graph/badge.svg)](https://codecov.io/gh/nccgroup/ScoutSuite)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/nccgroup/ScoutSuite.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/nccgroup/ScoutSuite/alerts/)
[![PyPI version](https://badge.fury.io/py/ScoutSuite.svg)](https://badge.fury.io/py/ScoutSuite)
[![PyPI downloads](https://img.shields.io/pypi/dm/scoutsuite)](https://img.shields.io/pypi/dm/scoutsuite)
[![Docker Hub](https://img.shields.io/badge/Docker%20Hub-rossja%2Fncc--scoutsuite-blue)](https://hub.docker.com/r/rossja/ncc-scoutsuite/)
[![Docker Pulls](https://img.shields.io/docker/pulls/rossja/ncc-scoutsuite.svg?style=flat-square)](https://hub.docker.com/r/rossja/ncc-scoutsuite/)

## Description

Expand Down
2 changes: 1 addition & 1 deletion ScoutSuite/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = 'NCC Group'
__version__ = '5.9.1'
__version__ = '5.10.0'

ERRORS_LIST = []

Expand Down
6 changes: 3 additions & 3 deletions ScoutSuite/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ async def _run(provider,
if not credentials:
return 101
except Exception as e:
print_exception('Authentication failure: {}'.format(e))
print_exception(f'Authentication failure: {e}')
return 101

# Create a cloud provider object
Expand All @@ -228,7 +228,7 @@ async def _run(provider,
programmatic_execution=programmatic_execution,
credentials=credentials)
except Exception as e:
print_exception('Initialization failure: {}'.format(e))
print_exception(f'Initialization failure: {e}')
return 102

# Create a new report
Expand Down Expand Up @@ -336,7 +336,7 @@ async def _run(provider,
exceptions.process(cloud_provider)
exceptions = exceptions.exceptions
except Exception as e:
print_exception('Failed to load exceptions: {}'.format(e))
print_exception(f'Failed to load exceptions: {e}')
exceptions = {}
else:
exceptions = {}
Expand Down
2 changes: 1 addition & 1 deletion ScoutSuite/core/cli_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(self):

self.parser.add_argument('-v', '--version',
action='version',
version='Scout Suite {}'.format(__version__))
version=f'Scout Suite {__version__}')

self.common_providers_args_parser = argparse.ArgumentParser(add_help=False)

Expand Down
23 changes: 23 additions & 0 deletions ScoutSuite/core/conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,29 @@ def pass_condition(b, test, a):
elif test == 'notInSubnets':
result = (not pass_condition(b, 'inSubnets', a))

# Port/port ranges tests
elif test == 'portsInPortList':
result = False
if not type(b) == list:
b = [b]
if not type(a) == list:
a = [a]
for port_range in b:
if '-' in port_range:
bottom_limit_port = int(port_range.split('-')[0])
upper_limit_port = int(port_range.split('-')[1])
for port in a:
if type(port) != int:
port = int(port)
if bottom_limit_port <= port <= upper_limit_port:
result = True
break
else: #A single port
for port in a:
if port == port_range:
result = True
break

# Policy statement tests
elif test == 'containAction':
result = False
Expand Down
24 changes: 17 additions & 7 deletions ScoutSuite/core/console.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import logging
import platform
import os
import sys
import traceback

import coloredlogs
from six.moves import input

from ScoutSuite import ERRORS_LIST

Expand Down Expand Up @@ -32,8 +32,18 @@ def set_logger_configuration(is_debug=False, quiet=False, output_file_path=None)
coloredlogs.install(level='DEBUG' if is_debug else 'INFO', logger=logger)

if output_file_path:
# For some reason, hostname information is not passed to the FileHandler
# Add it using a filter
class HostnameFilter(logging.Filter):
hostname = platform.node()

def filter(self, record):
record.hostname = HostnameFilter.hostname
return True
# create file handler which logs messages
fh = logging.FileHandler(output_file_path, 'w+')
# Add filter to add hostname information
fh.addFilter(HostnameFilter())
# create formatter and add it to the handlers
formatter = logging.Formatter(fmt='%(asctime)s %(hostname)s %(name)s[%(process)d] %(levelname)s %(message)s',
datefmt='%Y-%m-%d %H:%M:%S')
Expand Down Expand Up @@ -66,18 +76,18 @@ def print_exception(exception, additional_details=None):
file_name = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
line_number = exc_tb.tb_lineno
traceback_exc = traceback.format_exc()
str = '{} L{}: {}'.format(file_name, line_number, exception)
str = f'{file_name} L{line_number}: {exception}'
else:
file_name = None
line_number = None
traceback_exc = None
str = '{}'.format(exception)
str = f'{exception}'
exc = False # if there isn't an actual exception then it's pointless
except Exception as e:
file_name = None
line_number = None
traceback_exc = None
str = '{}'.format(exception)
str = f'{exception}'

if verbose_exceptions and exc:
logger.exception(str)
Expand All @@ -86,8 +96,8 @@ def print_exception(exception, additional_details=None):

ERRORS_LIST.append({'file': file_name,
'line': line_number,
'exception': '{}'.format(exception),
'traceback': '{}'.format(traceback_exc),
'exception': f'{exception}',
'traceback': f'{traceback_exc}',
'additional_details': additional_details})


Expand Down Expand Up @@ -131,7 +141,7 @@ def prompt_overwrite(filename, force_write, test_input=None):
"""
if not os.path.exists(filename) or force_write:
return True
return prompt_yes_no('File \'{}\' already exists. Do you want to overwrite it'.format(filename),
return prompt_yes_no(f'File \'{filename}\' already exists. Do you want to overwrite it',
test_input=test_input)


Expand Down
2 changes: 1 addition & 1 deletion ScoutSuite/core/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from ScoutSuite.output.result_encoder import JavaScriptEncoder


class RuleExceptions(object):
class RuleExceptions:
"""
Exceptions handling
"""
Expand Down
2 changes: 0 additions & 2 deletions ScoutSuite/core/fs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import print_function

import datetime
import json
import os
Expand Down
8 changes: 4 additions & 4 deletions ScoutSuite/core/processingengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from ScoutSuite.core.utils import recurse


class ProcessingEngine(object):
class ProcessingEngine:
"""

"""
Expand All @@ -21,7 +21,7 @@ def __init__(self, ruleset):
manage_dictionary(self.rules, rule.path, [])
self.rules[rule.path].append(rule)
except Exception as e:
print_exception('Failed to create rule %s: %s' % (rule.filename, e))
print_exception(f'Failed to create rule {rule.filename}: {e}')

def run(self, cloud_provider, skip_dashboard=False):
# Clean up existing findings
Expand All @@ -35,7 +35,7 @@ def run(self, cloud_provider, skip_dashboard=False):
if not rule.enabled: # or rule.service not in []: # TODO: handle this...
continue

print_debug('Processing %s rule "%s" (%s)' % (rule.service, rule.description, rule.filename))
print_debug(f'Processing {rule.service} rule "{rule.description}" ({rule.filename})')
finding_path = rule.path
path = finding_path.split('.')
service = path[0]
Expand Down Expand Up @@ -68,7 +68,7 @@ def run(self, cloud_provider, skip_dashboard=False):
cloud_provider.services[service][self.ruleset.rule_type][rule.key]['references'] = \
rule.references if hasattr(rule, 'references') else None
except Exception as e:
print_exception('Failed to process rule defined in %s: %s' % (rule.filename, e))
print_exception(f'Failed to process rule defined in {rule.filename}: {e}')
# Fallback if process rule failed to ensure report creation and data dump still happen
cloud_provider.services[service][self.ruleset.rule_type][rule.key]['checked_items'] = 0
cloud_provider.services[service][self.ruleset.rule_type][rule.key]['flagged_items'] = 0
Expand Down
10 changes: 5 additions & 5 deletions ScoutSuite/core/rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
]


class Rule(object):
class Rule:

def to_string(self):
return str(vars(self))
Expand Down Expand Up @@ -71,8 +71,8 @@ def set_definition(self, rule_definitions, attributes=None, ip_ranges=None, para
if condition[0].startswith('_INCLUDE_('):
include = re.findall(r'_INCLUDE_\((.*?)\)', condition[0])[0]
# new_conditions = load_data(include, key_name = 'conditions')
rules_path = '%s/%s' % (self.data_path, include)
with open(rules_path, 'rt') as f:
rules_path = f'{self.data_path}/{include}'
with open(rules_path) as f:
new_conditions = f.read()
for (i, value) in enumerate(condition[1]):
new_conditions = re.sub(condition[1][i], condition[2][i], new_conditions)
Expand Down Expand Up @@ -139,6 +139,6 @@ def set_definition(self, rule_definitions, attributes=None, ip_ranges=None, para
setattr(self, 'key', self.filename)
setattr(self, 'key', self.key.replace('.json', ''))
if self.key_suffix:
setattr(self, 'key', '%s-%s' % (self.key, self.key_suffix))
setattr(self, 'key', f'{self.key}-{self.key_suffix}')
except Exception as e:
print_exception('Failed to set definition %s: %s' % (self.filename, e))
print_exception(f'Failed to set definition {self.filename}: {e}')
12 changes: 6 additions & 6 deletions ScoutSuite/core/rule_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from ScoutSuite.core.console import print_error, print_exception


class RuleDefinition(object):
class RuleDefinition:

def __init__(self, data_path, file_name=None, rule_dirs=None, string_definition=None):
rule_dirs = [] if rule_dirs is None else rule_dirs
Expand All @@ -28,7 +28,7 @@ def __str__(self):
value = '-' * 80 + '\n' + ' ' * padding + ' %s' % getattr(self, 'description') + '\n' + '-' * 80 + '\n'
quiet_list = ['descriptions', 'rule_dirs', 'rule_types', 'rules_data_path', 'string_definition']
value += '\n'.join(
'%s: %s' % (attr, str(getattr(self, attr))) for attr in vars(self) if attr not in quiet_list)
'{}: {}'.format(attr, str(getattr(self, attr))) for attr in vars(self) if attr not in quiet_list)
value += '\n'
return value

Expand All @@ -46,7 +46,7 @@ def load(self):
try:
file_path = os.path.join(rule_dir, self.file_name) if rule_dir else self.file_name
except Exception as e:
print_exception('Failed to load file %s: %s' % (self.file_name, str(e)))
print_exception('Failed to load file {}: {}'.format(self.file_name, str(e)))
if os.path.isfile(file_path):
self.file_path = file_path
file_name_valid = True
Expand All @@ -72,16 +72,16 @@ def load(self):
print_error('Error: could not find %s' % self.file_name)
else:
try:
with open(self.file_path, 'rt') as f:
with open(self.file_path) as f:
self.string_definition = f.read()
self.load_from_string_definition()
except Exception as e:
print_exception('Failed to load rule defined in %s: %s' % (self.file_name, str(e)))
print_exception('Failed to load rule defined in {}: {}'.format(self.file_name, str(e)))

def load_from_string_definition(self):
try:
definition = json.loads(self.string_definition)
for attr in definition:
setattr(self, attr, definition[attr])
except Exception as e:
print_exception('Failed to load string definition %s: %s' % (self.string_definition, str(e)))
print_exception('Failed to load string definition {}: {}'.format(self.string_definition, str(e)))
6 changes: 3 additions & 3 deletions ScoutSuite/core/ruleset.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def load(self, rule_type, quiet=False):
"""
if self.filename and os.path.exists(self.filename):
try:
with open(self.filename, 'rt') as f:
with open(self.filename) as f:
ruleset = json.load(f)
self.about = ruleset['about'] if 'about' in ruleset else ''
self.rules = {}
Expand All @@ -82,7 +82,7 @@ def load(self, rule_type, quiet=False):
for rule in ruleset['rules'][filename]:
self.handle_rule_versions(filename, rule_type, rule)
except Exception as e:
print_exception('Ruleset file %s contains malformed JSON: %s' % (self.filename, e))
print_exception(f'Ruleset file {self.filename} contains malformed JSON: {e}')
self.rules = []
self.about = ''
else:
Expand Down Expand Up @@ -193,7 +193,7 @@ def find_file(self, filename, filetype='rulesets'):
if filename and not os.path.isfile(filename):
# Not a valid relative / absolute path, check Scout's data under findings/ or filters/
if not filename.startswith('findings/') and not filename.startswith('filters/'):
filename = '%s/%s' % (filetype, filename)
filename = f'{filetype}/{filename}'
if not os.path.isfile(filename):
filename = os.path.join(self.rules_data_path, filename)
if not os.path.isfile(filename) and not filename.endswith('.json'):
Expand Down
2 changes: 1 addition & 1 deletion ScoutSuite/core/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
count_re = re.compile(r".*_count$")


class Server(object):
class Server:
"""
Boots a server that serves the result of the report for the user. This is still a proof of concept,
but will eventually be used to serve data when it exceeds 400mb.
Expand Down
3 changes: 1 addition & 2 deletions ScoutSuite/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Single-service rule processing functions
"""

from six import string_types
import copy

from ScoutSuite.core.console import print_exception
Expand Down Expand Up @@ -74,7 +73,7 @@ def recurse(all_info, current_info, target_path, current_path, config, add_suffi
results = results + recurse(all_info, split_current_info, copy.deepcopy(target_path), split_current_path,
config, add_suffix)
# Python 2-3 compatible way to check for string type
elif isinstance(current_info, string_types):
elif isinstance(current_info, str):
split_current_path = copy.deepcopy(current_path)
results = results + recurse(all_info, current_info, [], split_current_path,
config, add_suffix)
Expand Down
Loading