Skip to content

Commit bc78d24

Browse files
authored
Add base64 field to secret scanning pattern docs (#57217)
1 parent 8cdf15a commit bc78d24

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

content/code-security/secret-scanning/introduction/supported-secret-scanning-patterns.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,21 @@ In addition to these generic non-provider patterns, {% data variables.product.pr
7676
> [!NOTE]
7777
> Validity checks are only available to users with {% data variables.product.prodname_team %} or {% data variables.product.prodname_enterprise %} who enable the feature as part of {% data variables.product.prodname_GH_secret_protection %}.
7878
79-
| Provider | Token | Partner | User | Push protection | Validity check |
80-
|----|:----|:----:|:----:|:----:|:----:|
79+
| Provider | Token | Partner | User | Push protection | Validity check | Base 64 |
80+
|----|:----|:----:|:----:|:----:|:----:|:----:|
8181
{%- for entry in secretScanningData %}
82-
| {{ entry.provider }} | {{ entry.secretType }} | {% if entry.isPublic %}<span role="img" class="octicon-bg-check" aria-label="Supported">✓</span>{% else %}<span role="img" class="octicon-bg-x" aria-label="Unsupported">✗</span>{% endif %} | {% if entry.isPrivateWithGhas %}<span role="img" class="octicon-bg-check" aria-label="Supported">✓</span>{% else %}<span role="img" class="octicon-bg-x" aria-label="Unsupported">✗</span>{% endif %} | {% if entry.hasPushProtection %}<span role="img" class="octicon-bg-check" aria-label="Supported">✓</span>{% else %}<span role="img" class="octicon-bg-x" aria-label="Unsupported">✗</span>{% endif %} | {% if entry.hasValidityCheck %}<span role="img" class="octicon-bg-check" aria-label="Supported">✓</span>{% else %}<span role="img" class="octicon-bg-x" aria-label="Unsupported">✗</span>{% endif %} |
82+
| {{ entry.provider }} | {{ entry.secretType }} | {% if entry.isPublic %}<span role="img" class="octicon-bg-check" aria-label="Supported">✓</span>{% else %}<span role="img" class="octicon-bg-x" aria-label="Unsupported">✗</span>{% endif %} | {% if entry.isPrivateWithGhas %}<span role="img" class="octicon-bg-check" aria-label="Supported">✓</span>{% else %}<span role="img" class="octicon-bg-x" aria-label="Unsupported">✗</span>{% endif %} | {% if entry.hasPushProtection %}<span role="img" class="octicon-bg-check" aria-label="Supported">✓</span>{% else %}<span role="img" class="octicon-bg-x" aria-label="Unsupported">✗</span>{% endif %} | {% if entry.hasValidityCheck %}<span role="img" class="octicon-bg-check" aria-label="Supported">✓</span>{% else %}<span role="img" class="octicon-bg-x" aria-label="Unsupported">✗</span>{% endif %} | {% if entry.base64Supported %}<span role="img" class="octicon-bg-check" aria-label="Supported">✓</span>{% else %}<span role="img" class="octicon-bg-x" aria-label="Unsupported">✗</span>{% endif %} |
8383
{%- endfor %}
8484

8585
{% endif %}
8686

8787
<!-- GHES 3.9+ table -->
8888
{% ifversion ghes %}
8989

90-
| Provider | Token | {% data variables.product.prodname_secret_scanning_caps %} alert | Push protection | Validity check |
91-
|----|:----|:----:|:----:|:----:|
90+
| Provider | Token | {% data variables.product.prodname_secret_scanning_caps %} alert | Push protection | Validity check | Base64 |
91+
|----|:----|:----:|:----:|:----:|:----:|
9292
{%- for entry in secretScanningData %}
93-
| {{ entry.provider }} | {{ entry.secretType }} | {% if entry.isPrivateWithGhas %}<span role="img" class="octicon-bg-check" aria-label="Supported">✓</span>{% else %}<span role="img" class="octicon-bg-x" aria-label="Unsupported">✗</span>{% endif %} | {% if entry.hasPushProtection %}<span role="img" class="octicon-bg-check" aria-label="Supported">✓</span>{% else %}<span role="img" class="octicon-bg-x" aria-label="Unsupported">✗</span>{% endif %} | {% if entry.hasValidityCheck %}<span role="img" class="octicon-bg-check" aria-label="Supported">✓</span>{% else %}<span role="img" class="octicon-bg-x" aria-label="Unsupported">✗</span>{% endif %} |
93+
| {{ entry.provider }} | {{ entry.secretType }} | {% if entry.isPrivateWithGhas %}<span role="img" class="octicon-bg-check" aria-label="Supported">✓</span>{% else %}<span role="img" class="octicon-bg-x" aria-label="Unsupported">✗</span>{% endif %} | {% if entry.hasPushProtection %}<span role="img" class="octicon-bg-check" aria-label="Supported">✓</span>{% else %}<span role="img" class="octicon-bg-x" aria-label="Unsupported">✗</span>{% endif %} | {% if entry.hasValidityCheck %}<span role="img" class="octicon-bg-check" aria-label="Supported">✓</span>{% else %}<span role="img" class="octicon-bg-x" aria-label="Unsupported">✗</span>{% endif %} | {% if entry.base64Supported %}<span role="img" class="octicon-bg-check" aria-label="Supported">✓</span>{% else %}<span role="img" class="octicon-bg-x" aria-label="Unsupported">✗</span>{% endif %} |
9494
{%- endfor %}
9595

9696
{% endif %}

src/secret-scanning/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ This pipeline uses middleware to check if the path of the URL matches the page t
1010
<!-- FPT version of table -->
1111
{% ifversion fpt %}
1212

13-
| Provider | Token | Partner | User | Push protection
13+
| Provider | Token | Partner | User | Push protection | Base 64 |
1414
|----|:----|:----:|:----:|:----:|
1515
{%- for entry in secretScanningData %}
16-
| {{ entry.provider }} | {{ entry.secretType }} | {% if entry.isPublic %}{% octicon "check" aria-label="Supported" %}{% else %}{% octicon "x" aria-label="Unsupported" %}{% endif %} | {% if entry.isPrivateWithGhas %}{% octicon "check" aria-label="Supported" %}{% else %}{% octicon "x" aria-label="Unsupported" %}{% endif %} | {% if entry.hasPushProtection %}{% octicon "check" aria-label="Supported" %}{% else %}{% octicon "x" aria-label="Unsupported" %}{% endif %} |
16+
| {{ entry.provider }} | {{ entry.secretType }} | {% if entry.isPublic %}{% octicon "check" aria-label="Supported" %}{% else %}{% octicon "x" aria-label="Unsupported" %}{% endif %} | {% if entry.isPrivateWithGhas %}{% octicon "check" aria-label="Supported" %}{% else %}{% octicon "x" aria-label="Unsupported" %}{% endif %} | {% if entry.hasPushProtection %}{% octicon "check" aria-label="Supported" %}{% else %}{% octicon "x" aria-label="Unsupported" %}{% endif %} | {% if entry.base64Supported %}{% octicon "check" aria-label="Supported" %}{% else %}{% octicon "x" aria-label="Unsupported" %}{% endif %} |
1717
{%- endfor %}
1818
```

src/secret-scanning/data/public-docs-schema.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ const versionsProps = Object.assign({}, (schema.properties as Record<string, any
1818
// "isPublic": true,
1919
// "isPrivateWithGhas": true,
2020
// "hasPushProtection": false,
21-
// "hasValidityCheck": false
21+
// "hasValidityCheck": false,
22+
// "base64Supported": false,
23+
// "isduplicate": false,
2224
// },
2325

2426
export interface SecretScanningEntry {
@@ -30,6 +32,7 @@ export interface SecretScanningEntry {
3032
isPrivateWithGhas: boolean | string
3133
hasPushProtection: boolean | string
3234
hasValidityCheck: boolean | string
35+
base64Supported: boolean | string
3336
isduplicate: boolean
3437
}
3538

@@ -47,6 +50,7 @@ export default {
4750
'isPrivateWithGhas',
4851
'hasPushProtection',
4952
'hasValidityCheck',
53+
'base64Supported',
5054
'isduplicate',
5155
],
5256
properties: {
@@ -80,6 +84,10 @@ export default {
8084
description: 'whether the secret has its validation status checked',
8185
type: ['boolean', 'string'],
8286
},
87+
base64Supported: {
88+
description: 'whether scanning for base64-encoded versions of this type is supported',
89+
type: ['boolean', 'string'],
90+
},
8391
isduplicate: {
8492
description:
8593
'whether the token has more than one version, meaning there is more than one token description with the same token key',

src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ export type SecretScanningData = {
311311
isPrivateWithGhas: boolean
312312
hasPushProtection: boolean
313313
hasValidityCheck: boolean | string
314+
base64Supported: boolean
314315
isduplicate: boolean
315316
}
316317

0 commit comments

Comments
 (0)