Skip to content

Protocol: Headers

Identifier: headers

Scanner(s) Support

GraphQL Scanner REST Scanner WebApp Scanner

Description

Sometimes web apps dont set security headers correctly, which can open the door for various problems. For example, if cache settings arent defined, sensitive data might be stored on a users device and potentially seen by others. Not specifying a content type or allowing browsers to guess it can lead to dangerous misinterpretations of data, potentially letting malicious content execute in an unexpected way. Without enforcing HTTPS strictly, connections might be unencrypted, exposing data in transit. Similarly, cookies that lack secure or HttpOnly flags can be intercepted or accessed by scripts, making session theft easier. Also, when servers reveal their version details in response headers, attackers can use this information to target known vulnerabilities. Developers need to be careful not to overlook these headers, as their improper setup can significantly increase a systems risk profile.

References:

Configuration

Example

Example configuration:

---
security_tests:
  headers:
    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.