Skip to content
Back to skills

Bk Security Redlines

ASecurity

<!-- BKUI-KNOWLEDGE-MANAGED:2e279de905d0 --> --- id: security/bk-security-redlines name: 蓝鲸代码安全三大红线 category: security description: 基于 IEG 安全规范,覆盖输入校验、鉴权、数据加密三大高危领域 tags: [security, input-validation, auth, encryption, redlines] updated_at: 2026-01-23 ---

  • 839 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 4, 2026
devopsgosqlsecurity

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned September 4, 2026

npx -y skills add TencentBlueKing/bk-bcs --skill bk-security-redlines --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bk Security Redlines?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bk Security Redlines
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tencentblueking-bk-security-redlines-bk-bcs/badge)](https://www.skillsdirectory.com/skills/tencentblueking-bk-security-redlines-bk-bcs)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
<!-- BKUI-KNOWLEDGE-MANAGED:2e279de905d0 -->
---
id: security/bk-security-redlines
name: 蓝鲸代码安全三大红线
category: security
description: 基于 IEG 安全规范,覆盖输入校验、鉴权、数据加密三大高危领域
tags: [security, input-validation, auth, encryption, redlines]
updated_at: 2026-01-23
---

# 蓝鲸代码安全三大红线

## ⚠️ 核心规则

### 红线 1:外部输入未校验

外部输入进入**高危操作**前,必须完成**服务端强约束校验**(类型/长度/格式/白名单),不可绕过。

**高危操作**:命令执行、模板解释/eval、文件路径、请求目标、SQL/NoSQL 构造、渲染解析、协议输出

### 红线 2:敏感接口未鉴权

高危能力或敏感资源接口必须同时实施**身份认证 + 权限校验**,缺一即违规。

**禁止**:接口无认证、仅登录不校验权限、依赖前端字段/URL/IP 判权、服务间调用无鉴权

### 红线 3:敏感数据未加密

敏感数据(密码/Token/AKSK/私钥/PII)在存储、传输、日志、导出任一环节保护不当即违规。

**禁止**:硬编码凭证、明文存储、异常回显细节、日志记录敏感字段、URL 携带 token

## 常见错误

| 错误做法 | 正确做法 |
|---------|---------|
| ❌ 仅前端/网关校验 | ✅ 服务端强约束校验 |
| ❌ 仅判空/黑名单 | ✅ 白名单 + 类型/长度/格式 |
| ❌ 内网可达即放通 | ✅ 服务间调用也需鉴权 |
| ❌ 日志记录完整请求 | ✅ 脱敏后记录 |

## 📦 按需加载资源

| 资源 | URI | 说明 |
|-----|-----|------|
| 输入校验详解 | `./references/input-validation.md` | 7 类高危操作场景 |
| 鉴权检查详解 | `./references/auth-check.md` | 8 类鉴权缺失场景 |
| 数据加密详解 | `./references/data-encryption.md` | 8 类加密缺失场景 |


---
## 📦 可用资源

- `./references/auth-check.md`
- `./references/data-encryption.md`
- `./references/input-validation.md`

> 根据 SKILL.md 中的 IF-THEN 规则判断是否需要加载

Files in this skill

  • SKILL.md2 KB
  • references/auth-check.md1.4 KB
  • references/data-encryption.md1.8 KB
  • references/input-validation.md2.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in devops →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.