-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LPAL-733 Fix php-jwt vulnerabilities (#936)
* Remove unnecessary files from service-front docker image * node_modules and the package.* files are only used for building the JS, so remove them * Remove any test files * Remove any build-enabling files This has the benefits of making the image smaller, at the same time as improving security and reducing bogus security alerts (e.g. alerts about nodejs libraries which don't have any effect at runtime). * Remove unnecessary files from service-api docker image * Remove build-related and documentation-related files * Remove test cases * Exclude scripts which aren't used at runtime This removes potential security issues caused by unused components. We keep the composer.lock as security scans use this to decide whether there are vulnerabilities in our images. * Update to latest Notify client This upgrades the firebase/php-jwt library to a secure version. * Remove unnecessary files from service-admin * Tests must be in image for unit testing in CI * Replace tuupola/slim-jwt-auth with our fork slim-jwt-auth currently does not support firebase/php-jwt 6. This raise critical security alerts when our containers are scanned (namely CVE-2021-46743). There is an issue on the slim-jwt-auth repo for this, which I have commented on, asking for further info: tuupola/slim-jwt-auth#217 In the meantime, I have taken a copy of the key part of that package and reworked it slightly so that it functions with php-jwt v6. I also removed a lot of the options we're not using. The existing middleware which functions with slim-jwt-auth is commented out but still present. To reinstate that package, we just need to remove this commit. Co-authored-by: William Falconer <[email protected]>
- Loading branch information
1 parent
e81de20
commit 3efaa3b
Showing
13 changed files
with
503 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.