multi-language-al-folio
multi-language-al-folio copied to clipboard
Fix code scanning alert no. 8: Use of `Kernel.open` or `IO.read` or similar sinks with a non-constant value
Fixes https://github.com/george-gca/multi-language-al-folio/security/code-scanning/8
To fix the problem, we should replace the use of URI.open with a safer alternative that does not call Kernel.open internally. Specifically, we can use Net::HTTP to perform the HTTP request and read the file content. This approach avoids the security risks associated with URI.open.
- Replace the
URI.opencall withNet::HTTPto fetch the content of the URL. - Update the
download_filemethod to useNet::HTTPfor downloading the file. - Ensure that the new implementation maintains the existing functionality of downloading the file and saving it to the specified destination.
Suggested fixes powered by Copilot Autofix. Review carefully before merging.
Deploy Preview for multi-language-al-folio failed. Why did it fail? →
| Name | Link |
|---|---|
| Latest commit | 6eb78c53143cc32fc6b5983db262e29714ce1975 |
| Latest deploy log | https://app.netlify.com/sites/multi-language-al-folio/deploys/66f311542153a000082cc022 |