Creates Semgrep SCM configs for a list of Bitbucket project keys from a YAML file.
uv venv
source .venv/bin/activate
uv pip install -r requirements.txtYou can also set up your environment using pip instead of uv:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtbitbucket_project_keys.yaml:
bitbucket_project_keys:
- MYPROJECT
- OTHERPROJECTSet env vars, then run:
export SEMGREP_DEPLOYMENT_ID=12345
export SEMGREP_API_TOKEN=your_semgrep_api_token
export BITBUCKET_URL=https://bitbucket.example.com
export BITBUCKET_TOKEN=your_bitbucket_token
python bulk_add_bb_scm.py bitbucket_project_keys.yaml