jenglish / ssptool

nodejs / express application for working with OpenControl data
MIT License
3 stars 5 forks source link

Could ssptool support text formatting? #3

Closed shawndwells closed 6 years ago

shawndwells commented 6 years ago

In opencontrol content, I have the following code:

- control_key: AC-2 (4)
  standard_key: NIST-800-53
  covered_by: []
  implementation_status: Implemented
  narrative:
    - text: |
        '//*
        The customer will be responsible for automatically auditing account
        management actions. A successful control response will need to address
        all automated mechanisms involved in monitoring account management,
        the personnel or roles that must be notified of account management
        activities, and the means by which notifications occur.>

        <Red Hat OpenStack Platform 13 will log events to standardized files, however automatic
        notification (outside of generating  audit data) is not possible. As an
        Red Hat OpenStack Platform 13 Container Platform cluster administrator, you can deploy the
        EFK stack to aggregate logs for a range of Red Hat OpenStack Platform 13 Container Platform
        services and setup alerting.

        Application developers can view the logs of the projects for which they
        have view access. The EFK stack aggregates logs from hosts and
        applications, whether coming from multiple containers or even deleted
        pods.

        For documentation on how to setup Elasticsearch, Fluentd, and Kibana,
        refer to the Aggregate Logging" section of the Red Hat OpenStack Platform 13 Installation
        and Configuration Guide:

        https://docs.openshift.com/container-platform/3.3/install_config/aggregate_logging.html
        */'

When ssptool renders it, the formatting is lost: image

Could ssptool be updated to keep text formatting? I have no idea how much work this would actually be, but do believe it'd be a great usability enhancement.

Keep up the great work! I use ssptool several times per week to demo the Red Hat content.

jenglish commented 6 years ago

One option would be to interpret narrative text as Markdown. It looks like that's what compliance-masonry docs gitbook does; I'll update ssptool to do the same. (That was actually on my list, I just haven't needed it yet...)

shawndwells commented 6 years ago

Thank you, @jenglish! Text now has the formatting:

image

shawndwells commented 6 years ago

Hey @jenglish - Looks like later patches removed the text formatting. Back to single line now.... perhaps because of

commit 088db5db5203c97fbbed0663afad7843b4eff501
Author: Joe English <jenglish@flightlab.com>
Date:   Wed Nov 22 12:27:35 2017 -0800

    OOPS: last change broke single-page document generation and QA
    checks did not catch it. Fixed both.
jenglish commented 6 years ago

Can't replicate - it still works for me (spot-checked the freedonia-compliance repo, Details section of all components has paragraph breaks as expected).