Skip to content

Instantly share code, notes, and snippets.

@VinayakTiwari1103
Created March 26, 2025 18:26
Show Gist options
  • Save VinayakTiwari1103/20f653e09cf3dde5d1a56c4f07a9ef1c to your computer and use it in GitHub Desktop.
Save VinayakTiwari1103/20f653e09cf3dde5d1a56c4f07a9ef1c to your computer and use it in GitHub Desktop.
import requests
class OSSFuzzAPI:
"""A class to interact with OSS-Fuzz's API for retrieving project information."""
BASE_URL = "https://oss-fuzz.com/api/v1/projects"
@staticmethod
def get_all_projects():
"""
Fetches a list of all projects currently fuzzed by OSS-Fuzz.
Returns:
list: A JSON-formatted list of all OSS-Fuzz projects.
"""
response = requests.get(OSSFuzzAPI.BASE_URL)
if response.status_code == 200:
return response.json()
else:
return {"error": f"Failed to fetch projects. Status: {response.status_code}"}
# Usage Example
projects = OSSFuzzAPI.get_all_projects()
print(projects)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment