Welcome to mirror list, hosted at ThFree Co, Russian Federation.

614.1.md « checks « dast « application_security « user « doc - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 74ac73935f141765d065455eb8a39d792f6eafeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
stage: Secure
group: Dynamic Analysis
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---

# Sensitive cookie without `Secure` attribute

## Description

The {cookie_name} cookie was transmitted in a `Set-Cookie` response without the `Secure` attribute set.
To prevent sensitive cookie values being accidentally transmitted over clear-text HTTP we
recommended that cookies are declared with the `Secure` attribute.

## Remediation

Most web application frameworks allow configuring how cookies are sent to user agents. Consult your framework's
documentation for more information on how to enable various security attributes when assigning cookies to clients.

If the application is assigning cookies via writing to the response headers directly, ensure all responses include
the `Secure` attribute. By enabling this protection, the application will no longer send sensitive cookies over
HTTP.

Example:

```http
Set-Cookie: {cookie_name}=<random secure value>; Secure
```

## Details

| ID | Aggregated | CWE | Type | Risk |
|:---|:--------|:--------|:--------|:--------|
| 614.1 | false | 614 | Passive | Low |

## Links

- [owasp](https://owasp.org/www-community/controls/SecureCookieAttribute)
- [cwe](https://cwe.mitre.org/data/definitions/614.html)
- [Mozilla MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies)