Skip to content
代码片段 群组 项目
未验证 提交 cb039524 编辑于 作者: Ash McKenzie's avatar Ash McKenzie 提交者: GitLab
浏览文件

Merge branch '515134-scg-pricing-tiers' into 'master'

Document why paid tiers cannot mitigate security vulnerabilities

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/181740



Merged-by: default avatarAsh McKenzie <amckenzie@gitlab.com>
Approved-by: default avatarGreg Myers <gmyers@gitlab.com>
Approved-by: default avatarAsh McKenzie <amckenzie@gitlab.com>
Co-authored-by: default avatarNick Malcolm <nmalcolm@gitlab.com>
No related branches found
No related tags found
无相关合并请求
...@@ -31,6 +31,7 @@ For each of the vulnerabilities listed in this document, AppSec aims to have a S ...@@ -31,6 +31,7 @@ For each of the vulnerabilities listed in this document, AppSec aims to have a S
| [Archive operations](#working-with-archive-files) (Go) | [1](https://gitlab.com/gitlab-com/gl-security/product-security/appsec/sast-custom-rules/-/blob/main/secure-coding-guidelines/go/go_insecure_archive_operations.yml) | ✅ | | [Archive operations](#working-with-archive-files) (Go) | [1](https://gitlab.com/gitlab-com/gl-security/product-security/appsec/sast-custom-rules/-/blob/main/secure-coding-guidelines/go/go_insecure_archive_operations.yml) | ✅ |
| [URL spoofing](#url-spoofing) | [1](https://gitlab.com/gitlab-com/gl-security/product-security/appsec/sast-custom-rules/-/blob/main/secure-coding-guidelines/ruby/ruby_url_spoofing.yml) | ✅ | | [URL spoofing](#url-spoofing) | [1](https://gitlab.com/gitlab-com/gl-security/product-security/appsec/sast-custom-rules/-/blob/main/secure-coding-guidelines/ruby/ruby_url_spoofing.yml) | ✅ |
| [Request Parameter Typing](#request-parameter-typing) | `StrongParams` RuboCop | ✅ | | [Request Parameter Typing](#request-parameter-typing) | `StrongParams` RuboCop | ✅ |
| [Paid tiers for vulnerability mitigation](#paid-tiers-for-vulnerability-mitigation) | N/A <!-- This cannot be validated programmatically //--> | |
## Process for creating new guidelines and accompanying rules ## Process for creating new guidelines and accompanying rules
...@@ -1941,6 +1942,59 @@ This class of issue applies to more than just email; other examples might includ ...@@ -1941,6 +1942,59 @@ This class of issue applies to more than just email; other examples might includ
The video covers what happened, how it worked, and what you need to know for the future. The video covers what happened, how it worked, and what you need to know for the future.
- Rails documentation for [ActionController::StrongParameters](https://api.rubyonrails.org/classes/ActionController/StrongParameters.html) and [ActionController::Parameters](https://api.rubyonrails.org/classes/ActionController/Parameters.html) - Rails documentation for [ActionController::StrongParameters](https://api.rubyonrails.org/classes/ActionController/StrongParameters.html) and [ActionController::Parameters](https://api.rubyonrails.org/classes/ActionController/Parameters.html)
## Paid tiers for vulnerability mitigation
Secure code must not rely on subscription tiers (Premium/Ultimate) or
separate SKUs as a control to mitigate security vulnerabilities.
While requiring paid tiers can create friction for potential attackers,
it does not provide meaningful security protection since adversaries
can bypass licensing restrictions through various means like free
trials or fraudulent payment.
Requiring payment is a valid strategy for anti-abuse when the cost to
the attacker exceeds the cost to GitLab. An example is limiting the
abuse of CI minutes. Here, the important thing to note is that use of
CI itself is not a security vulnerability.
### Impact
Relying on licensing tiers as a security control can:
- Lead to patches which can be bypassed by attackers with the ability to
pay.
- Create a false sense of security, leading to new vulnerabilities being
introduced.
### Examples
The following example shows an insecure implementation that relies on
licensing tiers. The service reads files from disk and attempts to use
the Ultimate subscription tier to prevent unauthorized access:
```ruby
class InsecureFileReadService
def execute
return unless License.feature_available?(:insecure_file_read_service)
return File.read(params[:unsafe_user_path])
end
end
```
If the above code made it to production, an attacker could create a free
trial, or pay for one with a stolen credit card. The resulting
vulnerability would be a critical (severity 1) incident.
### Mitigations
- Instead of relying on licensing tiers, resolve the vulnerability in
all tiers.
- Follow secure coding best practices specific to the feature's
functionality.
- If licensing tiers are used as part of a defense-in-depth strategy,
combine it with other effective security controls.
## Who to contact if you have questions ## Who to contact if you have questions
For general guidance, contact the For general guidance, contact the
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册