Having Problems Fixing Non-Storable Content

239 views
Skip to first unread message

Josh Monreal

unread,
Jun 23, 2023, 4:57:24 AM6/23/23
to OWASP ZAP Developer Group
Hi, 

I built a .NET 6.0 project and have OWASP ZAP scan in my build pipeline. I have added the code below and after the OWASP ZAP scan, I received the Non-storable content vulnerability.

Code.png

If I remove the Cache-Control entirely, then I get the Storable and Cacheable Content vulnerability. If I set Cache-Control to no-cache, then I get the Storable but Non-Cacheable Content. Can you help me determine what is the correct value that I need to put to remove the vulnerability? 

Thanks a lot for the help!

psiinon

unread,
Jun 23, 2023, 5:00:38 AM6/23/23
to zaproxy...@googlegroups.com
https://www.zaproxy.org/docs/alerts/10049-1/ is an Informational alert and not a vulnerability.

"The response contents are not storable by caching components such as proxy servers. If the response does not contain sensitive, personal or user-specific information, it may benefit from being stored and cached, to improve performance."

Dont assume that everything ZAP tells you is a vulnerability.
Read the details :)

Cheers,

Simon

--
You received this message because you are subscribed to the Google Groups "OWASP ZAP Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zaproxy-devel...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/zaproxy-develop/4f059a68-57da-4c2e-bc6a-30e43f898bd4n%40googlegroups.com.


--
OWASP ZAP Project leader

Josh Monreal

unread,
Jun 23, 2023, 5:23:24 AM6/23/23
to OWASP ZAP Developer Group
Hi psiinon,

Is there a documentation that I can check which shows how to ignore informational alerts in the scan result? 

psiinon

unread,
Jun 23, 2023, 5:24:57 AM6/23/23
to zaproxy...@googlegroups.com
How are you running ZAP?
That will affect which options are open to you.

Cheers,

Simon

Josh Monreal

unread,
Jun 23, 2023, 5:32:27 AM6/23/23
to OWASP ZAP Developer Group
I am using Azure DevOps pipelines (yaml). You can see below for the task.

- bash: |
                  chmod -R 777 ./
                  docker run --rm -v $(pwd):/zap/wrk/:rw -t owasp/zap2docker-stable zap-baseline.py -t https://x.azurewebsites.net -g gen.conf -x zap-report.xml -r zap-report.html -J zap-report.json
                  true
                displayName: 'Run OWASP Zap'

psiinon

unread,
Jun 23, 2023, 5:41:40 AM6/23/23
to zaproxy...@googlegroups.com

The easiest option is to use the option:
-l level          minimum level to show: PASS, IGNORE, INFO, WARN or FAIL, use with -s to hide example URLs
The baseline scan also supports a config file which allows you to ignore specific alerts.

Cheers,

Simon

Josh Monreal

unread,
Jun 23, 2023, 6:52:28 AM6/23/23
to OWASP ZAP Developer Group
I tried to add -l WARN to the docker command, but for some reason alert Id 10049-2 was still returned despite it only being Informational. Am I missing something?

- bash: |
                  chmod -R 777 ./
                  docker run --rm -v $(pwd):/zap/wrk/:rw -t owasp/zap2docker-stable zap-baseline.py -t https://x.azurewebsites.net -l WARN -g gen.conf -x zap-report.xml -r zap-report.html -J zap-report-be.json
                  true
                displayName: 'Run OWASP Zap'

psiinon

unread,
Jun 23, 2023, 7:52:50 AM6/23/23
to zaproxy...@googlegroups.com
Try removing "-g gen.conf" - you probably dont want to generate a config file in this case and it may be confusing things.

Josh Monreal

unread,
Jun 23, 2023, 11:33:28 AM6/23/23
to OWASP ZAP Developer Group
Thank you! 
Reply all
Reply to author
Forward
0 new messages