Feature/Quality of Life/EP-292-convertSecurityFrameworksToEpiski#6
Feature/Quality of Life/EP-292-convertSecurityFrameworksToEpiski#6christianXD1249 wants to merge 3 commits intoepiski:mainfrom
Conversation
|
| @@ -0,0 +1,78 @@ | |||
| // convert-scf-to-episki.ts | |||
| const mapped = json.map(it => ({ | ||
| ref: it.id || it.control_id || it.controlId || '', | ||
| control: `<p>${escapeHtml(it.title || it.name || it.control || '')}</p>`, | ||
| description: `<p>${escapeHtml(it.description || it.prose || '')}</p>`, |
There was a problem hiding this comment.
You don't need to place the control/description inside a paragraph nor you need to escape the html.
Our ingest flow will sanitize the html in case it contain invalid/insecure tags
I recommend setting the description and control as is
| } | ||
|
|
||
| async function main() { | ||
| const inputPath = Bun.argv[2] |
There was a problem hiding this comment.
Why is one file made with Bun helpers and the other with out? Let's use node without dependencies if possible
|
Please also create a type definition for the Oscal and SCF json formats and use it within your converters Also copy over the expected episki format type from the main repository and use it to validate your output Lastly please install zod and validate the input data for Oscal and SCF so in the future we can detect breaking changes right away. Right now is hard to know what files to provide to each converter. |
| } | ||
|
|
||
| const inputName = path.basename(fullPath, ".json"); | ||
| const outPath = path.join( |
This PR adds a converter for Oscal to episki and SCF to episki and the converted frameworks from the issue were converted with the tool.
Named Oscal to episki.ts and SCF to episki.ts
Here is a Screenshot of the app running the converted frameworks. This one is SCF


And here is a converted Oscal framework running in the app.
https://linear.app/episki/issue/EP-292/convert-security-frameworks-into-episki-json-format