Skip to content

Commit f449146

Browse files
am-steadsubatoierinhav
authored
Add "multi-part secrets" section to "Supported secret scanning patterns" article (#57088)
Co-authored-by: Ben Ahmady <[email protected]> Co-authored-by: Erin Havens <[email protected]>
1 parent 270fc3b commit f449146

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,18 @@ In addition to these generic non-provider patterns, {% data variables.product.pr
101101

102102
Service providers update the patterns used to generate tokens periodically and may support more than one version of a token. Push protection only supports the most recent token versions that {% data variables.product.prodname_secret_scanning %} can identify with confidence. This avoids push protection blocking commits unnecessarily when a result may be a false positive, which is more likely to happen with legacy tokens.<!-- markdownlint-disable-line MD053 -->
103103

104+
#### Multi-part secrets
105+
106+
<a name="multi-part-secrets"></a>
107+
108+
By default, {% data variables.product.prodname_secret_scanning %} supports validation for pair-matched access keys and key IDs.
109+
110+
{% data variables.product.prodname_secret_scanning_caps %} also supports validation for individual key IDs for Amazon AWS Access Key IDs, in addition to existing pair matching.
111+
112+
A key ID will show as active if {% data variables.product.prodname_secret_scanning %} confirms the key ID exists, regardless of whether or not a corresponding access key is found. The key ID will show as `inactive` if it's invalid (for example, if it is not a real key ID).
113+
114+
Where a valid pair is found, the {% data variables.product.prodname_secret_scanning %} alerts will be linked.<!-- markdownlint-disable-line MD053 -->
115+
104116
## Further reading
105117

106118
* [AUTOTITLE](/code-security/secret-scanning/managing-alerts-from-secret-scanning/about-alerts)

src/secret-scanning/data/public-docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@
199199
isPrivateWithGhas: true
200200
hasPushProtection: true
201201
hasValidityCheck: '{% ifversion fpt or ghes %}false{% else %}true{% endif %}'
202+
ismultipart: true
202203
base64Supported: false
203204
isduplicate: false
204205
- provider: Amazon AWS

src/secret-scanning/middleware/secret-scanning.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ export default async function secretScanning(
4646
if (entry.isduplicate) {
4747
entry.secretType += ' <br/><a href="#token-versions">Token versions</a>'
4848
}
49+
if (entry.ismultipart) {
50+
entry.secretType += ' <br/><a href="#multi-part-secrets">Multi-part secrets</a>'
51+
}
4952
})
5053

5154
return next()

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+
ismultipart?: boolean
314315
base64Supported: boolean
315316
isduplicate: boolean
316317
}

0 commit comments

Comments
 (0)