Skip to content

Bicep Parsing Error with params array #7475

@mphillipsbiltd

Description

@mphillipsbiltd

Describe the issue
Explain what you expected to happen when checkov crashed.

Checkov fails to parse bicep files with param definitions that are arrays.

Examples
param appServicePrincipals string[]

Exception Trace
Please share the trace for the exception and all relevant output by checkov.
To maximize the understanding, please run checkov with LOG_LEVEL set to debug
as follows:

LOG_LEVEL=DEBUG checkov ...

File "C:\Users...\site-packages\lark\lexer.py", line 698, in lex
raise UnexpectedToken(token, e.allowed, state=parser_state, token_history=[last_token], terminals_by_name=self.root_lexer.terminals_by_name)
lark.exceptions.UnexpectedToken: Unexpected token Token('LSQB', '[') at line 2, column 34.
Expected one of:
* TARGETSCOPE
* RESOURCE
* MODULE
* PARAM
* $END
* METADATA
* AT
* OUTPUT
* _CPP_COMMENT_NL
* EQUAL
* TYPE
* VAR
Previous tokens: [Token('STRING', 'string')]

Desktop (please complete the following information):

  • OS: Windows 11
  • Checkov Version 3.2.510

Additional context
n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions