-
Notifications
You must be signed in to change notification settings - Fork 43
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
PIMS-2106: Address WAVA Scan Findings #2781
Conversation
🚀 Deployment Information The Express API Image has been built with the tag: |
🚀 Deployment Information The React APP Image has been built with the tag: |
react-app/nginx.conf
Outdated
add_header Pragma "no-cache"; | ||
|
||
# Content Security Policy | ||
add_header Content-Security-Policy "default-src 'none'; frame-src 'self' *.gov.bc.ca; script-src 'nonce-windowsp' 'self' *.gov.bc.ca https://maps.googleapis.com https://unpkg.com; style-src 'self' 'unsafe-inline' https://unpkg.com https://cdnjs.cloudflare.com; font-src 'self' *.gov.bc.ca; img-src 'self' *.gov.bc.ca data: tile.openstreetmap.org https://maps.googleapis.com https://unpkg.com https://cdnjs.cloudflare.com https://openmaps.gov.bc.ca; connect-src 'self' *.gov.bc.ca https://openmaps.gov.bc.ca; manifest-src 'self';"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is the maps.googleapis.com used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, that was probably copied and pasted from the other repo. I can remove it.
@@ -1,4 +1,26 @@ | |||
server { | |||
# Enable HTTP Strict Transport Security (HSTS) to force clients to always | |||
# connect via HTTPS (do not use if only testing) | |||
add_header Strict-Transport-Security "max-age=31536000;"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how this still works with localhost. Doesn't seem to impede it, but it's not https there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything seems to work in local. Let's see how it affects DEV.
🎯 Summary
PIMS-2106
It seems that some of the findings of the WAVA report such as "Cookie with Insecure or Improper or Missing SameSite attribute" is out of our control, as these cookies are being sent by the service sending back the response (keycloak, siteminder, etc.)
Changes
Testing
To test you will need to run the react-app and the express-api as docker containers
docker-compose build pims-app-v2
anddocker-compose build pims-api-v2
and then to run the containers:
docker-compose up pims-app-v2 -d
Once the application is running, you'll need to check the console for any errors, and also make sure everything is working as expected. I did do some testing with the map filter and creating of a project, which seemed to work. You may need to edit the content security policy if some url was missed (eg. an image not loading when it should be)
This is kind of hard to test, other than making sure everything still works and then merging to dev to let the OWASP scan run in Openshift, but if you have time and want to try you can always try installing the opensource OWASP ZAP scanning tool, running it as a docker container, and follow the instructions mentioned from the documentation here: https://www.zaproxy.org/docs/docker/about/
docker run -v C:\zap:/zap/wrk:rw --network="host" ghcr.io/zaproxy/zaproxy:stable bash -c "zap-baseline.py -t http://host.docker.internal:3000 -r /zap/wrk/zap-scan-report.html && sleep 10"
Also, note that currently we are not doing an "in depth" application scan by logging in and testing each of the pages which would involve adding some authentication to the existing OWASP scan and more configuration.
🔰 Checklist