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

/collections/{collectionId}/findings ccis projection response does not match schema. #1362

Open
3 of 7 tasks
crodriguez6497 opened this issue Sep 5, 2024 · 0 comments
Open
3 of 7 tasks

Comments

@crodriguez6497
Copy link

crodriguez6497 commented Sep 5, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest version of STIG Manager?

  • I am using the latest Release.
  • I am NOT using the latest Release. I am aware that the first thing I will be asked to do is update the application so that I have the latest bugfixes.

Where are you experiencing the issue?

  • API
  • UI or other client
  • Deployment
  • Elsewhere

Current Behavior

Response data from requests to /collections/{collectionId}/findings with the ccis projection does not include "control" in the ccis response.

CCI specification schema:

"ccis": [
   {
     "apAcronym": "string",
     "cci": "string",
     "control": "string",
     "definition": "string"
   }
 ],

Response schema:

        "ccis": [
            {
                "cci": "string",
                "apAcronym": "string",
                "definition": "string"
            }
        ]

Issue arises from CollectionService.js L324-336:

  if (inProjection.includes('ccis')) {
    columns.push(`cast(concat('[', 
    coalesce(
      group_concat(distinct 
      case when cci.cci is not null
      then json_object(
        'cci', cci.cci,
        'definition', cci.definition,
        'apAcronym', cci.apAcronym)
      else null end order by cci.cci),
      ''),
    ']') as json) as "ccis"`)
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant