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

References specific to a component's "satisfies" are not rendered #361

Closed
aegershman opened this issue Aug 29, 2020 · 0 comments
Closed

Comments

@aegershman
Copy link
Contributor

aegershman commented Aug 29, 2020

The opencontrol schema 3.1.0 appears to accept references in the context of one of a component's satisfies block for specific controls (https://github.com/opencontrol/schemas/blob/5b3090c911a34dfec1cf9b2b27421651bcea5aa9/kwalify/component/v3.1.0.yaml#L75)

However it looks like those references aren't rendered to the page in the context of a specific control as per this code here (

key := masonryutil.FileNameHandler(fmt.Sprintf("%s-%s", control.standardKey, control.controlKey))
text := fmt.Sprintf("# %s\n## %s\n", key, control.GetName())
if len(control.GetDescription()) > 0 {
text += "#### Description\n"
text += control.GetDescription()
}
selectJustifications := openControl.GetAllVerificationsWith(control.standardKey, control.controlKey)
// In the case that no information was found period for the standard and control
if len(selectJustifications) == 0 {
errorText := fmt.Sprintf("No information found for the combination of standard %s and control %s", control.standardKey, control.controlKey)
text = fmt.Sprintf("%s\n%s\n", text, errorText)
}
for _, justification := range selectJustifications {
component, found := openControl.GetComponent(justification.ComponentKey)
if !found {
continue
}
text = fmt.Sprintf("%s\n#### %s\n", text, component.GetName())
text = openControl.getResponsibleRole(text, component)
text = openControl.getParameters(text, justification.SatisfiesData.GetParameters())
text = openControl.getControlOrigin(text, justification.SatisfiesData.GetControlOrigin())
text = openControl.getNarratives(justification.SatisfiesData.GetNarratives(), text, control)
text = openControl.getCoveredBy(text, justification)
}
return filepath.Join(control.exportPath, key+".md"), text
)

general references at the root of a component document appear to be rendered when looking at the overall component page, but not when looking at a specific control

👍 just logging for potential backlog consideration

see also:

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

1 participant