Skip to content

Instantly share code, notes, and snippets.

View rjouhann's full-sized avatar
🇫🇷

Romain Jouhannet rjouhann

🇫🇷
  • GitGuardian
  • Paris, France
  • 15:05 (UTC +02:00)
  • LinkedIn in/romainj
View GitHub Profile
@rjouhann
rjouhann / list-sources-with-no-teams.py
Last active September 24, 2025 13:17
List sources with no teams
import os
import requests
from collections import defaultdict
# API key must belong to a user with a "Manager" role and read permissions for teams and sources
API_KEY = os.getenv("GITGUARDIAN_API_TOKEN")
BASE_URL = "https://api.gitguardian.com/v1"
# HTTP headers used for API requests
HEADERS = {"Authorization": f"Token {API_KEY}"}