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

Bug in POAM converter #2595

Closed
wdower opened this issue May 29, 2024 · 0 comments · Fixed by #2596
Closed

Bug in POAM converter #2595

wdower opened this issue May 29, 2024 · 0 comments · Fixed by #2596
Assignees

Comments

@wdower
Copy link
Contributor

wdower commented May 29, 2024

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
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

Successfully merging a pull request may close this issue.

1 participant