vscode-github-actions icon indicating copy to clipboard operation
vscode-github-actions copied to clipboard

Permanent warnings (highlighting) for env vars set on GitHub environment level

Open JakubSzuber opened this issue 2 months ago • 2 comments

Describe the bug I always see a yellow (warning) highlighting for every environment variable that is not directly defined inside the workflow but is properly set on GitHub environment level:

Image
Image

I see those warnings even though this env var is properly set, workflow is working fine, and I'm logged in to VSCode to my GitHub account. I also logged into my GitHub account inside the interface of this extension.

The interface of this extension is able to see that this var exists, so the highlighting in this case seems to be a bug:

Image

To Reproduce Steps to reproduce the behavior:

  1. Reference in a workflow, an environment variable that is set on the GitHub env level
  2. Make sure that the vscode-github-actions extension is enabled
  3. Highlighting occurs

Expected behavior There is no highlighting because the workflow is able to successfully use this variable, so there is no reason to show a warning (I'm logged in to my GitHub account in VS Code, and I have all permissions to see this variable that causes highlighting).

Extension Version v0.28.0

Additional context

I have the following GHA workflow:

name: My Workfloe

on:
  workflow_dispatch:

jobs:
  test-linting-templating-and-installing:
    runs-on: ubuntu-24.04
    steps:
      - name: Configure AWS credentials from the AWS account
        uses: aws-actions/[email protected]
        with:
          role-to-assume: "arn:aws:iam::${{ secrets.aws_management_account_id }}:role/iam-${{ inputs.github_env_name }}-role_gh_oidc_eks-global"
          aws-region: ${{ vars.AWS_REGION }}
          role-session-name: GitHub-OIDC-K8s-GitOps

And aws-region: ${{ vars.AWS_REGION }} is always highlighted.

JakubSzuber avatar Oct 25 '25 18:10 JakubSzuber

I guess this is new? I just had to uninstall the extension and use another. Hope this gets fixed.

sboagy avatar Oct 26 '25 00:10 sboagy

No, this is nothing new. I've had this problem for at least a few months.

JakubSzuber avatar Oct 26 '25 10:10 JakubSzuber

Duplicates #222

davidruzicka avatar Dec 04 '25 15:12 davidruzicka