Skip to content

bug: json output does not filter by service #328

@bcdady

Description

@bcdady

Describe the bug
When using the --format json flag with the --service flag, the output includes misconfigurations from other services.

To Reproduce
Steps to reproduce the behavior:

  1. run trivy aws --service iam --format json
    a. suggest filtering the output with jq
    b. example:
trivy aws --service iam --format json | jq -r '.Results[]? | .Target'
  1. Observe services other than IAM

Expected behavior

  1. JSON output would include only the specified AWS service(s)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions