bitbucket-repo-analyzer
v1.0.7
Published
A light and fast CLI tool to scan all Bitbucket repositories in your workspace to speed up monthly audits and maintenance activities.
Readme
Bitbucket Repo Analyzer
A light and fast CLI tool to scan all Bitbucket repositories in your workspace to speed up monthly audits and maintenance activities.
Features
CLI
- Scan all repos in a BitBucket workspace
- Detect:
- Outdated npm packages
- Outdated React and React Native versions
- Outdated Node.js versions
- Vulnerabilities
- Keywords
- Works with monorepos + nested
package.jsonvia--deepflag - Supports repo filtering via
--reposor--reposFile - Concurrency, progress bar, limiting to latest commit to ensure faster scans
- Output results to JSON for reporting
API
- run pre-maintenance analysis (jobs queue)
- get jobs queue status
- get job status
Set Environmental Variables
Set env vars in the terminal:
export BITBUCKET_USERNAME=your-username
export BITBUCKET_APP_PASSWORD=your-passwordIt's also possible to prefix the command with env vars:
BITBUCKET_USERNAME=username BITBUCKET_APP_PASSWORD=password npx bitbucket-repo-analyzer count --org=org-nameInstallation
Install globally:
npm install -g bitbucket-repo-analyzerUse without installation
You can execute it directly without installing.
npx bitbucket-repo-analyzer count --org=org-nameUsage
Check AWS SDK version across all repos:
bitbucket-repo-analyzer check aws-sdk --org=my-orgCheck React version across all repos:
bitbucket-repo-analyzer check react-version --org=my-orgScan specific repos:
Specify repos in a command:
bitbucket-repo-analyzer check aws-sdk --org=my-org --repos=repo-one,repo-twoSpecify repos in a .txt file:
bitbucket-repo-analyzer check aws-sdk --org=my-org --reposFile=repos.txtEnable deep scan mode (look for package.json in nested folders)
bitbucket-repo-analyzer check aws-sdk --org=my-org --deepCheck React versions
bitbucket-repo-analyzer check react-version --org=my-orgCheck React Native versions
bitbucket-repo-analyzer check react-native-version --org=my-orgSearch keyword across repos
bitbucket-repo-analyzer keyword <keyword> --org=my-orgFor example
bitbucket-repo-analyzer keyword apilayer --org=my-orgCount how many repos you have in Bitbucket
bitbucket-repo-analyzer count --org=my-orgOutput
A .json file is saved to the output/ folder.
Roadmap
- Automatically create pull requests with npm upgrades
- Detect secrets: .env, .pem, hardcoded tokens
- GitHub / GitLab support
Author
Built by Marina Kim
GitHub: @marinakim44
Founder of CatBytes Community for Women in Tech
Co-organiser of AWS User Group UK and AWS AI In Practice
License
MIT — use it, fork it, make it yours.
