Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json: error calling MarshalJSON for type model.Document: value is not known #6584

Closed
liorj-orca opened this issue Aug 1, 2023 · 0 comments · Fixed by #6635
Closed

json: error calling MarshalJSON for type model.Document: value is not known #6584

liorj-orca opened this issue Aug 1, 2023 · 0 comments · Fixed by #6635
Labels
bug Something isn't working community Community contribution

Comments

@liorj-orca
Copy link
Contributor

Found a bug? You're welcome to GitHub Discussions

  • Please make sure to:
    • Describe in details what the problem is
    • Attach a log file with relevant data preferably in DEBUG level (--log-level=DEBUG)
    • Attach the scanned sample files, anonymize the data if the original file cannot be provided
    • When attaching files to the issue make sure they are properly formatted

when running a scan on the following TF file:

data "aws_iam_policy_document" "blabla" {
  statement {
    actions = [
      "secretsmanager:GetSecretValue",
    ]
    resources = [
      for s in [
        "DATABASE_READONLY_PASSWORD",
        "DATABASE_DATA_PASSWORD",
      ] : "arn:aws:secretsmanager:eu-west-1:${data.aws_caller_identity.this.account_id}:secret:/${var.env}/*/${s}-*"
    ]
  }
}

we are getting the following error:

Scanning with Keeping Infrastructure as Code Secure v1.7.4


1:45PM INF Scanning with Keeping Infrastructure as Code Secure v1.7.4
1:45PM INF Operating system: linux
1:45PM INF Total memory: 5.8G
1:45PM INF CPU: 5.0
1:45PM INF Total files in the project: 1
1:45PM INF Loading queries of type: terraform
1:45PM INF Inspector initialized, number of queries=1046
1:45PM INF Query execution timeout=1m0s
Preparing Scan Assets: Done
1:45PM ERR failed to marshal content in file: /path/bla.tf error="json: error calling MarshalJSON for type model.Document: value is not known"
Error: failed to read sources: failed to save file content: json: error calling MarshalJSON for type model.Document: value is not known
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community Community contribution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant