gitlab-secret_detection 0.21.1 → 0.29.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 889d73558aa44e46f3ef3e590e5fad55c147795ca567502646df0a45e99009f5
4
- data.tar.gz: 9648a61aa8af0b510809197e945bc99e7d865375f39d3edfc1378269f8d9718f
3
+ metadata.gz: 673a9afd30ab84aa8c163e417ec0fe729fc6ec39c07b15a903e666b3b0d36cc7
4
+ data.tar.gz: e213724b9cbbfdac19ecab74bf88d7a684396ad6ba875069f6e7dd99f9488617
5
5
  SHA512:
6
- metadata.gz: f247d572884d48912f3fb9d65b33cb1f010973b5adc9f2602e98599d8856186acd94613fe594c7489402d089ea1e9cd76085d214e5b5df497742dedc592b9806
7
- data.tar.gz: 06c14d1d937caf49eed9f78cec0075fa49f0164add65ab6630b7305a46057a94c4170079c98025f4a863755dc7c106eaf01ae16a5216d2ab97fc3f5c9a5c5092
6
+ metadata.gz: 5e6f2662182666ce60547c9a29bcccc0cd10ec0df4d5d3ebf0310f712e311a56b47a8efabc00592a243dbf71592d405e350f5b68b4cd4706ee29fdb3b1c14ccb
7
+ data.tar.gz: f06f4926180c559d22945608360a53217bb7ece7d64d8e1548d153745b28fa7fd53b1739c6eb1957008862fe673a8d489627065b4a9122c8b18d0f65492d5b6d
data/README.md CHANGED
@@ -7,7 +7,7 @@ Reference Issue: https://gitlab.com/groups/gitlab-org/-/epics/13792
7
7
 
8
8
  #### Tools and Framework
9
9
 
10
- - Ruby `3.2.X`
10
+ - Ruby `3.3.X`
11
11
  - gRPC framework for serving RPC requests
12
12
 
13
13
  ## Feature Distribution
@@ -235,14 +235,14 @@ module Gitlab
235
235
  return nil
236
236
  end
237
237
 
238
- keywords_regex = include_keywords.join('|')
238
+ keywords_regex = include_keywords.map { |keyword| RE2::Regexp.quote(keyword) }.join('|')
239
239
 
240
240
  logger.debug(
241
241
  message: "Creating RE2 Keyword Matcher with set of rule keywords",
242
242
  keywords: include_keywords.to_a
243
243
  )
244
244
 
245
- RE2("\\b(#{keywords_regex})")
245
+ RE2("(#{keywords_regex})")
246
246
  end
247
247
 
248
248
  def filter_by_keywords(keyword_matcher, payloads)
@@ -1,5 +1,14 @@
1
- # rule-set version: 0.8.0
1
+ # rule-set version: 0.11.0
2
2
  # Rules are auto-generated. See https://gitlab.com/gitlab-org/security-products/secret-detection/secret-detection-rules for instructions on updating the rules.
3
+ [[rules]]
4
+ id = 'Adobe Client Secret'
5
+ regex = '\b(p8e-)[a-zA-Z0-9]{32}\b'
6
+ description = "An Adobe client secret was detected. Adobe client secrets are used to connect to various API or webhook event based\nservices. Depending on which type of service was defined for a project, a malicious actor with access to the secret can\nuse it to gain access to various APIs or events that may contain sensitive information."
7
+ title = 'Adobe client secret'
8
+ remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet).\n\nRemediation steps depend on which type of client secret was leaked, please see the following\ntypes of remediation steps below and use the one that applies to the secret that was detected.\n\nOAuth (Server-to-Server):\n\n- Sign in to your account at <https://developer.adobe.com/console>\n- Select the project or \"All projects\" to find the project that is impacted\n- On the left-hand side, under \"Credentials\", select \"OAuth Server-to-Server\"\n- Under \"Client Secret\" select \"Retrieve client secret\"\n- After the table of secrets is visible, below the table, select \"Add new client secret\"\n- After the new secret has been created, find the leaked token value and select the trash icon to remove it\n- Copy the secret value and update all services with the new client secret\n\nOAuth Web App (Event based project):\n\n- Sign in to your account at <https://developer.adobe.com/console>\n- Select the project or select \"All projects\" to find the project that is impacted\n- On the left-hand side, under \"Credentials\", select \"OAuth Web App\".\n- Select \"Retrieve client secret\"\n- Verify this is the leaked secret\n- If this project is configured for events, copy all event details before removing it. You can do this by finding the\n event listed on the right hand side and selecting on it. You should be brought to a dashboard that shows its details\n such as event delivery methods, providers, subscribed events, and connected Credentials.\n- To remove the event, select \"...\" in the event, which is on the right hand side of the project page, above\n \"Connect another service\".\n - Select \"remove\"\n - When prompted, type in the project name and select \"Delete Events Registration\"\n- In the top right-hand corner, select \"Delete credential\"\n - When prompted, type in the project name and select \"Delete Credential\"\n- Re-add the event with the same details as before\n - When prompted to add back the Credentials, be sure to use \"User Authentication\" OAuth\n - Select \"Web App\" for OAuth 2.0 authentication and authorization\n- After the event has been re-added, under \"Credentials\" on left hand side, select \"OAuth Web App\"\n- Select \"Retrieve client secret\"\n- Copy the secret value and update all services with the new client secret\n\nOAuth Web App (API Service based project):\n\n- Sign in to your account at <https://developer.adobe.com/console>\n- Select the project or select \"All projects\" to find the project that is impacted\n- On the left-hand side, under \"Credentials\", select \"OAuth Web App\"\n- Select \"Retrieve client secret\"\n- If this project is configured for API, select the trash icon \"Remove\" to remove the connected product and service.\n - When prompted, enter the project name and select \"Remove API\"\n- In the top right-hand corner, select \"Delete credential\"\n - When prompted, type in the project name and select \"Delete Credential\"\n- Re-add the API with the same details as before\n - Select \"Web App\" for OAuth 2.0 authentication and authorization\n- After the service has been re-added, on the left-hand side under \"Credentials\", select \"OAuth Web App\"\n- Select \"Retrieve client secret\"\n- Copy the secret value and update all services with the new client secret"
9
+ tags = ['gitlab_blocking']
10
+ keywords = ['p8e-']
11
+
3
12
  [[rules]]
4
13
  id = 'anthropic_key'
5
14
  regex = '\b(sk-ant-[a-z]{3}\d{2}-[A-Za-z0-9\\-_]{86}-[A-Za-z0-9\\-_]{8})(?:[[:punct:]]|[[:space:]]|[[:blank:]]|$)'
@@ -19,13 +28,31 @@ tags = ['aws', 'revocation_type', 'gitlab_blocking']
19
28
  keywords = ['AKIA']
20
29
 
21
30
  [[rules]]
22
- id = 'GCP API key'
23
- regex = "(?i)\\b(AIza[0-9A-Za-z-_]{35})(?:['|\\\"|\\n|\\r|\\s|\\x60|;]|$)"
24
- description = "A GCP API key was detected. GCP API keys are used to authorize requests from services, not for users. API keys are\ncommonly used for accessing public data anonymously, and are used to associate API requests with the consumer Google\nCloud project for quota and billing. A malicious actor with access to this key can issue requests to Google Cloud\nservices that are billed to the owning account."
25
- title = 'GCP API key'
26
- remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet).\n\nTo revoke an API key:\n\n- Sign in to your GCP account and go to <https://console.cloud.google.com/apis/credentials>\n- Under the \"Actions\" column of the \"API Keys\" table, select the kebab menu (vertical ellipsis) for the identified key\n- Select \"Delete API Key\"\n- When prompted select \"Delete\" in the \"Delete credential\" dialog\n\nFor more information please see [https://cloud.google.com/docs/authentication/api-keys](https://cloud.google.com/docs/authentication/api-keys)"
27
- tags = ['gitlab_partner_token', 'revocation_type', 'gitlab_blocking']
28
- keywords = ['AIza']
31
+ id = 'CircleCIPersonalAccessToken'
32
+ regex = '\bCCIPAT_[a-zA-Z0-9]{22}_[a-f0-9]{40}\b'
33
+ description = "A CircleCI personal access token was identified. Personal access tokens grant the same level of permissions as the user\nthat created the token. A malicious actor with access to this token can impersonate the user and gain access to all\nfeatures and services in CircleCI."
34
+ title = 'CircleCI Personal Access Token'
35
+ remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet).\n\nFor rotating a Personal Access token:\n\n- In the CircleCI application, go to your User settings.\n- Select \"Personal API Tokens\".\n- Select \"X\" in the Remove column for the token you wish to replace and confirm your deletion.\n- Select \"Create New Token\".\n- In the Token name field, type a new name for the old token you are rotating. It can be the same name given to the old\n token.\n- Select \"Add API Token\".\n- After the token appears, copy and paste it to another location. It is not possible to view the token again.\n\nFor more information please see their [documentation on rotating personal access tokens](https://circleci.com/docs/managing-api-tokens/#rotating-a-personal-api-token)."
36
+ tags = ['gitlab_blocking']
37
+ keywords = ['CCIPAT_']
38
+
39
+ [[rules]]
40
+ id = 'ContentfulPersonalAccessToken'
41
+ regex = '\bCFPAT-([a-zA-Z0-9_\-]){43}\b'
42
+ description = "A Contentful personal access token was identified. Personal access tokens are tied to the user who requests them and\ncarry the same permissions, including access to organizations, spaces, and content."
43
+ title = 'Contentful personal access token'
44
+ remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet).\n\nTo revoke a personal access token:\n\n- Sign in and visit your account profile: <https://app.contentful.com/account/profile/user>\n- Select the \"CMA tokens\" tab in the top menu\n- Identify the token that was detected\n- Select \"Revoke\" in the right hand column\n- Select \"Revoke\" when prompted\n\nFor more information, please see the developer [documentation on personal access tokens](https://www.contentful.com/help/token-management/personal-access-tokens)."
45
+ tags = ['gitlab_blocking']
46
+ keywords = ['CFPAT-']
47
+
48
+ [[rules]]
49
+ id = 'Doppler API token'
50
+ regex = '\b(dp\.pt\.)[a-zA-Z0-9]{43}\b'
51
+ description = 'Doppler personal access token was detected.'
52
+ title = 'Doppler API token'
53
+ remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet).\n\nTo revoke the Doppler personal access token:\n\n- Open and sign in to <https://dashboard.doppler.com/>\n- Select \"Tokens\" on the right-hand side menu\n- Select the \"Personal\" tab\n- Find the personal token and select \"Roll\" in the Action column\n- After the \"Roll Personal Token\" dialog is displayed select \"Roll\"\n- Copy the new token's value\n\nFor more information please see their documentation: <https://docs.doppler.com/docs/start>"
54
+ tags = ['gitlab_blocking']
55
+ keywords = ['dp.pt.']
29
56
 
30
57
  [[rules]]
31
58
  id = 'GCP OAuth client secret'
@@ -99,6 +126,15 @@ remediation = "For general guidance on handling security incidents with regards
99
126
  tags = ['gitlab', 'revocation_type', 'gitlab_blocking', 'client_side_sd']
100
127
  keywords = ['glpat-']
101
128
 
129
+ [[rules]]
130
+ id = 'gitlab_personal_access_token_routable_versioned'
131
+ regex = '\bglpat-[0-9a-zA-Z_-]{27,300}\.[0-9a-z]{2}\.[0-9a-z]{2}[0-9a-z]{7}\b'
132
+ description = 'GitLab Personal Access Token (routable)'
133
+ title = 'GitLab Personal Access Token (routable)'
134
+ remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet)."
135
+ tags = ['gitlab', 'revocation_type', 'gitlab_blocking', 'client_side_sd']
136
+ keywords = ['glpat-']
137
+
102
138
  [[rules]]
103
139
  id = 'gitlab_pipeline_trigger_token'
104
140
  regex = '\b(glptt-[0-9a-zA-Z_\-]{40})(?:[[:punct:]]|[[:space:]]|[[:blank:]]|$)'
@@ -126,6 +162,15 @@ remediation = "For general guidance on handling security incidents with regards
126
162
  tags = ['gitlab', 'gitlab_blocking', 'client_side_sd']
127
163
  keywords = ['glrt']
128
164
 
165
+ [[rules]]
166
+ id = 'gitlab_runner_auth_token_routable'
167
+ regex = '\bglrt-[0-9a-zA-Z_-]{27,300}\.[0-9a-z]{2}\.[0-9a-z]{2}[0-9a-z]{7}\b'
168
+ description = "A routable GitLab runner authentication token was identified. These tokens allow users to register or authenticate as a runner\nwith the selected project. A malicious actor with access to this token can add a custom runner to the pipeline and\npossibly compromise the repository if the runner was used."
169
+ title = 'GitLab runner authentication token (routable)'
170
+ remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet).\n\nTo revoke a runner authentication token, the runner needs to be removed and re-created\n\n- Sign in to your GitLab account and visit the project that created the runner registration token\n- In the left-hand menu, select \"Settings\"\n- Under the \"Settings\" options, select \"CI/CD\"\n- Under the \"Runners\" section, find the runner with the identified token, (you can check the runner `config.toml` if you\n are unsure)\n- Select \"Remove runner\"\n- When prompted, select \"Remove\"\n\nFor more information, please see [GitLabs documentation on registering runners](https://docs.gitlab.com/runner/register/)."
171
+ tags = ['gitlab', 'gitlab_blocking', 'client_side_sd']
172
+ keywords = ['glrt-']
173
+
129
174
  [[rules]]
130
175
  id = 'gitlab_oauth_app_secret'
131
176
  regex = '\b(gloas-[0-9a-zA-Z_\-]{64})(?:[[:punct:]]|[[:space:]]|[[:blank:]]|$)'
@@ -164,7 +209,7 @@ keywords = ['glimt']
164
209
 
165
210
  [[rules]]
166
211
  id = 'Grafana API token'
167
- regex = "['\\\"]eyJrIjoi(?i)[a-z0-9-_=]{72,92}['\\\"]"
212
+ regex = "['\\\"]eyJrIjoi[a-zA-Z0-9-_=]{72,92}['\\\"]"
168
213
  description = 'Grafana API token'
169
214
  title = 'Grafana API token'
170
215
  remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet)."
@@ -173,7 +218,7 @@ keywords = ['eyJrIjoi']
173
218
 
174
219
  [[rules]]
175
220
  id = 'Hashicorp Terraform user/org API token'
176
- regex = "['\\\"](?i)[a-z0-9]{14}\\.atlasv1\\.[a-z0-9-_=]{60,70}['\\\"]"
221
+ regex = "['\\\"][a-zA-Z0-9]{14}\\.atlasv1\\.[a-zA-Z0-9-_=]{60,70}['\\\"]"
177
222
  description = "A HashiCorp Terraform API token was identified. API tokens can be used to access the HCP Terraform API. A malicious\nactor with access to this token can perform all actions the user account is entitled to."
178
223
  title = 'HashiCorp Terraform API token'
179
224
  remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet).\n\nTo revoke an API token:\n\n- Sign in to the Terraform HCP console and access <https://app.terraform.io/app/settings/tokens>\n- Find the token that was identified\n- Select the trash icon on the right hand side of the token\n- When prompted, select \"Confirm\" in the \"Deleting token ...\" dialog\n\nFor more information, please see [Terraform's documentation on API tokens](https://app.terraform.io/app/settings/tokens)."
@@ -189,9 +234,18 @@ remediation = "For general guidance on handling security incidents with regards
189
234
  tags = ['gitlab_blocking']
190
235
  keywords = ['b.AAAAAQ']
191
236
 
237
+ [[rules]]
238
+ id = 'Linear API token'
239
+ regex = '\blin_api_[a-zA-Z0-9]{40}\b'
240
+ description = "A Linear API token was identified. Personal API tokens can be used to access Linear's GraphQL API. A malicious actor\nwith access to this token can read or write issues, projects and teams to Linear and any systems the account has been\nintegrated with."
241
+ title = 'Linear API token'
242
+ remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet).\n\nTo revoke a Linear API token:\n\n- Sign in to your account at <https://linear.app/>\n- Select your organization in the top left corner and select \"Preferences\"\n- In the left-hand menu, select \"API\" under \"My Account\"\n- Find the identified API key in the \"Personal API Keys\" section of the page\n- Select \"Revoke\" next to the identified key\n- When prompted, select \"Revoke\" in the \"Revoke access?\" dialog\n\nFor more information, please see [Linear's documentation on using personal API keys](https://developers.linear.app/docs/graphql/working-with-the-graphql-api#personal-api-keys)."
243
+ tags = ['gitlab_blocking']
244
+ keywords = ['lin_api_']
245
+
192
246
  [[rules]]
193
247
  id = 'Mailchimp API key'
194
- regex = "(?i)mailchimp[a-z0-9_ .\\-,]{0,25}(?:=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\\\"]([a-f0-9]{32}-us20)['\\\"]"
248
+ regex = "(?i:mailchimp)[a-zA-Z0-9_ .\\-,]{0,25}(?:=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\\\"]([a-f0-9]{32}-us20)['\\\"]"
195
249
  description = "A Mailchimp API key was identified. API keys can be used send emails, create and send marketing campaigns, access\ncustomer lists and email addresses. A malicious actor with access to this key can perform any API request to Mailchimp\nwithout restriction."
196
250
  title = 'Mailchimp API key'
197
251
  remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet).\n\nTo revoke an API key:\n\n- Sign in to your Mailchimp account at <https://login.mailchimp.com/>\n- Select your profile icon then select Profile\n- Select the Extras dropdown list then choose \"API keys\"\n- Find the identified key and select \"Revoke\"\n- When prompted, type \"REVOKE\" to confirm and select \"Revoke\" in the \"Revoke API Key\" dialog\n\nFor more information, please see [Mailchimp's documentation on API key security](https://mailchimp.com/help/about-api-keys/#api+key+security)."
@@ -200,7 +254,7 @@ keywords = ['mailchimp']
200
254
 
201
255
  [[rules]]
202
256
  id = 'Mailgun private API token'
203
- regex = "(?i)mailgun[a-z0-9_ .\\-,]{0,25}(?:=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\\\"](key-[a-f0-9]{32})['\\\"]"
257
+ regex = "(?i:mailgun)[a-zA-Z0-9_ .\\-,]{0,25}(?:=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\\\"](key-[a-f0-9]{32})['\\\"]"
204
258
  description = "A Mailgun private API token was identified. This key allows you to perform read, write, and delete operations through\nvarious API endpoints and for any of your sending domains. A malicious actor with access to this key can perform any API\nrequest to Mailgun without restriction."
205
259
  title = 'Mailgun private API token'
206
260
  remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet).\n\nTo rotate a private API token:\n\n- Sign in to your Mailgun account and access the dashboard at <https://app.mailgun.com/>\n- On the top right-hand side, select your account profile and then select \"API Security\"\n- Find the identified key and select the trash icon\n - If you cannot select the trash icon, you must first generate a new key by selecting \"Add new key\"\n- When prompted, select \"Delete\" in the \"Delete API Key\" dialog\n\nFor more information, please see [Mailgun's documentation on API keys](https://documentation.mailgun.com/docs/mailgun/user-manual/get-started/#primary-account-api-key)."
@@ -209,13 +263,22 @@ keywords = ['mailgun']
209
263
 
210
264
  [[rules]]
211
265
  id = 'Mailgun webhook signing key'
212
- regex = "(?i)mailgun[a-z0-9_ .\\-,]{0,25}(?:=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\\\"]([a-h0-9]{32}-[a-h0-9]{8}-[a-h0-9]{8})['\\\"]"
266
+ regex = "(?i:mailgun)[a-zA-Z0-9_ .\\-,]{0,25}(?:=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\\\"]([a-h0-9]{32}-[a-h0-9]{8}-[a-h0-9]{8})['\\\"]"
213
267
  description = "A Mailgun webhook signing key was identified. This key is used by Mailgun to sign all incoming webhook message payloads.\nA malicious actor with access to this key can potentially sign fake webhook events and send it to your service to pass\nvalidation and be processed."
214
268
  title = 'Mailgun webhook signing key'
215
269
  remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet).\n\nTo rotate your HTTP webhook signing key:\n\n- Sign in to your Mailgun account and access the dashboard at <https://app.mailgun.com/>\n- On the top right-hand side, select your account profile and select \"API Security\"\n- In the \"HTTP webhook signing key\" section, select the rotate arrow icon in the right hand side\n- When prompted, select \"Reset Key\" in the \"Reset HTTP webhook signing key\" dialog\n\nFor more information, please see [Mailgun's documentation on webhooks](https://documentation.mailgun.com/docs/mailgun/user-manual/tracking-messages/#securing-webhooks)."
216
270
  tags = ['gitlab_blocking']
217
271
  keywords = ['mailgun']
218
272
 
273
+ [[rules]]
274
+ id = 'MaxMind License Key'
275
+ regex = '\b([a-zA-Z0-9]{6}_[a-zA-Z0-9]{29}_mmk)\b'
276
+ description = 'MaxMind License Key'
277
+ title = 'MaxMind License Key'
278
+ remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet)."
279
+ tags = ['gitlab_blocking']
280
+ keywords = ['_mmk']
281
+
219
282
  [[rules]]
220
283
  id = 'New Relic user API Key'
221
284
  regex = "['\\\"](NRAK-[A-Z0-9]{27})['\\\"]"
@@ -227,7 +290,7 @@ keywords = ['NRAK']
227
290
 
228
291
  [[rules]]
229
292
  id = 'New Relic user API ID'
230
- regex = "(?i)newrelic[a-z0-9_ .\\-,]{0,25}(?:=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\\\"]([A-Z0-9]{64})['\\\"]"
293
+ regex = "(?i:newrelic)[a-zA-Z0-9_ .\\-,]{0,25}(?:=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\\\"]([a-zA-Z0-9]{64})['\\\"]"
231
294
  description = 'New Relic user API ID'
232
295
  title = 'New Relic user API ID'
233
296
  remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet).\n\nFor more information, please see [New Relic's documentation on rotating API keys](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#rotate-keys)."
@@ -236,13 +299,40 @@ keywords = ['newrelic']
236
299
 
237
300
  [[rules]]
238
301
  id = 'npm access token'
239
- regex = "['\\\"](npm_(?i)[a-z0-9]{36})['\\\"]"
302
+ regex = "['\\\"](npm_[a-zA-Z0-9]{36})['\\\"]"
240
303
  description = "An npm access token was identified. Access tokens can either be classic or granular, both of which allow customization\nof permissions. Depending on the permissions, a malicious actor with access to this token can read packages and package\ninformation, or create new packages and publish them under the account that created them."
241
304
  title = 'npm access token'
242
305
  remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet).\n\nTo revoke an access token from the UI:\n\n- Sign in to your npm account at <https://www.npmjs.com/login>\n- In the top right corner, select your profile picture and then select \"Access Tokens\"\n- Find the token that was identified and select \"x\" in the \"Delete\" column\n- When prompted, select \"OK\" in the dialog\n\nFor more information, please see [npm's documentation on revoking access tokens](https://docs.npmjs.com/revoking-access-tokens)."
243
306
  tags = ['gitlab_blocking']
244
307
  keywords = ['npm_']
245
308
 
309
+ [[rules]]
310
+ id = 'Onfido Live API Token'
311
+ regex = '\bapi_live(?:_[a-z]{2})?\.[_a-zA-Z0-9]{11}\.[-_a-zA-Z0-9]{32}\b'
312
+ description = 'Onfido Live API Token'
313
+ title = 'Onfido Live API Token'
314
+ remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet)."
315
+ tags = ['gitlab_blocking']
316
+ keywords = ['api_live']
317
+
318
+ [[rules]]
319
+ id = 'Planetscale password'
320
+ regex = '\bpscale_pw_[a-zA-Z0-9]{43}\b'
321
+ description = "A PlanetScale password was identified. PlanetScale passwords are used to connect to database instances. A malicious\nactor with access to this password can access PlanetScale managed databases."
322
+ title = 'PlanetScale password'
323
+ remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet).\n\nFor more information, please see [PlanetScale's documentation on database connection strings](https://planetscale.com/docs/concepts/connection-strings)."
324
+ tags = ['gitlab_blocking']
325
+ keywords = ['pscale_pw_']
326
+
327
+ [[rules]]
328
+ id = 'Planetscale API token'
329
+ regex = '\bpscale_tkn_[a-zA-Z0-9\-_]{43}\b'
330
+ description = "A PlanetScale API service token was identified. Service tokens are created and assigned permissions depending on the\nallowed scope. A malicious actor with access to the service token is granted the same permissions that were assigned to\nthis service token."
331
+ title = 'PlanetScale API token'
332
+ remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet).\n\nTo revoke a service token:\n\n- Sign in to your PlanetScale account and access <https://app.planetscale.com/>.\n- From the menu on the left-hand side, select \"Settings\"\n- Under \"Settings\", select \"Service tokens\"\n- Find the identified security token and select its name\n- Take note of its organization access, permissions and scope\n- Select \"Delete service token\" in the top right corner\n- When prompted, select \"Delete\" in the \"Delete service token\" dialog\n\nFor more information, please see [PlanetScale's documentation on service tokens](https://planetscale.com/docs/concepts/service-tokens)."
333
+ tags = ['gitlab_blocking']
334
+ keywords = ['pscale_tkn_']
335
+
246
336
  [[rules]]
247
337
  id = 'PyPI upload token'
248
338
  regex = 'pypi-AgEIcHlwaS5vcmc[A-Za-z0-9-_]{50,1000}'
@@ -272,13 +362,40 @@ keywords = ['sgp_']
272
362
 
273
363
  [[rules]]
274
364
  id = 'Sendgrid API token'
275
- regex = 'SG\.(?i)[a-z0-9_\-\.]{66}'
365
+ regex = 'SG\.[a-zA-Z0-9_\-\.]{66}'
276
366
  description = 'SendGrid API token'
277
367
  title = 'SendGrid API token'
278
368
  remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet)."
279
369
  tags = ['gitlab_blocking']
280
370
  keywords = ['SG.']
281
371
 
372
+ [[rules]]
373
+ id = 'Sendinblue API token'
374
+ regex = '\bxkeysib-[a-f0-9]{64}-[a-zA-Z0-9]{16}\b'
375
+ description = 'Brevo API token'
376
+ title = 'Brevo API token'
377
+ remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet)."
378
+ tags = ['gitlab_blocking']
379
+ keywords = ['xkeysib-']
380
+
381
+ [[rules]]
382
+ id = 'Sendinblue SMTP token'
383
+ regex = '\bxsmtpsib-[a-f0-9]{64}-[a-zA-Z0-9]{16}\b'
384
+ description = 'Brevo SMTP token'
385
+ title = 'Brevo SMTP token'
386
+ remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet)."
387
+ tags = ['gitlab_blocking']
388
+ keywords = ['xsmtpsib-']
389
+
390
+ [[rules]]
391
+ id = 'Shippo API token'
392
+ regex = '\bshippo_live_[a-f0-9]{40}\b'
393
+ description = "A live Shippo API token was identified. API tokens can be used to access the Shippo API which is used for shipping services.\nA malicious actor with access to this token can access billing and order information and modify shipping data."
394
+ title = 'Shippo API token'
395
+ remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet).\n\nTo revoke an API token:\n\n- Sign in to your Shippo account and access <https://apps.goshippo.com/>\n- In the top right-hand side, select the \"gear\" icon to go to the \"Settings\" page\n- Scroll down in the left hand menu to \"Advanced\" and select \"API\"\n- Under the \"Token\" section, select \"Manage your token\"\n- Find the identified token and select the trash icon\n- When prompted, select \"Yes, remove token\" in the \"Manage Your Tokens\" dialog\n\nFor more information, please see [Shippo's documentation on API keys](https://portal.goshippo.com/api-config/api)."
396
+ tags = ['gitlab_blocking']
397
+ keywords = ['shippo_live_']
398
+
282
399
  [[rules]]
283
400
  id = 'Shopify shared secret'
284
401
  regex = 'shpss_[a-fA-F0-9]{32}'
@@ -325,10 +442,37 @@ tags = ['gitlab_blocking']
325
442
  keywords = ['xoxb', 'xoxa', 'xoxp', 'xoxr', 'xoxs']
326
443
 
327
444
  [[rules]]
328
- id = 'Stripe'
329
- regex = '(?i)(?:sk|pk)_(?:test|live)_[0-9a-z]{10,32}'
330
- description = 'Stripe'
331
- title = 'Stripe key'
332
- remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet).\n\nFor more information, please see [Stripe's documentation on API keys](https://docs.stripe.com/keys)."
445
+ id = 'SlackAppLevelToken'
446
+ regex = '\bxapp-1-[A-Z0-9]{11}-[0-9]{13}-[a-f0-9]{64}\b'
447
+ description = "A Slack app level token was identified. App level tokens are for use with Slack apps but only with specific APIs, which\nare related to the app across all organizations where the app is installed. Three scope levels can be assigned:\n\n- connections:write: Route your app's interactions and event payloads over WebSockets\n- authorizations:read: View information about your app's authorizations on installed teams\n- app_configurations:write: Configure your application\n\nA malicious actor with access to this token is granted one or more of the above permissions to access the API with for\na specific application."
448
+ title = 'Slack app level token'
449
+ remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet).\n\nTo revoke a Slack app level token:\n\n- Sign in to Slack and access <https://api.slack.com/apps>\n- Find the application with the identified token and select the name\n- In the left-hand menu, select \"Basic Information\"\n- Scroll down to the \"App-Level Tokens\" section and select the token name of the identified token\n- In the token dialog, select \"Revoke\"\n- When prompted, select \"Yes, I'm sure\" in the \"Are you sure?\" dialog"
450
+ tags = ['gitlab_blocking']
451
+ keywords = ['xapp-1-']
452
+
453
+ [[rules]]
454
+ id = 'StripeLiveSecretKey'
455
+ regex = '\bsk_live_[A-Za-z0-9]{99}\b'
456
+ description = "A Stripe live secret key was identified. Live secret keys authenticate requests on your server when in\nlive mode. By default, you can use this key to perform any API request without restriction. A malicious actor who gained\naccess to this key could gain read/write access to all data in Stripe for this account."
457
+ title = 'Stripe live secret key'
458
+ remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet).\n\nTo rotate your Stripe live secret key:\n\n- Sign in to your Stripe account and access <https://dashboard.stripe.com/apikeys>\n- Ensure \"Test mode\" is disabled\n- In the \"Standard keys\" section, find the key that was identified and select the ellipsis in the right-hand side\n- Select \"Roll key...\"\n- In the \"Roll API key\" dialog, select an expiration date, for example \"now\"\n- Select \"Roll API Key\"\n\nFor more information, please see [Stripe's documentation on rotating API keys](https://docs.stripe.com/keys#rolling-keys)."
459
+ tags = ['gitlab_blocking']
460
+ keywords = ['sk_live_']
461
+
462
+ [[rules]]
463
+ id = 'StripeLiveRestrictedKey'
464
+ regex = '\brk_live_[A-Za-z0-9]{99}\b'
465
+ description = "A Stripe live restricted key was identified. Restricted keys offer greater security by only allowing read or write\naccess to specific API resources. A malicious actor with access to this key is limited by the scope defined for the key."
466
+ title = 'Stripe live restricted key'
467
+ remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet).\n\nTo rotate your Stripe live restricted key:\n\n- Sign in to your Stripe account and access <https://dashboard.stripe.com/apikeys>\n- Ensure \"Test mode\" is disabled\n- In the \"Restricted keys\" section, find the key that was identified and select the ellipsis in the right-hand side\n- Select \"Roll key...\"\n- In the \"Roll API key\" dialog, select an expiration date, for example \"now\"\n- Select \"Roll API Key\"\n\nFor more information, please see [Stripe's documentation on rotating API keys](https://docs.stripe.com/keys#rolling-keys)."
468
+ tags = ['gitlab_blocking']
469
+ keywords = ['rk_live_']
470
+
471
+ [[rules]]
472
+ id = 'Twilio API Key'
473
+ regex = '\bSK[0-9a-fA-F]{32}\b'
474
+ description = 'Twilio API Key'
475
+ title = 'Twilio API key'
476
+ remediation = "For general guidance on handling security incidents with regards to leaked keys, please see the GitLab documentation on\n[Credential exposure to the internet](https://docs.gitlab.com/ee/security/responding_to_security_incidents.html#credential-exposure-to-public-internet)."
333
477
  tags = ['gitlab_blocking']
334
- keywords = ['sk_test', 'pk_test', 'sk_live', 'pk_live']
478
+ keywords = ['SK', 'twilio']
@@ -5,7 +5,7 @@ module Gitlab
5
5
  class Gem
6
6
  # Ensure to maintain the same version in CHANGELOG file.
7
7
  # More details available under 'Release Process' section in the README.md file.
8
- VERSION = "0.21.1"
8
+ VERSION = "0.29.1"
9
9
 
10
10
  # SD_ENV env var is used to determine which environment the
11
11
  # server is running. This var is defined in `.runway/env-<env>.yml` files.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-secret_detection
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.1
4
+ version: 0.29.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - group::secret detection
@@ -10,22 +10,28 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2025-04-01 00:00:00.000000000 Z
13
+ date: 2025-06-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: grpc
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - "~>"
19
+ - - ">="
20
20
  - !ruby/object:Gem::Version
21
- version: '1.63'
21
+ version: 1.63.0
22
+ - - "<"
23
+ - !ruby/object:Gem::Version
24
+ version: '2'
22
25
  type: :runtime
23
26
  prerelease: false
24
27
  version_requirements: !ruby/object:Gem::Requirement
25
28
  requirements:
26
- - - "~>"
29
+ - - ">="
27
30
  - !ruby/object:Gem::Version
28
- version: '1.63'
31
+ version: 1.63.0
32
+ - - "<"
33
+ - !ruby/object:Gem::Version
34
+ version: '2'
29
35
  - !ruby/object:Gem::Dependency
30
36
  name: grpc_reflection
31
37
  requirement: !ruby/object:Gem::Requirement
@@ -40,20 +46,6 @@ dependencies:
40
46
  - - "~>"
41
47
  - !ruby/object:Gem::Version
42
48
  version: '0.1'
43
- - !ruby/object:Gem::Dependency
44
- name: grpc-tools
45
- requirement: !ruby/object:Gem::Requirement
46
- requirements:
47
- - - "~>"
48
- - !ruby/object:Gem::Version
49
- version: '1.63'
50
- type: :runtime
51
- prerelease: false
52
- version_requirements: !ruby/object:Gem::Requirement
53
- requirements:
54
- - - "~>"
55
- - !ruby/object:Gem::Version
56
- version: '1.63'
57
49
  - !ruby/object:Gem::Dependency
58
50
  name: parallel
59
51
  requirement: !ruby/object:Gem::Requirement
@@ -124,6 +116,160 @@ dependencies:
124
116
  - - "~>"
125
117
  - !ruby/object:Gem::Version
126
118
  version: '2.2'
119
+ - !ruby/object:Gem::Dependency
120
+ name: benchmark-malloc
121
+ requirement: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - "~>"
124
+ - !ruby/object:Gem::Version
125
+ version: '0.2'
126
+ type: :development
127
+ prerelease: false
128
+ version_requirements: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - "~>"
131
+ - !ruby/object:Gem::Version
132
+ version: '0.2'
133
+ - !ruby/object:Gem::Dependency
134
+ name: gitlab-styles
135
+ requirement: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: 13.1.0
140
+ type: :development
141
+ prerelease: false
142
+ version_requirements: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - "~>"
145
+ - !ruby/object:Gem::Version
146
+ version: 13.1.0
147
+ - !ruby/object:Gem::Dependency
148
+ name: grpc-tools
149
+ requirement: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - "~>"
152
+ - !ruby/object:Gem::Version
153
+ version: '1.63'
154
+ type: :development
155
+ prerelease: false
156
+ version_requirements: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - "~>"
159
+ - !ruby/object:Gem::Version
160
+ version: '1.63'
161
+ - !ruby/object:Gem::Dependency
162
+ name: lefthook
163
+ requirement: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - "~>"
166
+ - !ruby/object:Gem::Version
167
+ version: '1.7'
168
+ type: :development
169
+ prerelease: false
170
+ version_requirements: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - "~>"
173
+ - !ruby/object:Gem::Version
174
+ version: '1.7'
175
+ - !ruby/object:Gem::Dependency
176
+ name: pry-byebug
177
+ requirement: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ type: :development
183
+ prerelease: false
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - ">="
187
+ - !ruby/object:Gem::Version
188
+ version: '0'
189
+ - !ruby/object:Gem::Dependency
190
+ name: rspec
191
+ requirement: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - "~>"
194
+ - !ruby/object:Gem::Version
195
+ version: '3.13'
196
+ type: :development
197
+ prerelease: false
198
+ version_requirements: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - "~>"
201
+ - !ruby/object:Gem::Version
202
+ version: '3.13'
203
+ - !ruby/object:Gem::Dependency
204
+ name: rspec-benchmark
205
+ requirement: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - "~>"
208
+ - !ruby/object:Gem::Version
209
+ version: 0.6.0
210
+ type: :development
211
+ prerelease: false
212
+ version_requirements: !ruby/object:Gem::Requirement
213
+ requirements:
214
+ - - "~>"
215
+ - !ruby/object:Gem::Version
216
+ version: 0.6.0
217
+ - !ruby/object:Gem::Dependency
218
+ name: rspec-parameterized
219
+ requirement: !ruby/object:Gem::Requirement
220
+ requirements:
221
+ - - "~>"
222
+ - !ruby/object:Gem::Version
223
+ version: '1.0'
224
+ type: :development
225
+ prerelease: false
226
+ version_requirements: !ruby/object:Gem::Requirement
227
+ requirements:
228
+ - - "~>"
229
+ - !ruby/object:Gem::Version
230
+ version: '1.0'
231
+ - !ruby/object:Gem::Dependency
232
+ name: rubocop
233
+ requirement: !ruby/object:Gem::Requirement
234
+ requirements:
235
+ - - ">="
236
+ - !ruby/object:Gem::Version
237
+ version: '0'
238
+ type: :development
239
+ prerelease: false
240
+ version_requirements: !ruby/object:Gem::Requirement
241
+ requirements:
242
+ - - ">="
243
+ - !ruby/object:Gem::Version
244
+ version: '0'
245
+ - !ruby/object:Gem::Dependency
246
+ name: rubocop-rspec
247
+ requirement: !ruby/object:Gem::Requirement
248
+ requirements:
249
+ - - ">="
250
+ - !ruby/object:Gem::Version
251
+ version: '0'
252
+ type: :development
253
+ prerelease: false
254
+ version_requirements: !ruby/object:Gem::Requirement
255
+ requirements:
256
+ - - ">="
257
+ - !ruby/object:Gem::Version
258
+ version: '0'
259
+ - !ruby/object:Gem::Dependency
260
+ name: simplecov
261
+ requirement: !ruby/object:Gem::Requirement
262
+ requirements:
263
+ - - ">="
264
+ - !ruby/object:Gem::Version
265
+ version: '0'
266
+ type: :development
267
+ prerelease: false
268
+ version_requirements: !ruby/object:Gem::Requirement
269
+ requirements:
270
+ - - ">="
271
+ - !ruby/object:Gem::Version
272
+ version: '0'
127
273
  description: |-
128
274
  GitLab Secret Detection gem accepts text-based payloads, matches them against predefined secret
129
275
  detection rules (based on the ruleset used by GitLab Secrets analyzer), and returns the scan results. The gem also
@@ -183,7 +329,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
329
  - !ruby/object:Gem::Version
184
330
  version: '0'
185
331
  requirements: []
186
- rubygems_version: 3.4.19
332
+ rubygems_version: 3.5.22
187
333
  signing_key:
188
334
  specification_version: 4
189
335
  summary: GitLab Secret Detection gem scans for the secret leaks in the given text-based