mirror of
https://github.com/Jeuners/ECC.git
synced 2026-09-18 02:56:11 +02:00
Revert "feat(ecc): prune plugin 43→12 items, promote 7 rules to .claude/rules/ (#245)"
This reverts commit 1bd68ff534.
This commit is contained in:
parent
1bd68ff534
commit
0e9f613fd1
536 changed files with 111479 additions and 253 deletions
25
docs/zh-CN/rules/python/security.md
Normal file
25
docs/zh-CN/rules/python/security.md
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# Python 安全
|
||||
|
||||
> 本文档基于 [通用安全指南](../common/security.md) 扩展,补充了 Python 相关的内容。
|
||||
|
||||
## 密钥管理
|
||||
|
||||
```python
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
api_key = os.environ["OPENAI_API_KEY"] # Raises KeyError if missing
|
||||
```
|
||||
|
||||
## 安全扫描
|
||||
|
||||
* 使用 **bandit** 进行静态安全分析:
|
||||
```bash
|
||||
bandit -r src/
|
||||
```
|
||||
|
||||
## 参考
|
||||
|
||||
查看技能:`django-security` 以获取 Django 特定的安全指南(如适用)。
|
||||
Loading…
Add table
Add a link
Reference in a new issue