Troubleshooting LeftSize Scans and Issues
Common problems and how to solve them.
See what the scan did
Every run writes a job summary (open the workflow run and scroll down) with the number of findings per rule, which ones get issues on your plan, and the estimated savings.
For more detail, set LEFTSIZE_DEBUG on the scan step and run the workflow again:
- name: Run LeftSize Scan
id: leftsize
uses: leftsize/leftsize-action@v1
env:
LEFTSIZE_DEBUG: true
with:
# ...
This logs Cloud Custodian’s output, including which rules failed (for example because of a missing permission), and the LeftSize API’s response. It works on its own (action version 1.0.30 and later). verbose: true turns on debug logging for LeftSize but doesn’t show Custodian’s output or the API response.
Scan workflow fails
“No policies could run” / “Scan failed”
Symptom: the LeftSize step fails and the job summary says Scan failed.
No policy file could run, so there are no results. Since action version 1.0.29 this fails the step instead of reporting an empty, clean scan. The usual causes:
- Cloud credentials missing or expired. The login step (
azure/loginoraws-actions/configure-aws-credentials) must run before LeftSize in the same job. LeftSize checks AWS credentials withsts:GetCallerIdentitybefore it scans, and a Cloudflare token by listing zones (see Authentication error (Cloudflare)). - Every policy file timed out (30 minutes each). Scan fewer regions per job, or split them over a matrix.
The log of the step shows the error of each policy file.
“Incomplete scan” in the job summary
Some checks didn’t run while the rest of the scan did, usually because of a missing read permission or throttling. The summary and the failed-policies output list them. Findings of those checks are missing until they run again; existing issues stay open. Set LEFTSIZE_DEBUG (see See what the scan did) to see Custodian’s error for each one.
Authentication error (Azure)
Symptom: the Azure Login step fails with “AADSTS700016”, “AADSTS70021” or a “federated credential” error.
- Federated credential doesn’t match. The organization, repository and branch in the federated credential must match the workflow run exactly. Scheduled runs use the default branch.
- Wrong secret values.
AZURE_CLIENT_ID_MAINmust be the Application (client) ID, not the Object ID.AZURE_TENANT_IDis the Directory (tenant) ID. - App Registration deleted or disabled. Check that it still exists in Microsoft Entra ID.
Authentication error (AWS)
Symptom: the AWS Login step fails with “Not authorized to perform sts:AssumeRoleWithWebIdentity”.
- Trust policy doesn’t match. The
subcondition must match the run, for examplerepo:YOUR_ORG/YOUR_REPO:ref:refs/heads/mainfor the default branch. - OIDC provider missing. Check that the GitHub Actions OIDC provider exists in IAM > Identity providers.
- Wrong role ARN.
AWS_ROLE_ARN_MAINmust be the full ARN, for examplearn:aws:iam::123456789012:role/LeftSize-GitHub-Action. - Missing
id-token: write. Withoutpermissions: id-token: writein the workflow, the login step can’t get an OIDC token at all and fails with a different error, usually about a missingACTIONS_ID_TOKEN_REQUEST_URLor credentials not loading.
Authentication error (Cloudflare)
Symptom: the LeftSize step fails with one of these errors:
Cloudflare authentication failed: CLOUDFLARE_API_TOKEN is not set.Thecloudflare-api-tokeninput is empty. Check that theCLOUDFLARE_API_TOKENsecret exists in this repository (or organization) and that the workflow passes it:cloudflare-api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}.Cloudflare authentication failed: the API token can't list zones (it needs Zone Read) and isn't confirmed active. For an account-owned token, also set cloudflare-account-ids.The token is wrong, expired or rolled, or it lacks the Zone Read permission and Cloudflare couldn’t confirm it’s active. Check the token’s status and end date in the Cloudflare dashboard, and that the secret holds the token value. If you rolled the token, update the secret with the new value. An active token without Zone Read is accepted and scans only the account-level rules; for an account-owned token, that check needscloudflare-account-ids.
See Cloudflare Setup.
Cloudflare rules missing or finding nothing
A token without a permission stops only the rules that need it. They appear under “Incomplete scan” in the job summary and in failed-policies.
Some Cloudflare APIs return an empty list instead of an error when the token lacks the permission: Workers, Access applications, Access service tokens and tunnels. The rule then finds nothing and the step log shows a note such as No Workers listed for account <id>. If it has Workers, the API token is missing the Workers Scripts Read permission. or No <kind> found in account <id> (if there should be, check the API token's permissions). Add the missing permission from Token permissions.
leftsize-cloudflare-page-rules-deprecated, leftsize-cloudflare-domain-expiring and leftsize-cloudflare-domain-transfer-unlocked always fail with an account-owned token: Cloudflare doesn’t support Page Rules and Registrar on those tokens. Use a user API token to run them, or skip them with exclude-policies. See Page Rules and Registrar.
The scan step fails before scanning
The action checks its inputs first and stops with an error if one is wrong:
Invalid installation-id format:LEFTSIZE_INSTALLATION_IDmust be a number.Invalid repository-token format:LEFTSIZE_REPOSITORY_TOKENmust be the GUID from onboarding.Invalid AWS region(s):AWS_REGIONSmust be region names such aseu-west-1, orall.Unknown policy category:include-policiesacceptscost-optimization,deprecation,governanceandsecurity(alsocostanddeprecations).Invalid policy rule name(s):exclude-policiesmust be rule ids such asleftsize-idle-vmoridle-vm.Invalid cloud-provider: useazure,awsorcloudflare(any case).Invalid Cloudflare account ID(s): expected 32 hex characters:CLOUDFLARE_ACCOUNT_IDSmust be account IDs, comma-separated, not account names.Invalid Azure subscription ID(s):azure-subscription-idsmust be subscription GUIDs.Invalid backend-url: leavebackend-urlout; it only accepts https URLs on a LeftSize domain.Invalid mode:modeisscan(default) orstats.AWS authentication failed:sts:GetCallerIdentitydidn’t return an account. The AWS login step must run before LeftSize in the same job.
No findings after a successful scan
- Your infrastructure has nothing the rules flag.
- The scan looked at the wrong place. On AWS, only the regions in
AWS_REGIONSare scanned (the login region if it’s empty). On Azure, only the subscription the login step signs in to is scanned. On Cloudflare, only the accounts inCLOUDFLARE_ACCOUNT_IDSare scanned if it’s set, and only the zones the token includes. - Metrics haven’t built up yet. Usage rules look at the last 5 to 30 days of CloudWatch or Azure Monitor data, depending on the rule, and most cost rules skip recently created resources.
- Permissions are missing. Rules that can’t read what they need find nothing. Use
LEFTSIZE_DEBUGto see which rules failed.
Findings weren’t submitted
Symptom: the findings-submitted step output is false (the generated workflow logs it as “Results submitted: false”), or the job summary says the findings weren’t submitted.
- The scan found nothing. With zero findings there is nothing to send, so this is normal.
- The repository limit is reached. The job summary shows “Repository Limit Reached” and the workflow doesn’t fail. See Repository limit reached.
- The daily submission limit is reached. An installation can send 20 scan results per day (UTC), across all its repositories, matrix jobs and cloud jobs (a workflow with an AWS, Azure and Cloudflare job uses 3). Further runs that day stay green, and the job summary says “Findings not submitted” (action version 1.0.29 and later; earlier versions failed the step). The next day’s scan submits again. Run scans once a day, as the generated workflow does.
- The LeftSize API couldn’t be reached or returned a server error. The action tries three times. If all attempts fail, the scan step fails. Each attempt counts toward the daily limit.
- The API rejected the request. Then the scan step fails. Check that
LEFTSIZE_INSTALLATION_IDandLEFTSIZE_REPOSITORY_TOKENare set for this repository, and run the workflow again.
Issue-related problems
No issues created after a scan
- Free plan and a paid rule. On the Free plan, only cost optimization rules get issues. The job summary lists the other findings under “Team Findings”.
- Issues are turned off. Enable them under Settings > General > Features > Issues. Findings are stored in the meantime, and issues appear after the next scan.
- The issue was closed before. LeftSize doesn’t reopen a closed issue or open a new one for the same rule and scope (except after a snooze). Search the closed issues to find it; reopen it if you want LeftSize to track it again.
- Processing takes a moment. Issues appear a minute or two after the scan finishes.
An issue is still open after I fixed the resources
LeftSize doesn’t close issues itself. Close the issue when you’ve fixed the resources. If you fixed only some of them, the next scan updates the issue to list the rest.
A snoozed issue came back
That’s how snooze works. After the snooze period, the next scan that still finds the problem reopens the issue. To dismiss it for good, use @leftsize ignore.
Two issues for what looks like the same problem
Issues are grouped by rule and scope. The same rule in two Azure resource groups, two AWS regions, two AWS accounts or two Cloudflare accounts gives two issues.
Commands not responding
- Guidance commands (
explain,howto,scriptand so on) give specific answers only on issues LeftSize created; on other issues they give a general answer.snooze,ignoreandwrongclose any issue they’re posted on. - Only newly posted comments count. Editing a comment doesn’t run its command again.
- Only the first
@leftsizecommand in a comment runs. - Allow a few seconds for the reply.
- Check the syntax in Commands.
Jira
See Jira for how the integration works.
Repositories get no new issues after the Jira app was uninstalled
Repositories that still send their issues to a Jira site that is disconnected or uninstalled get none, in Jira or on GitHub; LeftSize keeps their findings. Open leftsize.com/link/jira, sign in with GitHub and select Send issues to GitHub Issues. The open issues move to GitHub too.
The LeftSize page in Jira says the site isn’t linked
The site was never linked, linking wasn’t finished, or the app was uninstalled since (uninstalling unlinks the site). Open Jira Settings → Apps → LeftSize, select Link this site to LeftSize and finish the steps on leftsize.com. Your earlier destination choices come back when you link the site to the same installation again.
Linking fails on leftsize.com
- “This link code has expired or was already used.” A link works once, for 15 minutes. Open the LeftSize page in Jira, select Get a new link and try again.
- “This link is incomplete.” Open the link from Jira again instead of copying it by hand.
- “LeftSize is not installed on this Jira site (anymore).” Install the app, open its page in Jira and try again.
- “Jira did not answer for this site.” Wait a minute and try again from the page in Jira.
- “This Jira site is already linked to another LeftSize installation.” A site can be linked to one installation. Sign in for the other installation at leftsize.com/link/jira, disconnect the site there, then link it again.
Saving a Jira project fails
- “LeftSize can’t create issues in Jira project …” The project doesn’t exist, or the LeftSize app can’t create issues in it. Check the project’s permissions for the app.
- “Jira is not reachable for this site right now.” Try again in a few minutes.
Issues still open on GitHub after switching to Jira
- Existing issues stay where they are unless you move them. Open the LeftSize settings from Jira and move the open issues. Closed, snoozed and ignored issues always stay. See Moving open issues.
- Moves take time. The first issues move right away, the rest at up to 25 per hour.
- The repository has its own destination that still says GitHub Issues. Check Choose per repository in the settings.
- The destination wasn’t saved. Until you save a Jira project, new issues go to GitHub Issues.
No new issues in Jira
- New issues start with the next scan after you save a destination.
- The issue was closed before. As on GitHub, LeftSize doesn’t open a new issue for a rule and scope whose issue a person closed, in either tracker.
- The Jira app was uninstalled. Repositories that point at an uninstalled site get no issues at all, in Jira or on GitHub. Install the app again and link the site, or choose GitHub Issues as the destination. See Changing or removing the integration.
- Jira was briefly unreachable. LeftSize retries on its own, so the issue can appear up to an hour later.
The LeftSize panel isn’t shown on an issue
The panel only appears on issues LeftSize created. If it says LeftSize doesn’t track this issue., the issue isn’t a LeftSize issue, or the site isn’t linked anymore. On a new issue the panel can be missing until the next scan.
/leftsize commands get no reply in Jira
- Start the command with
/leftsize(orleftsize:). An@leftsizethat Jira turned into a mention of a person isn’t read. - Only the first command in a comment runs, and editing a comment doesn’t run it again.
- Allow a few seconds for the reply.
- Commands only work on issues LeftSize created, on a linked site.
LeftSize can’t close or reopen a Jira issue
LeftSize uses your project’s workflow: closing needs a transition to a status in the Done category, and reopening one to a To Do or In Progress status. If the workflow doesn’t offer one from the current status, the panel shows Jira didn’t let LeftSize close this issue. The snooze or ignore is recorded anyway; close the issue yourself. Add the missing transitions to the workflow if you want LeftSize to close and reopen issues on its own.
Closing a Jira issue didn’t record savings
Only a close as completed records savings. A resolution such as Won’t Do or Duplicate counts as not planned. If a later scan still finds a resource, its savings are taken back.
My edits to a LeftSize issue’s description disappeared
Each scan replaces the summary and description when the findings change. Put notes in comments, or in other fields.
Plan and billing
Repository limit reached
The Free plan covers 3 repositories and Team covers 10. The limit counts the repositories in your GitHub account for which LeftSize has stored findings; a repository whose scans have found nothing yet doesn’t count. When an extra repository runs a scan, the job summary shows “Repository Limit Reached” and its findings aren’t stored. Repositories that were already scanned keep working.
To scan more repositories, move to a plan with a higher limit. See Plans and Pricing.
Getting help
If your problem isn’t covered here:
- Check the FAQ
- Use the Need help? form on this site, or email support@leftsize.com
- Open an issue in LeftSize/leftsize-action for bugs in the action
Was this article helpful?