Skip to content

Bug in POAM converter #2595

@wdower

Description

@wdower

ckl2POAM fails due to an issue with regex parsing:

saf convert ckl2POAM -i baseline-scan-2024-05-15-17-04-41.ckl -o poam -d test
(node:72866) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
INFO: baseline-scan-2024-05-15-17-04-41.ckl: Opening file
INFO: baseline-scan-2024-05-15-17-04-41.ckl: Found 1 STIGs
INFO: baseline-scan-2024-05-15-17-04-41.ckl: Found 1 iSTIGs
INFO: baseline-scan-2024-05-15-17-04-41.ckl: Found 375 vulnerabilities
What should the default value be for Office/org? test
/opt/homebrew/Cellar/saf-cli/1.4.6/libexec/lib/node_modules/@mitre/saf/lib/utils/ckl2poam.js:153
    return comments.replace(/Automated(.*?)project\.\n/, '').replaceAll(/Profile shasum.*/s, '').trim(); // skipcq: JS-0113
                                                             ^

TypeError: String.prototype.replaceAll called with a non-global RegExp argument
    at String.replaceAll (<anonymous>)
    at cleanComments (/opt/homebrew/Cellar/saf-cli/1.4.6/libexec/lib/node_modules/@mitre/saf/lib/utils/ckl2poam.js:153:62)
    at combineComments (/opt/homebrew/Cellar/saf-cli/1.4.6/libexec/lib/node_modules/@mitre/saf/lib/utils/ckl2poam.js:157:65)
    at /opt/homebrew/Cellar/saf-cli/1.4.6/libexec/lib/node_modules/@mitre/saf/lib/commands/convert/ckl2POAM.js:168:111
    at Array.forEach (<anonymous>)
    at /opt/homebrew/Cellar/saf-cli/1.4.6/libexec/lib/node_modules/@mitre/saf/lib/commands/convert/ckl2POAM.js:138:45

Node.js v18.0.0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions