Convert Figma logo to code with AI

salesforce logocloudsplaining

Cloudsplaining is an AWS IAM Security Assessment tool that identifies violations of least privilege and generates a risk-prioritized report.

1,982
185
1,982
20

Top Related Projects

Multi-Cloud Security Auditing Tool

CloudMapper helps you analyze your Amazon Web Services (AWS) environments.

10,708

Prowler is an Open Source Security tool for AWS, Azure, GCP and Kubernetes to do security assessments, audits, incident response, compliance, continuous monitoring, hardening and forensics readiness. Includes CIS, NIST 800, NIST CSF, CISA, FedRAMP, PCI-DSS, GDPR, HIPAA, FFIEC, SOC2, GXP, Well-Architected Security, ENS and more

Cloud Security Posture Management (CSPM)

Cloud Security Posture Management (CSPM)

4,352

The AWS exploitation framework, designed for testing the security of Amazon Web Services environments.

Quick Overview

Cloudsplaining is an AWS IAM security assessment tool that identifies violations of least privilege and generates a risk-prioritized HTML report with a triage worksheet. It helps security teams, developers, and cloud engineers identify and remediate overly permissive IAM policies in their AWS environments.

Pros

  • Automates the process of identifying overly permissive IAM policies
  • Generates comprehensive HTML reports with risk prioritization
  • Supports multiple input formats, including AWS credentials and custom JSON files
  • Integrates well with CI/CD pipelines for continuous security assessment

Cons

  • Limited to AWS IAM analysis, not covering other cloud providers
  • May require additional context and manual review for accurate risk assessment
  • Learning curve for interpreting results and implementing remediation
  • Potential for false positives in complex environments

Code Examples

  1. Scanning an AWS account using credentials:
from cloudsplaining.scan.authorization_details import AuthorizationDetails
from cloudsplaining.scan.policy_document import PolicyDocument

authorization_details = AuthorizationDetails.load_from_aws(profile="your-profile")
results = authorization_details.scan()
  1. Analyzing a single IAM policy:
policy = {
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "*",
            "Resource": "*"
        }
    ]
}
policy_document = PolicyDocument(policy)
results = policy_document.analyze()
  1. Generating an HTML report:
from cloudsplaining.output.html_report import generate_html_report

generate_html_report(results, "output_directory")

Getting Started

To get started with Cloudsplaining:

  1. Install the package:

    pip install cloudsplaining
    
  2. Set up AWS credentials:

    aws configure
    
  3. Run a scan:

    cloudsplaining scan --input-file examples/files/example.json
    
  4. Generate an HTML report:

    cloudsplaining scan --input-file examples/files/example.json --output-directory ./output
    

Competitor Comparisons

Multi-Cloud Security Auditing Tool

Pros of ScoutSuite

  • Multi-cloud support (AWS, Azure, GCP, Alibaba Cloud, OCI)
  • Comprehensive security auditing across various cloud services
  • Customizable ruleset and reporting options

Cons of ScoutSuite

  • More complex setup and configuration process
  • Steeper learning curve for new users
  • Potentially slower scan times due to broader scope

Code Comparison

ScoutSuite (Python):

from ScoutSuite.core.cli_parser import *
from ScoutSuite.core.console import set_logger_configuration, print_info
from ScoutSuite.core.exceptions import RuleExceptions
from ScoutSuite.core.processingengine import ProcessingEngine
from ScoutSuite.core.ruleset import Ruleset

Cloudsplaining (Python):

import logging
import os
import json
from pathlib import Path
from typing import Dict, Any
from cloudsplaining.scan.policy_document import PolicyDocument

Both tools are written in Python and focus on cloud security analysis. ScoutSuite offers a more comprehensive approach with multi-cloud support, while Cloudsplaining specializes in AWS IAM policy analysis. ScoutSuite's code structure reflects its broader scope, importing various modules for different cloud providers and processing engines. Cloudsplaining's imports are more focused on policy document analysis and file handling.

CloudMapper helps you analyze your Amazon Web Services (AWS) environments.

Pros of CloudMapper

  • Provides visual network mapping and security analysis
  • Supports multiple AWS account auditing
  • Offers more comprehensive AWS service coverage

Cons of CloudMapper

  • More complex setup and configuration process
  • Steeper learning curve for new users
  • Less frequent updates compared to Cloudsplaining

Code Comparison

CloudMapper:

from cloudmapper.webserver import run_webserver
from cloudmapper.webserver.web_app import create_app

app = create_app()
run_webserver(app)

Cloudsplaining:

from cloudsplaining.scan.policy_document import PolicyDocument
from cloudsplaining.output.report import HTMLReport

policy = PolicyDocument(policy_dict)
report = HTMLReport(account_name, results)
report.write_html_report()

Both tools are designed for AWS security analysis, but they have different focuses. CloudMapper provides a broader range of features, including visual network mapping and multi-account support, making it more suitable for complex environments. However, this comes at the cost of a steeper learning curve and more involved setup process.

Cloudsplaining, on the other hand, specializes in IAM policy analysis and offers a more streamlined experience. It's easier to set up and use, making it a good choice for quick IAM policy audits. However, it lacks some of the advanced features and comprehensive service coverage that CloudMapper provides.

The code snippets demonstrate the different approaches: CloudMapper focuses on running a web server for visualization, while Cloudsplaining emphasizes policy document analysis and report generation.

10,708

Prowler is an Open Source Security tool for AWS, Azure, GCP and Kubernetes to do security assessments, audits, incident response, compliance, continuous monitoring, hardening and forensics readiness. Includes CIS, NIST 800, NIST CSF, CISA, FedRAMP, PCI-DSS, GDPR, HIPAA, FFIEC, SOC2, GXP, Well-Architected Security, ENS and more

Pros of Prowler

  • Broader scope: Covers multiple cloud providers (AWS, Azure, GCP) and over 300 checks
  • Active development: Frequent updates and contributions from the community
  • CLI tool: Easy to integrate into existing workflows and automation pipelines

Cons of Prowler

  • Steeper learning curve: More complex due to its extensive feature set
  • Resource-intensive: May require more time and computational resources for comprehensive scans
  • Less focused: Not specialized in IAM policy analysis like Cloudsplaining

Code Comparison

Prowler (Python):

def check_cloudtrail_enabled(self):
    cloudtrail_client = self.session.client("cloudtrail")
    trails = cloudtrail_client.describe_trails()
    if not trails["trailList"]:
        return False
    return True

Cloudsplaining (Python):

def analyze_policy_document(policy_document):
    analysis = analyze_policy_string(policy_document)
    return {
        "services": analysis.services_affected,
        "actions": analysis.actions_count,
        "resources": analysis.resources_count,
    }

Both tools are written in Python, but they serve different purposes. Prowler focuses on broader cloud security checks, while Cloudsplaining specializes in IAM policy analysis. The code snippets reflect these differences, with Prowler checking CloudTrail status and Cloudsplaining analyzing IAM policies.

Cloud Security Posture Management (CSPM)

Pros of Cloudsploit

  • Supports multiple cloud providers (AWS, Azure, Google Cloud, Oracle)
  • Offers a wider range of security checks and best practices
  • Provides a web-based dashboard for easier visualization and management

Cons of Cloudsploit

  • Requires more setup and configuration compared to Cloudsplaining
  • May have a steeper learning curve due to its broader scope
  • Less focused on specific IAM policy analysis compared to Cloudsplaining

Code Comparison

Cloudsplaining (Python):

from cloudsplaining.scan.policy_document import PolicyDocument

policy = PolicyDocument(policy_dict)
results = policy.analyze_policy_document()

Cloudsploit (JavaScript):

const CloudConfig = require('cloudconfig');
const config = new CloudConfig({
    cloudProvider: 'aws'
});
config.runScan((err, results) => {
    console.log(results);
});

Both tools aim to improve cloud security, but Cloudsplaining focuses specifically on AWS IAM policy analysis, while Cloudsploit offers a broader range of security checks across multiple cloud providers. Cloudsplaining may be easier to set up and use for AWS-specific IAM analysis, while Cloudsploit provides a more comprehensive security assessment for organizations using multiple cloud platforms.

Cloud Security Posture Management (CSPM)

Pros of Cloudsploit

  • Supports multiple cloud providers (AWS, Azure, Google Cloud, Oracle)
  • Offers a wider range of security checks and best practices
  • Provides a web-based dashboard for easier visualization and management

Cons of Cloudsploit

  • Requires more setup and configuration compared to Cloudsplaining
  • May have a steeper learning curve due to its broader scope
  • Less focused on specific IAM policy analysis compared to Cloudsplaining

Code Comparison

Cloudsplaining (Python):

from cloudsplaining.scan.policy_document import PolicyDocument

policy = PolicyDocument(policy_dict)
results = policy.analyze_policy_document()

Cloudsploit (JavaScript):

const CloudConfig = require('cloudconfig');
const config = new CloudConfig({
    cloudProvider: 'aws'
});
config.runScan((err, results) => {
    console.log(results);
});

Both tools aim to improve cloud security, but Cloudsplaining focuses specifically on AWS IAM policy analysis, while Cloudsploit offers a broader range of security checks across multiple cloud providers. Cloudsplaining may be easier to set up and use for AWS-specific IAM analysis, while Cloudsploit provides a more comprehensive security assessment for organizations using multiple cloud platforms.

4,352

The AWS exploitation framework, designed for testing the security of Amazon Web Services environments.

Pros of Pacu

  • More comprehensive AWS security testing tool, covering a wider range of AWS services and attack vectors
  • Modular architecture allows for easy extension and customization of functionality
  • Includes both reconnaissance and exploitation capabilities

Cons of Pacu

  • Steeper learning curve due to its more complex nature and broader scope
  • Requires more setup and configuration compared to Cloudsplaining's simpler approach
  • May be overkill for users primarily interested in IAM policy analysis

Code Comparison

Pacu (example module structure):

import pacu
from pacu.core.lib import module_data_dir

module_info = {
    'name': 'example_module',
    'author': 'Example Author',
    'category': 'ENUM',
    'one_liner': 'This module does X, Y, and Z.',
    'description': 'This module performs...',
    'services': ['EC2', 'IAM'],
    'external_dependencies': [],
    'arguments_to_autocomplete': ['--regions'],
}

Cloudsplaining (example policy analysis):

from cloudsplaining.scan.policy_document import PolicyDocument

policy = {
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "*",
            "Resource": "*"
        }
    ]
}
policy_document = PolicyDocument(policy)
results = policy_document.analyze()

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

NOTE: This repo/project has been restored by Salesforce.

Cloudsplaining

Cloudsplaining is an AWS IAM Security Assessment tool that identifies violations of least privilege and generates a risk-prioritized HTML report.

Tests Documentation Status Join the chat at https://gitter.im/cloudsplaining Twitter PyPI Python Version Downloads

Documentation

For full documentation, please visit the project on ReadTheDocs.

Overview

Cloudsplaining identifies violations of least privilege in AWS IAM policies and generates a pretty HTML report with a triage worksheet. It can scan all the policies in your AWS account or it can scan a single policy file.

It helps to identify IAM actions that do not leverage resource constraints. It also helps prioritize the remediation process by flagging IAM policies that present the following risks to the AWS account in question without restriction:

  • Data Exfiltration (s3:GetObject, ssm:GetParameter, secretsmanager:GetSecretValue)
  • Infrastructure Modification
  • Resource Exposure (the ability to modify resource-based policies)
  • Privilege Escalation (based on Rhino Security Labs research)

Cloudsplaining also identifies IAM Roles that can be assumed by AWS Compute Services (such as EC2, ECS, EKS, or Lambda), as they can present greater risk than user-defined roles - especially if the AWS Compute service is on an instance that is directly or indirectly exposed to the internet. Flagging these roles is particularly useful to penetration testers (or attackers) under certain scenarios. For example, if an attacker obtains privileges to execute ssm:SendCommand and there are privileged EC2 instances with the SSM agent installed, they can effectively have the privileges of those EC2 instances. Remote Code Execution via AWS Systems Manager Agent was already a known escalation/exploitation path, but Cloudsplaining can make the process of identifying theses cases easier. See the sample report for some examples.

You can also specify a custom exclusions file to filter out results that are False Positives for various reasons. For example, User Policies are permissive by design, whereas System roles are generally more restrictive. You might also have exclusions that are specific to your organization's multi-account strategy or AWS application architecture.

Motivation

Policy Sentry revealed to us that it is possible to finally write IAM policies according to least privilege in a scalable manner. Before Policy Sentry was released, it was too easy to find IAM policy documents that lacked resource constraints. Consider the policy below, which allows the IAM principal (a role or user) to run s3:PutObject on any S3 bucket in the AWS account:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:PutObject"
      ],
      "Resource": "*"
    }
  ]
}

This is bad. Ideally, access should be restricted according to resource ARNs, like so:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:GetObject"
      ],
      "Resource": "arn:aws:s3:::my-bucket/*"
    }
  ]
}

Policy Sentry makes it really easy to do this. Once Infrastructure as Code developers or AWS Administrators gain familiarity with the tool (which is quite easy to use), we've found that adoption starts very quickly. However, if you've been using AWS, there is probably a very large backlog of IAM policies that could use an uplift. If you have hundreds of AWS accounts with dozens of policies in each, how can we lock down those AWS accounts by programmatically identifying the policies that should be fixed?

That's why we wrote Cloudsplaining.

Cloudsplaining identifies violations of least privilege in AWS IAM policies and generates a pretty HTML report with a triage worksheet. It can scan all the policies in your AWS account or it can scan a single policy file.

Installation

Homebrew

brew tap salesforce/cloudsplaining https://github.com/salesforce/cloudsplaining
brew install cloudsplaining

Pip3

pip3 install --user cloudsplaining
  • Now you should be able to execute cloudsplaining from command line by running cloudsplaining --help.

Shell completion

To enable Bash completion, put this in your .bashrc:

eval "$(_CLOUDSPLAINING_COMPLETE=source cloudsplaining)"

To enable ZSH completion, put this in your .zshrc:

eval "$(_CLOUDSPLAINING_COMPLETE=source_zsh cloudsplaining)"

Scanning a single IAM policy

You can also scan a single policy file to identify risks instead of an entire account.

cloudsplaining scan-policy-file --input-file examples/policies/explicit-actions.json

The output will include a finding description and a list of the IAM actions that do not leverage resource constraints.

The output will resemble the following:

Issue found: Data Exfiltration
Actions: s3:GetObject

Issue found: Resource Exposure
Actions: ecr:DeleteRepositoryPolicy, ecr:SetRepositoryPolicy, s3:BypassGovernanceRetention, s3:DeleteAccessPointPolicy, s3:DeleteBucketPolicy, s3:ObjectOwnerOverrideToBucketOwner, s3:PutAccessPointPolicy, s3:PutAccountPublicAccessBlock, s3:PutBucketAcl, s3:PutBucketPolicy, s3:PutBucketPublicAccessBlock, s3:PutObjectAcl, s3:PutObjectVersionAcl

Issue found: Unrestricted Infrastructure Modification
Actions: ecr:BatchDeleteImage, ecr:CompleteLayerUpload, ecr:CreateRepository, ecr:DeleteLifecyclePolicy, ecr:DeleteRepository, ecr:DeleteRepositoryPolicy, ecr:InitiateLayerUpload, ecr:PutImage, ecr:PutImageScanningConfiguration, ecr:PutImageTagMutability, ecr:PutLifecyclePolicy, ecr:SetRepositoryPolicy, ecr:StartImageScan, ecr:StartLifecyclePolicyPreview, ecr:TagResource, ecr:UntagResource, ecr:UploadLayerPart, s3:AbortMultipartUpload, s3:BypassGovernanceRetention, s3:CreateAccessPoint, s3:CreateBucket, s3:DeleteAccessPoint, s3:DeleteAccessPointPolicy, s3:DeleteBucket, s3:DeleteBucketPolicy, s3:DeleteBucketWebsite, s3:DeleteObject, s3:DeleteObjectTagging, s3:DeleteObjectVersion, s3:DeleteObjectVersionTagging, s3:GetObject, s3:ObjectOwnerOverrideToBucketOwner, s3:PutAccelerateConfiguration, s3:PutAccessPointPolicy, s3:PutAnalyticsConfiguration, s3:PutBucketAcl, s3:PutBucketCORS, s3:PutBucketLogging, s3:PutBucketNotification, s3:PutBucketObjectLockConfiguration, s3:PutBucketPolicy, s3:PutBucketPublicAccessBlock, s3:PutBucketRequestPayment, s3:PutBucketTagging, s3:PutBucketVersioning, s3:PutBucketWebsite, s3:PutEncryptionConfiguration, s3:PutInventoryConfiguration, s3:PutLifecycleConfiguration, s3:PutMetricsConfiguration, s3:PutObject, s3:PutObjectAcl, s3:PutObjectLegalHold, s3:PutObjectRetention, s3:PutObjectTagging, s3:PutObjectVersionAcl, s3:PutObjectVersionTagging, s3:PutReplicationConfiguration, s3:ReplicateDelete, s3:ReplicateObject, s3:ReplicateTags, s3:RestoreObject, s3:UpdateJobPriority, s3:UpdateJobStatus

Scanning an entire AWS Account

Downloading Account Authorization Details

We can scan an entire AWS account and generate reports. To do this, we leverage the AWS IAM get-account-authorization-details API call, which downloads a large JSON file (around 100KB per account) that contains all of the IAM details for the account. This includes data on users, groups, roles, customer-managed policies, and AWS-managed policies.

  • You must have AWS credentials configured that can be used by the CLI.

  • You must have the privileges to run iam:GetAccountAuthorizationDetails. The arn:aws:iam::aws:policy/SecurityAudit policy includes this, as do many others that allow Read access to the IAM Service.

  • To download the account authorization details, ensure you are authenticated to AWS, then run cloudsplaining's download command:

cloudsplaining download
  • If you prefer to use your ~/.aws/credentials file instead of environment variables, you can specify the profile name:
cloudsplaining download --profile myprofile

It will download a JSON file in your current directory that contains your account authorization detail information.

Create Exclusions file

Cloudsplaining tool does not attempt to understand the context behind everything in your AWS account. It's possible to understand the context behind some of these things programmatically - whether the policy is applied to an instance profile, whether the policy is attached, whether inline IAM policies are in use, and whether or not AWS Managed Policies are in use. Only you know the context behind the design of your AWS infrastructure and the IAM strategy.

As such, it's important to eliminate False Positives that are context-dependent. You can do this with an exclusions file. We've included a command that will generate an exclusions file for you so you don't have to remember the required format.

You can create an exclusions template via the following command:

cloudsplaining create-exclusions-file

This will generate a file in your current directory titled exclusions.yml.

Now when you run the scan command, you can use the exclusions file like this:

cloudsplaining scan --exclusions-file exclusions.yml --input-file examples/files/example.json --output examples/files/

For more information on the structure of the exclusions file, see Filtering False Positives

Scanning the Authorization Details file

Now that we've downloaded the account authorization file, we can scan all of the AWS IAM policies with cloudsplaining.

Run the following command:

cloudsplaining scan --exclusions-file exclusions.yml --input-file examples/files/example.json --output examples/files/

It will create an HTML report like this:

It will also create a raw JSON data file:

  • default-iam-results.json: This contains the raw JSON output of the report. You can use this data file for operating on the scan results for various purposes. For example, you could write a Python script that parses this data and opens up automated JIRA issues or Salesforce Work Items. An example entry is shown below. The full example can be viewed at examples/files/iam-results-example.json
{
    "example-authz-details": [
        {
            "AccountID": "012345678901",
            "ManagedBy": "Customer",
            "PolicyName": "InsecureUserPolicy",
            "Arn": "arn:aws:iam::012345678901:user/userwithlotsofpermissions",
            "ActionsCount": 2,
            "ServicesCount": 1,
            "Actions": [
                "s3:PutObject",
                "s3:PutObjectAcl"
            ],
            "Services": [
                "s3"
            ]
        }
    ]
}

See the examples/files folder for sample output.

Filtering False Positives

Resource constraints are best practice - especially for system roles/instance profiles - but sometimes, these are by design. For example, consider a situation where a custom IAM policy is used on an instance profile for an EC2 instance that provisions Terraform. In this case, broad permissions are design requirements - so we don't want to include these in the results.

You can create an exclusions template via the following command:

cloudsplaining create-exclusions-file

This will generate a file in your current directory titled exclusions.yml.

The default exclusions file looks like this:

# Policy names to exclude from evaluation
# Suggestion: Add policies here that are known to be overly permissive by design, after you run the initial report.
policies:
  - "AWSServiceRoleFor*"
  - "*ServiceRolePolicy"
  - "*ServiceLinkedRolePolicy"
  - "AdministratorAccess" # Otherwise, this will take a long time
  - "service-role*"
  - "aws-service-role*"
# Don't evaluate these roles, users, or groups as part of the evaluation
roles:
  - "service-role*"
  - "aws-service-role*"
users:
  - ""
groups:
  - ""
# Read-only actions to include in the results, such as s3:GetObject
# By default, it includes Actions that could lead to Data Exfiltration
include-actions:
  - "s3:GetObject"
  - "ssm:GetParameter"
  - "ssm:GetParameters"
  - "ssm:GetParametersByPath"
  - "secretsmanager:GetSecretValue"
# Write actions to include from the results, such as kms:Decrypt
exclude-actions:
  - ""
  • Make any additions or modifications that you want.
    • Under policies, list the path of policy names that you want to exclude.
    • If you want to exclude a role titled MyRole, list MyRole or MyR* in the roles list.
    • You can follow the same approach for users and groups list.

Now when you run the scan command, you can use the exclusions file like this:

cloudsplaining scan --exclusions-file exclusions.yml --input-file examples/files/example.json --output examples/files/

Scanning Multiple AWS Accounts

If your IAM user or IAM role has sts:AssumeRole permissions to a common IAM role across multiple AWS accounts, you can use the scan-multi-account command.

This diagram depicts how the process works:

Diagram for scanning multiple AWS accounts with Cloudsplaining

Note: If you are new to setting up cross-account access, check out the official AWS Tutorial on Delegating access across AWS accounts using IAM roles. That can help you set up the architecture above.

  • First, you'll need to create the multi-account config file. Run the following command:
cloudsplaining create-multi-account-config-file \ 
    -o multi-account-config.yml
  • This will generate a file called multi-account-config.yml with the following contents:
accounts:
  default_account: 123456789012
  prod: 123456789013
  test: 123456789014

Note: Observe how the format of the file above includes account_name: accountID. Edit the file contents to match your desired account name and account ID. Include as many account IDs as you like.

For the next step, let's say that:

  • We have a role in the target accounts that is called CommonSecurityRole.
  • The credentials for your IAM user are under the AWS Credentials profile called scanning-user.
  • That user has sts:AssumeRole permissions to assume the CommonSecurityRole in all your target accounts specified in the YAML file we created previously.
  • You want to save the output to an S3 bucket called my-results-bucket

Using the data above, you can run the following command:

cloudsplaining scan-multi-account \
    -c multi-account-config.yml \
    --profile scanning-user \
    --role-name CommonSecurityRole \ 
    --output-bucket my-results-bucket

Note that if you run the above without the --profile flag, it will execute in the standard AWS Credentials order of precedence (i.e., Environment variables, credentials profiles, ECS container credentials, then finally EC2 Instance Profile credentials).

Cheatsheet

# Download authorization details
cloudsplaining download
# Download from a specific AWS profile
cloudsplaining download --profile someprofile

# Scan Authorization details
cloudsplaining scan --input-file default.json
# Scan Authorization details with custom exclusions
cloudsplaining scan --input-file default.json --exclusions-file exclusions.yml

# Scan Policy Files
cloudsplaining scan-policy-file --input-file examples/policies/wildcards.json
cloudsplaining scan-policy-file --input-file examples/policies/wildcards.json  --exclusions-file examples/example-exclusions.yml

# Scan Multiple Accounts
# Generate the multi account config file
cloudsplaining create-multi-account-config-file -o accounts.yml
cloudsplaining scan-multi-account -c accounts.yml -r TargetRole --output-directory ./

FAQ

Will it scan all policies by default?

No, it will only scan policies that are attached to IAM principals.

Will the download command download all policy versions?

Not by default. If you want to do this, specify the --include-non-default-policy-versions flag. Note that the scan tool does not currently operate on non-default versions.

I followed the installation instructions but can't execute the program via command line at all. What do I do?

This is likely an issue with your PATH. Your PATH environment variable is not considering the binary packages installed by pip3. On a Mac, you can likely fix this by entering the command below, depending on the versions you have installed. YMMV.

export PATH=$HOME/Library/Python/3.7/bin/:$PATH

I followed the installation instructions, but I am receiving a ModuleNotFoundError that says No module named policy_sentry.analysis.expand. What should I do?

Try upgrading to the latest version of Cloudsplaining. This error was fixed in version 0.0.10.

References