Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/.secretlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"rules": [
{
"id": "@secretlint/secretlint-rule-preset-recommend"
},
{
"id": "@secretlint/secretlint-rule-pattern",
"options": {
"patterns": [
{
"name": "Zhipu AI API Key",
"pattern": "/[a-f0-9]{32}\\.[a-zA-Z0-9]{16,}/g",
"message": "Found a potential Zhipu AI API Key"
},
{
"name": "Some Cloud Vendor Secret Key",
"pattern": "/secret-[a-zA-Z0-9]{40}/g",
"message": "Found a potential Some Cloud Vendor Secret Key"
},
{
"name": "Some Map Service Access Token",
"pattern": "/token-[a-f0-9]{24}-[a-f0-9]{12}/g",
"message": "Found a potential Some Map Service Access Token"
},
{
"name": "Qwen API Key",
"pattern": "/sk-[a-f0-9]{32}/g",
"message": "Found a potential Qwen API Key"
}
]
}
}
]
}

19 changes: 19 additions & 0 deletions .github/workflows/secretlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Secretlint
on: [push, pull_request]
permissions:
contents: read
jobs:
test:
name: "Secretlint"
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install
run: npm ci
- name: Lint with Secretlint
run: npx secretlint --secretlintrc ./.github/.secretlintrc.json "**/*"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,5 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

translations/*
translations/*
node_modules/*
Loading