Update oci_adapter.js, use NodeJS http modules for http calls.
This should fix https://github.com/minvws/nl-kat-coordination/security/code-scanning/112 and https://github.com/minvws/nl-kat-coordination/security/code-scanning/111 by not building a complete bash string, but instead uses the native NodeJS functions to specify the correct arguments. I've also added an env-var option to include a custom CA file, allowing for internal (acme) signed trafic between OpenKAT modules.
Issue link
Closes https://github.com/minvws/nl-kat-coordination/security/code-scanning/112 and https://github.com/minvws/nl-kat-coordination/security/code-scanning/111
Demo
Please add some proof in the form of screenshots or screen recordings to show (off) new functionality, if there are interesting new features for end-users.
QA notes
The nikto boef should still be able to fetch jobs, and return Nikto output to bytes.
Code Checklist
- [ ] All the commits in this PR are properly PGP-signed and verified.
- [ ] This PR only contains functionality relevant to the issue.
- [ ] I have written unit tests for the changes or fixes I made.
- [ ] I have checked the documentation and made changes where necessary.
- [ ] I have performed a self-review of my code and refactored it to the best of my abilities.
- [ ] Tickets have been created for newly discovered issues.
- [ ] For any non-trivial functionality, I have added integration and/or end-to-end tests.
- [ ] I have informed others of any required
.envchanges files if required and changed the.env-distaccordingly. - [ ] I have included comments in the code to elaborate on what is not self-evident from the code itself, including references to issues and discussions online, or implicit behavior of an interface.
Checklist for code reviewers:
Copy-paste the checklist from the docs/source/templates folder into your comment.
Checklist for QA:
Copy-paste the checklist from the docs/source/templates folder into your comment.
These changes seem to not work correctly if the internal addresses are ipv6. @Souf149 is seeing errors when ipv6 is enabled when connecting to the boefjes api which resolves into an ipv6 address.
