@secretlint/secretlint-rule-notion
v13.0.2
Published
A secretlint rule for detecting Notion integration tokens
Maintainers
Readme
@secretlint/secretlint-rule-notion
A rule for detecting Notion integration tokens in your code.
This rule detects the new token format (ntn_ prefix) introduced by Notion in September 2024.
The legacy secret_ prefix is intentionally not detected because it is too generic and
prone to false positives.
Notion warns that the token format may change in the future, so this rule may need to be updated when a new format is introduced.
Install
Install with npm:
npm install @secretlint/secretlint-rule-notionUsage
Via .secretlintrc.json(Recommended)
{
"rules": [
{
"id": "@secretlint/secretlint-rule-notion"
}
]
}MessageIDs
NOTION_INTEGRATION_TOKEN
Notion integration token is detected.
NG examples:
NOTION_TOKEN=ntn_12345678901aBcDeFgHiJkLmNoPqRsT1234567890abcdeOK examples:
ntn_abc
secret_abc123Options
allows: string[]- Allows a list of RegExp-like String
References
Changelog
See Releases page.
Running tests
npm testContributing
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
License
MIT © azu
