Skip to content

Protocol: Cookie Security

Identifier: header_set_cookie

Scanner(s) Support

GraphQL Scanner REST Scanner WebApp Scanner

Description

Cookies not secured with the proper flags can be easily intercepted or read by malicious scripts, which could allow attackers to hijack sessions or steal sensitive session data. This happens when cookies are sent over unencrypted connections or are accessible to JavaScript, leaving them exposed to various attacks. Developers commonly overlook setting flags that restrict cookie access, so if cookies arent properly secured, it can lead to significant issues like unauthorized access and session hijacking.

References:

Configuration

Example

Example configuration:

---
security_tests:
  header_set_cookie:
    assets_allowed:
    - REST
    - GRAPHQL
    - WEBAPP
    skip: false

Reference

assets_allowed

Type : List[AssetType]*

List of assets that this check will cover.

skip

Type : boolean

Skip the test if true.