question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cache-Control Header value 'no-store' raises an alert Incomplete or No Cache-control Header Set

See original GitHub issue

Describe the bug When running tests with no-store value in Cache-Control header, like ‘Cache-Control: no-store; max-age=0’ I still get a low severity alert. The proposed solution is to use values no-cache, no-store, must-revalidate. So no-store should not raise an alert. To Reproduce Run a test with ‘Cache-Control: no-store’ header and find a low severity alert in the report. I have also tried to change the value to ‘no-cache’ with the same result - a low severity alert is being raised.

HTTP/1.1 200 OK
Content-Type: text/html
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
Content-Security-Policy: default-src 'self'; frame-ancestors 'none'; form-action 'none'
Cache-Control: no-store

Expected behavior alert “Incomplete or No Cache-control Header Set” should not be raised when no-store value is used

Screenshots image

Software versions

Errors from the zap.log file

Additional context

Only value ‘no-store’ can in some cases not be enough. By adding ‘max-age=0’ together with ‘no store’ one can prevent a valid pre-existing cached response from being returned (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control). However, it is an adjustment to the existing rule and is probably not a part of this issue.

The solution part:

Would you like to help fix this issue? not this time, sorry

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Stanislava27-zzcommented, Sep 6, 2021

Hi,

#6446 looks same to me. You mention that you are willing to revise the scan rule, so this issue can be closed.

0reactions
github-actions[bot]commented, Dec 6, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cache-Control - HTTP - MDN Web Docs
The Cache-Control HTTP header field holds directives (instructions) — in both requests and responses — that control caching in browsers and ...
Read more >
Incomplete or No Cache-control and Pragma HTTP Header Set
The 'Pragma' header is reported incomplete when it is present in the HTTP response and it's value differs from 'no-cache'. ScanRepeat report includes...
Read more >
Cache-Control - How to Properly Configure It - KeyCDN Support
Cache-Control is an HTTP cache header comprised of directives that allow you to define when and how a response should be cached. Learn...
Read more >
HTTP/1.1: Caching in HTTP
HTTP/1.0 caches will cache all Warnings in responses, without deleting the ... The Cache-Control header allows a client or server to transmit a...
Read more >
RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1
HTTP allows an open-ended set of methods and headers that indicate the purpose ... message being transmitted. general-header = Cache-Control ; Section 14.9 ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found