Skip to content

Cannot read properties of undefined (reading 'length') - when include-imports: false [BUG] #7

@mtracz

Description

@mtracz

Hi, we encountered some issue with include-imports param.

We have project with secrets in dir /deployment.
In this project there are any imported secrets.
ACL config in Infisical is correct.

When we set include-imports: false we got error in Github Actions log:

Error: Error:
Error: Cannot read properties of undefined (reading 'length')

If include-imports: true it's working fine.

Action config:

- name: fetch project deployment secrets
        uses: Infisical/secrets-action@v1.0.7
        with:
          domain: https://self-hosted.example.com
          client-id: <secret>
          client-secret: <secret>
          project-slug: example
          env-slug: staging
          secret-path: /deployment
          export-type: env
          recursive: false
          include-imports: false

I think the issue might be here, because maybe there is no imports in the response when include_imports param is set to false.:

  • // process imported secrets
    const imports = response.data.imports;
    for (let x = imports.length - 1; x >= 0; x--) {

Based on API reference: https://infisical.com/docs/api-reference/endpoints/secrets/list
imports are set as not required in the response.

Action version: v1.0.7
Infisical self-hosted version: v0.104.4-postgres

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions