Skip to content

Terraform Terrascan Linter generates results for wrong file location #5460

@mrchandana

Description

@mrchandana

The Terraform Terrascan linter is generating results with an incorrect file path. Specifically, it prepends github/workspace to the file name (e.g., file:///github/workspace/modules/ec2/ec2.tf:15) as shown in image. This path does not match the actual repository structure and causes the Code Scanning tab to fail in locating the referenced file.

Impact:

As a result, the Code Scanning UI cannot link the reported issues to the corresponding lines in the source code. This makes it difficult for developers to trace and resolve the identified vulnerabilities or misconfigurations efficiently.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions