{"id":19491208,"url":"https://github.com/cloudyspells/psco2signal","last_synced_at":"2026-04-13T11:01:26.227Z","repository":{"id":148806469,"uuid":"618780962","full_name":"cloudyspells/PSCO2Signal","owner":"cloudyspells","description":"Lightweight PowerShell client for CO2Signal","archived":false,"fork":false,"pushed_at":"2023-09-11T06:06:42.000Z","size":71,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-11T17:52:02.862Z","etag":null,"topics":["azure","carbon","carbon-emissions","carbon-footprint","cd","co2","co2-emissions","co2-footprint","deployment","github-actions","green-software","powershell","powershell-module","sustainability","sustainable-software"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","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/cloudyspells.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null}},"created_at":"2023-03-25T10:33:27.000Z","updated_at":"2025-07-10T22:36:23.000Z","dependencies_parsed_at":"2023-05-29T01:00:15.131Z","dependency_job_id":null,"html_url":"https://github.com/cloudyspells/PSCO2Signal","commit_stats":{"total_commits":28,"total_committers":2,"mean_commits":14.0,"dds":0.0357142857142857,"last_synced_commit":"c12ae73a707ab1751aba7ba1e85fef1bdf13f8e2"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/cloudyspells/PSCO2Signal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudyspells%2FPSCO2Signal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudyspells%2FPSCO2Signal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudyspells%2FPSCO2Signal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudyspells%2FPSCO2Signal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudyspells","download_url":"https://codeload.github.com/cloudyspells/PSCO2Signal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudyspells%2FPSCO2Signal/sbom","scorecard":{"id":293390,"data":{"date":"2025-08-11","repo":{"name":"github.com/cloudyspells/PSCO2Signal","commit":"c12ae73a707ab1751aba7ba1e85fef1bdf13f8e2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Security-Policy","score":4,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Warn: no linked content found","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-on-release.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudyspells/PSCO2Signal/publish-on-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/qa.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudyspells/PSCO2Signal/qa.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/qa.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudyspells/PSCO2Signal/qa.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/qa.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudyspells/PSCO2Signal/qa.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/qa.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudyspells/PSCO2Signal/qa.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/qa.yml:90: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudyspells/PSCO2Signal/qa.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/qa.yml:113: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudyspells/PSCO2Signal/qa.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/wiki.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudyspells/PSCO2Signal/wiki.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/wiki.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudyspells/PSCO2Signal/wiki.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/wiki.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudyspells/PSCO2Signal/wiki.yml/main?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/publish-on-release.yml:1","Warn: topLevel 'checks' permission set to 'write': .github/workflows/qa.yml:11","Warn: topLevel 'security-events' permission set to 'write': .github/workflows/qa.yml:13","Warn: topLevel 'contents' permission set to 'write': .github/workflows/wiki.yml:12","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T18:53:08.026Z","repository_id":148806469,"created_at":"2025-08-17T18:53:08.026Z","updated_at":"2025-08-17T18:53:08.026Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31749763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["azure","carbon","carbon-emissions","carbon-footprint","cd","co2","co2-emissions","co2-footprint","deployment","github-actions","green-software","powershell","powershell-module","sustainability","sustainable-software"],"created_at":"2024-11-10T21:16:08.654Z","updated_at":"2026-04-13T11:01:26.210Z","avatar_url":"https://github.com/cloudyspells.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PSCO2Signal\n\n## PowerShell Module for CO2Signal emission data\n\n[![PowerShell Module Quality Assurance](https://github.com/cloudyspells/PSCO2Signal/actions/workflows/qa.yml/badge.svg)](https://github.com/cloudyspells/PSCO2Signal/actions/workflows/qa.yml)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/cloudyspells/PSCO2Signal)\n![PowerShell Gallery Version](https://img.shields.io/powershellgallery/v/PSCO2Signal)\n![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/PSCO2Signal)\n\n\nThis PowerShell module is intended for retrieving emissions data from\n[CO2 Signal](https://www.co2signal.com/) for a supplied Azure Region during\nresource deployments. This is a lightweight solution making use of non-commercial functionality available with a free account at _CO2signal_. This means\nthe module is only able to get near-realtime emissions data and no prodictive\nvalues. This means this module is _not_ a real solution for reduced carbon\ndeployments and -software. It _does_ however provide some nice realtime values\nso you can simulate the beheaviour of deployments and software based on \nemissions data without the cost of a paid account for such data. For example in\nlab- or proof of concept environments.\n\nThe intended use of this module is for setting the `Location` parameter\non Azure IaC deployments in GitHub workflows using the included GitHub\naction.\n\nFor a real-world solution with a commercial data provider, check out\nthe [carbon-aware-sdk](https://github.com/Green-Software-Foundation/carbon-aware-sdk)\nby the [Green Software Foundation](https://greensoftware.foundation/)\n\n### Usage\n\n#### PowerShell Module\n\nTo get started with this module you will need an account on\n[CO2signal](https://www.co2signal.com/). See the website for details on\nregistering and the conditions that apply.\n\nYou will also need the _Az.Resources_ PowerShell Module for Azure installed\nand connected to your Azure account. See\n[the installation manual](https://learn.microsoft.com/en-us/powershell/azure/install-az-ps)\nfor the _Az_ module for instructions.\n\nTo install the module from the [PowerShell Gallery](https://www.powershellgallery.com/packages/PSCO2Signal/).\n\n```powershell\nInstall-Module -Name PSCO2Signal\n```\n\nGet current percentage of energy with emissions the 'westeurope' Azure region:\n\n```powershell\nPS C:\\\u003e Get-CO2SignalForAzureRegion -Region westeurope -AuthToken $token\n\nRegion               : westeurope\nFossilFuelPercentage : 29.37\nCountryCode          : NL\nCarbonIntensity      : 231\nCarbonIntensityUnit  : gCO2eq/kWh\nTimestamp            : 3/26/2023 8:00:00 AM\n\n```\n\nDetermine the lowest emissions for the list of northeurope,\nwesteurope, francecentral and uksouth Azure regions:\n\n```powershell\nPS C:\\\u003e Get-CO2SignalBestAzureRegion -Regions westeurope,uksouth,northeurope,francecentral -AuthToken $token\n\nRegion               : westeurope\nFossilFuelPercentage : 29.37\nCountryCode          : NL\nCarbonIntensity      : 231\nCarbonIntensityUnit  : gCO2eq/kWh\nTimestamp            : 3/26/2023 8:00:00 AM\n\n```\n\n##### Module Functions\n\n- [Get-CO2SignalForAzureRegion](docs/Get-CO2SignalForAzureRegion.md)\n- [Get-CO2SignalBestAzureRegion](docs/Get-CO2SignalBestAzureRegion.md)\n\n#### GitHub Action\n\nThis PowerShell module also comes with a _GitHub Action_ you can use\nin your GitHub workflows. Again you will need a pre-existing account\nfor _CO2signal_ and an Azure CLI/PowerShell secret configured in your repo\n\n##### Example\n\n```yaml\n\non:\n  pull_request:\n    branches:\n      - 'main'\n      - 'releases/**'\n\nname: Deploy to region with lowest emissions\n\njobs:\n  deploy-to-test:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v3\n\n      - name: Get region with lowest emissions\n        uses: cloudyspells/PSCO2Signal@main\n        id: signal_action # Set step id for using output in deployment\n        with:\n          azure_credential: ${{ secrets.AZURE_CREDENTIALS }}\n          signal_token: ${{ secrets.SIGNALTOKEN }}\n          regions: '\"westeurope\",\"northeurope\",\"uksouth\",\"francecentral\",\"germanynorth\"'\n\n      - name: Login to Az PowerShell Module\n        uses: azure/login@v1\n        with:\n          creds: ${{ secrets.AZURE_CREDENTIALS }}\n          enable-AzPSSession: true\n\n      - uses: azure/arm-deploy@v1\n        name: Run Bicep deployment\n        with:\n          subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n          scope: subscription\n          region: ${{ steps.signal_action.outputs.region }} # The region output from PSCO2Signal\n          template: src/bicep/main.bicep\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudyspells%2Fpsco2signal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudyspells%2Fpsco2signal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudyspells%2Fpsco2signal/lists"}