Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.
/ gcp_sa_lister Public archive

Crawls your GCP Org and returns service accounts that have not been used in the past 90 days.

License

Notifications You must be signed in to change notification settings

ScaleSec/gcp_sa_lister

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GCP Unused Service Account Lister

Crawls your GCP Organization and returns service accounts that have not been used in the past 90 days based on GCP Recommender Service Account Insight findings.

Requirements

  • python 3.x
  • GCP Recommender API (enabled in your project)
    • To enable: gcloud services enable recommender.googleapis.com

Installation

# Clone the repo locally
git clone git@github.com:ScaleSec/gcp_sa_lister.git

# Configure virtual environment
python3 -m venv ./venv/
source ./venv/bin/activate

# Install packages
pip3 install -r requirements.txt

Execution

python3 saUnused.py

Results

The results will be in JSON format and include the service account email and project number.

Disclaimer

You need to have the Recommender service (API) enabled across your projects with insights preexisting. For directions on enabling the API visit the documentation.

About

Crawls your GCP Org and returns service accounts that have not been used in the past 90 days.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages