Question about json library/script embedded in DISA STIG fixlet for SCM

(imported topic written by quintanj81)

Hello out there.

I’ve been trying to generate custom content for UNIX SCM, and have been relatively successful in doing so.

But I’ve hit a brick wall which I cannot break trhough no matter how hard I’ve tried, so I thought I’d ask for help

I know that the way to generate a fixlet for SCM in unix is to use an existing fixlet, modify the fields according to the document SCM_Fixlet_documentation.pdf and to replace detect and remediate scripts with my own (encoded in base64 and no larger than 2100 chars judging by the fixlets in the site).

But I’ve been constantly bugged with the component in the fixlet. The DISA STIG ones come with a embedded which (as far as I could tell) is JSON (a library and a script) which allows the xml to update itself with custom parameters (at runtime I presume?).

I’ve checked the encoding, checked each CR/LF vs LF combination on the fixlet I’ve used as basis for authoring purposes and everything matches (except of course the description itself). And when I import the fixlet, although the import process is successful, I get the following error

Script error:

An error has ocurred in the script on this page

Line 312

Error: Expected ‘}’

Code 0

URL: about blank

Do you want to continue running scripts on this page ?

I’m not a html expert, least to say a JSON expert… but I don’t get it… re-import of the original fixlet does not render this error, and import of the modified one does…

any ideas?

Perhaps something inside the json that should be modified?

I’m attaching a capture of the error and the .bes fixlet generated

Any help will be highly appreciated

Thanks in advance

Jorge