Reports: Findings and Savings Statistics

The LeftSize Action has a stats mode that reports on a repository’s findings: how many there are, how many LeftSize issues are open, and the estimated monthly savings. It doesn’t scan your cloud. It reads from the LeftSize API with the same LEFTSIZE_INSTALLATION_ID and LEFTSIZE_REPOSITORY_TOKEN secrets as the scan.

Every scan also writes its own summary to the run’s job summary; see Scan summaries.

Quick start

Add a separate workflow that you can run on demand:

name: LeftSize Stats Report

on:
  workflow_dispatch:

permissions:
  contents: read

jobs:
  report:
    runs-on: ubuntu-latest
    steps:
      - name: Generate Report
        id: stats
        uses: leftsize/leftsize-action@v1
        with:
          mode: stats
          installation-id: ${{ secrets.LEFTSIZE_INSTALLATION_ID }}
          repository-token: ${{ secrets.LEFTSIZE_REPOSITORY_TOKEN }}

The report appears in the run’s job summary and in the report output.

Inputs

Input Values Default Description
mode scan, stats scan Set to stats for reports
period 7d, 30d, 90d, all 30d Count only findings that a scan reported in this period
report summary, detailed, executive summary Markdown layout (see Report types)
format markdown, json markdown json puts the raw numbers in the report output instead

The period works on when a scan last reported a finding. With 7d, a resource that disappeared two weeks ago no longer counts, so short periods show what’s still there now.

Report types

Summary

A table with the number of findings, open LeftSize issues and estimated monthly savings for the repository, plus the time of the last scan. The last scan time is for the whole installation (the latest scan of any repository), not only this repository.

Detailed

The summary plus the findings broken down by status and by cloud.

Executive

Two lines for status updates and stand-ups, for example:

4 open LeftSize issues, $1,234.50/month in estimated savings (10 findings, last 30 days).

Action outputs

Output Description Example
report The report (markdown, or JSON with format: json) n/a
stats-json Raw statistics as JSON (example after this table) n/a
potential-savings Estimated monthly savings of the open findings 1234.5
currency Currency of the savings USD
currency-symbol Currency symbol for display $
fix-ratio Percentage of findings no longer open 12.5
realized-savings Monthly savings of the findings you fixed (see Realized savings) 18.4

Use them in later steps as ${{ steps.<step-id>.outputs.<output-name> }}.

Realized savings

When a person closes a LeftSize issue as completed, LeftSize counts the issue’s resources as fixed: their estimated monthly savings move from potential-savings to realized-savings, and they count towards fix-ratio.

  • Only a person’s “completed” close counts. Closing as “not planned”, and LeftSize’s own closes (@leftsize snooze, ignore, wrong), record no savings. See Closing an issue.
  • A resource that’s still there doesn’t count. If a later scan still finds a resource from the closed issue, its savings are taken back. The issue stays closed.
  • Reopening takes the savings back. Close the issue as completed again once the resources are gone.
  • Resources without a price estimate count as fixed but add nothing to realized-savings.
  • Scope: realized-savings covers the whole installation (every repository) and all time, whatever period you set. potential-savings covers this repository and period.

Savings are recorded from 1 November 2026, so most issues closed before then have none.

The stats-json output looks like this:

{
  "TotalFindings": 10,
  "FindingsByStatus": [{ "Status": "open", "Count": 10 }],
  "FindingsByProvider": [{ "Provider": "aws", "Count": 10 }],
  "EstimatedSavings": [{ "Currency": "USD", "TotalAmount": 1234.5 }],
  "RealizedSavings": [{ "Currency": "USD", "TotalAmount": 18.4 }],
  "LastScanAt": "2026-10-26T07:00:00.000Z",
  "OpenIssues": 4,
  "Period": "30d"
}

Examples

Scheduled weekly report

name: Weekly LeftSize Report

on:
  schedule:
    - cron: '0 8 * * 1'

permissions:
  contents: read

jobs:
  weekly-report:
    runs-on: ubuntu-latest
    steps:
      - name: Generate Report
        id: stats
        uses: leftsize/leftsize-action@v1
        with:
          mode: stats
          installation-id: ${{ secrets.LEFTSIZE_INSTALLATION_ID }}
          repository-token: ${{ secrets.LEFTSIZE_REPOSITORY_TOKEN }}
          period: 7d
          report: detailed

Warn when potential savings pass a threshold

- name: Fetch Stats
  id: stats
  uses: leftsize/leftsize-action@v1
  with:
    mode: stats
    installation-id: ${{ secrets.LEFTSIZE_INSTALLATION_ID }}
    repository-token: ${{ secrets.LEFTSIZE_REPOSITORY_TOKEN }}
    format: json

- name: Check savings threshold
  run: |
    SAVINGS="${{ steps.stats.outputs.potential-savings }}"
    echo "Potential savings: ${{ steps.stats.outputs.currency-symbol }}${SAVINGS}/mo"
    if (( $(echo "$SAVINGS > 1000" | bc -l) )); then
      echo "::warning::Potential savings exceed threshold"
    fi

Executive report for stakeholders

- name: Executive Report
  uses: leftsize/leftsize-action@v1
  with:
    mode: stats
    installation-id: ${{ secrets.LEFTSIZE_INSTALLATION_ID }}
    repository-token: ${{ secrets.LEFTSIZE_REPOSITORY_TOKEN }}
    period: 90d
    report: executive

Scan summaries

Every scan run writes a summary to the GitHub Actions job summary, with:

  • Findings per rule and their estimated savings
  • Your plan, and on the Free plan how many of the 3 repositories are in use
  • On the Free plan, which findings get issues (cost rules) and which need Team (“Team Findings”)
  • A “Repository Limit Reached” warning when the repository is over the plan’s limit

Was this article helpful?

© 2026 LeftSize. Cloud cost optimization for GitHub teams.