用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Objective-Arts/lens-dist --skill web-security命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | web-security |
| description | Pragmatic web security, password handling, breach response, HTTPS |
Applying real-world security wisdom to authentication, password handling, breach response, and web application hardening. Use when implementing login systems, password storage, security headers, HTTPS configuration, or responding to security incidents. Not for theoretical security research, compliance documentation, or penetration testing methodology.
Security that ships beats perfect security that doesn't. Users will find workarounds for inconvenient security. Attackers exploit the weakest link, not the strongest defense. Assume breach - design for detection and containment.
NEVER: MD5, SHA1, SHA256 alone, encryption (reversible)
ALWAYS: bcrypt, scrypt, or Argon2id with appropriate work factors
bcrypt: cost 12+ (2024 baseline)
Argon2id: memory 64MB+, iterations 3+, parallelism 1
DO:
DON'T:
# HSTS - commit to HTTPS
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
# Redirect all HTTP to HTTPS
server {
listen 80;
return 301 https://$host$request_uri;
}
# TLS configuration
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256;
ssl_prefer_server_ciphers off;
add_header X-Frame-Options "DENY" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Content-Security-Policy "default-src 'self';" always;
add_header Permissions-Policy "geolocation=(), microphone=(), camera=()" always;
const sessionToken = crypto.randomBytes(32).toString('hex');
res.cookie('session', sessionToken, {
httpOnly: true,
secure: true,
sameSite: 'strict',
maxAge: 3600000,
path: '/'
});
// Account enumeration prevention
async function login(username, password) {
const user = await findUser(username);
// Always hash even if user not found (timing attack prevention)
const passwordToCheck = user?.passwordHash || '$2b$12$dummy.hash.for.timing';
const valid = await bcrypt.compare(password, passwordToCheck);
if (!user || !valid) {
return { error: 'Invalid username or password' }; // Generic message
}
return { success: true, user };
}
"HTTPS everywhere is easier than deciding where" - Just encrypt everything
"Passwords are a UX problem, not a security problem" - Long > complex, managers > memory
"Security through obscurity is no security at all" - Assume attackers know your stack
"The best security is the security that ships" - Incremental improvement beats paralysis
"Design for breach" - Assume you will be breached, limit blast radius
NEVER: