Skip to content

Terrascan does not scan #2941

@girlpunk

Description

@girlpunk

Describe the bug
Instead of scanning files, Terrascan prints it's command line help

To Reproduce
Steps to reproduce the behavior:

  1. Include TERRAFORM_TERRASCAN in ENABLE_LINTERS
  2. Run a scan

Expected behavior
Terrascan should scan files and report errors

Screenshots

- Using [terrascan v1.18.2] https://megalinter.io/7.3.0/descriptors/terraform_terrascan
- MegaLinter key: [TERRAFORM_TERRASCAN]
- Rules config: identified by [terrascan]
[Pre][TERRAFORM_TERRASCAN] run: [terrascan] in cwd [/]
[Pre][TERRAFORM_TERRASCAN] result:
Terrascan

Detect compliance and security violations across Infrastructure as Code to mitigate risk before provisioning cloud native infrastructure.
For more information, please visit https://runterrascan.io/

Usage:
an [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  init        Initializes Terrascan and clones policies from the Terrascan GitHub repository.
  scan        Detect compliance and security violations across Infrastructure as Code.
  server      Run Terrascan as an API server
  version     Terrascan version

Flags:
  -c, --config-path string      config file path
  -h, --help                    help for terrascan
  -l, --log-level string        log level (debug, info, warn, error, panic, fatal) (default "info")
      --log-output-dir string   directory path to write the log and output files
  -x, --log-type string         log output type (console, json) (default "console")
  -o, --output string           output type (human, json, yaml, xml, junit-xml, sarif, github-sarif) (default "human")
      --temp-dir string         temporary directory path to download remote repository,module and templates

ascan [command] --help" for more information about a command.

--Error detail:


Additional context
Manually adding the scan command via TERRAFORM_TERRASCAN_ARGUMENTS does not resolve the issue, however it appears the command is not added.

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