Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Allow users to specify whether they want the violations attachment to be json or csv format. #1287

Closed
blueandgold opened this issue Mar 22, 2018 · 2 comments
Labels
module: notifier priority: p2 Important feature defect, moderate live issue
Milestone

Comments

@blueandgold
Copy link
Contributor

By default, CSV is preferred. But we should allow users to select json, if they prefer or there is a need to output hierarchical data structure. This configurable option should be part of the notification configuration schema.

@arbeit
Copy link
Contributor

arbeit commented Mar 22, 2018

How about adding an optional data_format field to the configuration stanza of notifiers? Example

    resources:
        - resource: policy_violations
          should_notify: true
          notifiers:
            # Upload violations to GCS.
            - name: gcs_violations
              configuration:
                # gcs_path should begin with "gs://"
                gcs_path: 'gs://fsv/scanner_violations'
                data_format: 'json'

If that optional data_format field is omitted, CSV will be assumed (i.e. it is the default data format).

@blueandgold
Copy link
Contributor Author

👍 The optional data_format looks good to me. It allows the user to choose csv for email, and then json for GCS.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
module: notifier priority: p2 Important feature defect, moderate live issue
Projects
None yet
Development

No branches or pull requests

3 participants