{"id":47876260,"url":"https://github.com/green-code-initiative/green-codeql-queries","last_synced_at":"2026-04-04T01:15:48.352Z","repository":{"id":341854389,"uuid":"1152064265","full_name":"green-code-initiative/green-codeql-queries","owner":"green-code-initiative","description":"CodeQL Analysis for sustainability","archived":false,"fork":false,"pushed_at":"2026-03-31T17:03:49.000Z","size":125,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-31T19:09:25.341Z","etag":null,"topics":["carbon","codeql","energy","green-software","sustainability"],"latest_commit_sha":null,"homepage":"","language":"CodeQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/green-code-initiative.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-07T10:02:54.000Z","updated_at":"2026-03-18T09:56:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/green-code-initiative/green-codeql-queries","commit_stats":null,"previous_names":["green-code-initiative/green-codeql-queries"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/green-code-initiative/green-codeql-queries","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/green-code-initiative%2Fgreen-codeql-queries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/green-code-initiative%2Fgreen-codeql-queries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/green-code-initiative%2Fgreen-codeql-queries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/green-code-initiative%2Fgreen-codeql-queries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/green-code-initiative","download_url":"https://codeload.github.com/green-code-initiative/green-codeql-queries/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/green-code-initiative%2Fgreen-codeql-queries/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31383994,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T23:20:52.058Z","status":"ssl_error","status_checked_at":"2026-04-03T23:20:51.675Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["carbon","codeql","energy","green-software","sustainability"],"created_at":"2026-04-04T01:15:45.551Z","updated_at":"2026-04-04T01:15:48.345Z","avatar_url":"https://github.com/green-code-initiative.png","language":"CodeQL","readme":"# 🍃 Green CodeQL\nA first-of-its-kind repository of custom queries to scan your codebase and detect environmental sustainability problems, notably energy-related issues.\n\n## 🚀 How to use green queries on your GitHub\n\nTo run these custom green queries directly on your repository, copy this code into a GitHub Action (Java code analysis in the example below):\n```yaml\nname: \"Green CodeQL Analysis\"\nenv:\n  TARGET_LANGUAGE: \"java\"\non:\n  workflow_dispatch:\njobs:\n  analyze:\n    name: Analyze\n    runs-on: ubuntu-latest\n    permissions:\n      actions: read\n      contents: read\n      security-events: write\n    steps:\n    - name: Checkout repository\n      uses: actions/checkout@v4\n    - name: Initialize CodeQL\n      uses: github/codeql-action/init@v4\n      with:\n        languages: ${{ env.TARGET_LANGUAGE }}\n        build-mode: none\n        packs: green-code-initiative/${{ env.TARGET_LANGUAGE }}-queries\n    - name: Perform CodeQL Analysis\n      uses: github/codeql-action/analyze@v4\n      with:\n        category: \"Sustainability\"\n```\n\u003e [!NOTE]\n\u003e For lack of a better option, sustainability alerts are reported just as vulnerabilities in 🛡️ Security → Code scanning\n\n\n## 📦 Status of green queries packs\n\n[6 Green CodeQL packs](https://github.com/orgs/green-code-initiative/packages?repo_name=green-codeql-queries) are currently available:\n- Java/Kotlin :\n[![Java - Run Tests and Publish CodeQL Pack](https://github.com/green-code-initiative/green-codeql-queries/actions/workflows/PublishJavaPack.yml/badge.svg)](https://github.com/green-code-initiative/green-codeql-queries/actions/workflows/PublishJavaPack.yml)\n\n- Python:\n[![Python - Run Tests and Publish CodeQL Pack](https://github.com/green-code-initiative/green-codeql-queries/actions/workflows/PublishPythonPack.yml/badge.svg)](https://github.com/green-code-initiative/green-codeql-queries/actions/workflows/PublishPythonPack.yml)\n\n- C/C++ :\n[![C++ - Run Tests and Publish CodeQL Pack](https://github.com/green-code-initiative/green-codeql-queries/actions/workflows/PublishCppPack.yml/badge.svg)](https://github.com/green-code-initiative/green-codeql-queries/actions/workflows/PublishCppPack.yml)\n\n- Javascript/TypeScript :\n[![JS - Run Tests and Publish CodeQL Pack](https://github.com/green-code-initiative/green-codeql-queries/actions/workflows/PublishJavascriptPack.yml/badge.svg)](https://github.com/green-code-initiative/green-codeql-queries/actions/workflows/PublishJavascriptPack.yml)\n\n- Actions/YAML :\n[![Actions - Run Tests and Publish CodeQL Pack](https://github.com/green-code-initiative/green-codeql-queries/actions/workflows/PublishActionsPack.yml/badge.svg)](https://github.com/green-code-initiative/green-codeql-queries/actions/workflows/PublishActionsPack.yml)\n\n- C# :\n[![C# - Run Tests and Publish CodeQL Pack](https://github.com/green-code-initiative/green-codeql-queries/actions/workflows/PublishCSharpPack.yml/badge.svg)](https://github.com/green-code-initiative/green-codeql-queries/actions/workflows/PublishCSharpPack.yml)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreen-code-initiative%2Fgreen-codeql-queries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreen-code-initiative%2Fgreen-codeql-queries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreen-code-initiative%2Fgreen-codeql-queries/lists"}