Utility for Semgrep deployments that infers the languages used by each project (based on the most recent full scan) and ensures every language appears as a project tag.
- Python 3.10+ (tested on macOS 14)
requestslibrary (pip install requests)- Valid
SEMGREP_APP_TOKENwith permission to read deployments/projects and manage tags
cd /Users/Documents/GitHub/languageTagger
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip requestsRun the script with your token scoped to the single command:
SEMGREP_APP_TOKEN=<your-token> python3 language_tagger.pyThe script will:
- Discover the deployment associated with the token.
- Gather every project (with pagination).
- Fetch the latest scan metrics per project to infer languages.
- Add missing tags using the lowercase language name (e.g.,
java,yaml).
A log file (language_tagger.log) is written next to the script for auditing.
Usage of this project is governed by EULA.md, which states that Christopher Morris and GPT-5.1 Codex co-developed the software and assume no responsibility for misuse or resulting issues. Read the EULA before distributing or modifying the project.
- Adjust
loggingconfiguration in_configure_loggingif you need different verbosity. - Run
python3 -m pip install -r requirements.txtif you later add a requirements file. - Contributions should include updated docs and, when applicable, sample logs.