-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): synchronize to
a66e450
(#1083)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
a043e4b
commit 1aa6c12
Showing
8 changed files
with
156 additions
and
88 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
# Don't modify this file manually. This file is auto generated from source, and you will lose your changes next time the website is built. | ||
# Head to the `biomejs/biome` repository, and modify the source code in there. | ||
|
||
title: noSecrets | ||
description: | | ||
Disallow usage of sensitive data such as API keys and tokens. | ||
--- | ||
import { Tabs, TabItem } from '@astrojs/starlight/components'; | ||
|
||
**Diagnostic Category: `lint/nursery/noSecrets`** | ||
<Tabs> | ||
<TabItem label="JavaScript (and super languages)" icon="seti:javascript"> | ||
**Since**: `vnext` | ||
:::caution | ||
This rule is part of the [nursery](/linter/rules/#nursery) group. | ||
::: | ||
|
||
Sources: | ||
- Inspired from: <a href="https://eslint.org/docs/latest/rules/no-secrets/no-secrets" target="_blank"><code>no-secrets/no-secrets</code></a> | ||
|
||
Disallow usage of sensitive data such as API keys and tokens. | ||
|
||
This rule checks for high-entropy strings and matches common patterns | ||
for secrets, such as AWS keys, Slack tokens, and private keys. | ||
|
||
While this rule is helpful, it's not infallible. Always review your code carefully and consider implementing additional security measures like automated secret scanning in your CI/CD and git pipeline, such as GitGuardian or GitHub protections. | ||
|
||
## Examples | ||
|
||
### Invalid | ||
|
||
```js | ||
const secret = "AKIA1234567890EXAMPLE"; | ||
``` | ||
|
||
<pre class="language-text"><code class="language-text">code-block.js:1:16 <a href="https://biomejs.dev/linter/rules/no-secrets">lint/nursery/noSecrets</a> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━<br /><br /> <strong><span style="color: Orange;">⚠</span></strong> <span style="color: Orange;">Potential secret found.</span><br /> <br /> <strong><span style="color: Tomato;">></span></strong> <strong>1 │ </strong>const secret = "AKIA1234567890EXAMPLE";<br /> <strong> │ </strong> <strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><br /> <strong>2 │ </strong><br /> <br /> <strong><span style="color: lightgreen;">ℹ</span></strong> <span style="color: lightgreen;">Type of secret detected: AWS API Key</span><br /> <br /> <strong><span style="color: lightgreen;">ℹ</span></strong> <span style="color: lightgreen;">Storing secrets in source code is a security risk. Consider the following steps:<br /></span> <span style="color: lightgreen;">1. Remove the secret from your code. If you've already committed it, consider removing the commit entirely from your git tree.<br /></span> <span style="color: lightgreen;">2. If needed, use environment variables or a secure secret management system to store sensitive data.<br /></span> <span style="color: lightgreen;">3. If this is a false positive, consider adding an inline disable comment.</span><br /> <br /></code></pre> | ||
|
||
### Valid | ||
|
||
```js | ||
const nonSecret = "hello world"; | ||
``` | ||
|
||
## Related links | ||
|
||
- [Disable a rule](/linter/#disable-a-lint-rule) | ||
- [Configure the rule fix](/linter#configure-the-rule-fix) | ||
- [Rule options](/linter/#rule-options) | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.