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

docs gitbook: Component files does not exist #51

Closed
git-ingham opened this issue Oct 4, 2018 · 3 comments
Closed

docs gitbook: Component files does not exist #51

git-ingham opened this issue Oct 4, 2018 · 3 comments

Comments

@git-ingham
Copy link

git-ingham commented Oct 4, 2018

I am trying to produce a PDF version of SSP. I have an opencontrol.yaml that passes the schema test.
However:

$ compliance-masonry docs gitbook NIST-SP-800-171r1_all
An error occurred: Component files does not exist

That is an unhelpful error message. Which of the yaml files is missing the "files" component? Or am I misreading the error and there are missing "component files"? How can I track it to the problem that needs fixing? I would prefer to not be reading all the source code to track it down. I did use strace; the error shows up right after a child exited. Shortly before that, something tried to do an epoll_ctl that failed due to EPERM (Operation not permitted). The file it was trying to work with was /dev/null. Not sure how helpful this information is.

Is it even worth trying to use gitbook? I ran across this thread. If not, the documentation for compliance-masonry should be updated to not point to it (side note, the "Usage" section of compliance-masonry is weak).

Or, is there a better way to produce a PDF? I am also going to look at ssptool (maybe its reports will be my solution).

@shawndwells
Copy link
Member

This appears to be a legitimate bug. The docs gitbook subroutine appears to be looking for the old masonry output structure.

+cc @redhatrises

To duplicate, here's an opencontrol.yaml:

schema_version: "1.0.0"
name: Template Information System
metadata:
  description: Template Information System
  maintainers:
    - Shawn Wells <shawn@redhat.com>

components:
#    - ./../../ComplianceAsCode/redhat-openstack-platform-13
#    - ./../../ComplianceAsCode/redhat-openshift-v3
#    - ./../../ComplianceAsCode/redhat/ansible-tower

dependencies:
  standards:
    - url: https://github.com/opencontrol/standards
      revision: master
  certifications:
    - url: https://github.com/opencontrol/certifications
      revision: master
  systems:
#    - url: https://github.com/SecurityCentral/template-system-process-controls
#      revision: opencontrol
    - url: https://github.com/ComplianceAsCode/redhat
      contextdir: osp13
      revision: opencontrol
    - url: https://github.com/ComplianceAsCode/redhat
      contextdir: ocp3
      revision: opencontrol
    - url: https://github.com/ComplianceAsCode/redhat
      contextdir: idm
      revision: opencontrol
    - url: https://github.com/ComplianceAsCode/redhat
      contextdir: ansible-tower
      revision: opencontrol
    - url: https://github.com/ComplianceAsCode/redhat
      contextdir: rhvm
      revision: opencontrol
    - url: https://github.com/ComplianceAsCode/redhat
      contextdir: rhvh
      revision: opencontrol

Then run masonry get:
$ masonry get

Which will create:

	opencontrols/components/ansible-tower.yaml
	opencontrols/components/idm.yaml
	opencontrols/components/ocp3.yaml
	opencontrols/components/osp13.yaml
	opencontrols/components/rhvh.yaml
	opencontrols/components/rhvm.yaml

The docs gitbook needs to be updated NOT to use opencontrols/components//component.yaml

@shawndwells
Copy link
Member

@git-ingham as a work around, using the same opencontrol.yaml:

$ mkdir opencontrols/components/{ansible,idm,ocp3,osp13,rhvh,rhvm}

$ mv opencontrols/components/ansible-tower.yaml opencontrols/components/ansible/component.yaml

$ mv opencontrols/components/idm.yaml opencontrols/components/idm/component.yaml

etc

@shawndwells
Copy link
Member

Once content is renamed, you'll be able to generate the book:

$ masonry docs gitbook foo
An error occurred: Error: `opencontrols/certifications/foo.yaml` does not exist
Use one of the following:
dhs-4300a
fedramp-high
fedramp-low
fedramp-moderate
fisma-high-impact
fisma-low-impact
fisma-mod-impact
icd-503-high
icd-503-low
icd-503-moderate

$ masonry docs gitbook dhs-4300a

<< look in exports/ directory >>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants