Senior SecOps Engineer
Complete toolkit for Security Operations including vulnerability management, compliance verification, secure coding practices, and security automation.
Table of Contents
Core Capabilities
1. Security Scanner
Scan source code for security vulnerabilities including hardcoded secrets, SQL injection, XSS, command injection, and path traversal.
CODEBLOCK0
Detects:
- - Hardcoded secrets (API keys, passwords, AWS credentials, GitHub tokens, private keys)
- SQL injection patterns (string concatenation, f-strings, template literals)
- XSS vulnerabilities (innerHTML assignment, unsafe DOM manipulation, React unsafe patterns)
- Command injection (shell=True, exec, eval with user input)
- Path traversal (file operations with user input)
2. Vulnerability Assessor
Scan dependencies for known CVEs across npm, Python, and Go ecosystems.
CODEBLOCK1
Scans:
- -
package.json and package-lock.json (npm) - INLINECODE2 and
pyproject.toml (Python) - INLINECODE4 (Go)
Output:
- - CVE IDs with CVSS scores
- Affected package versions
- Fixed versions for remediation
- Overall risk score (0-100)
3. Compliance Checker
Verify security compliance against SOC 2, PCI-DSS, HIPAA, and GDPR frameworks.
CODEBLOCK2
Verifies:
- - Access control implementation
- Encryption at rest and in transit
- Audit logging
- Authentication strength (MFA, password hashing)
- Security documentation
- CI/CD security controls
Workflows
Workflow 1: Security Audit
Complete security assessment of a codebase.
CODEBLOCK3
CODEBLOCK4
CODEBLOCK5
CODEBLOCK6
Workflow 2: CI/CD Security Gate
Integrate security checks into deployment pipeline.
CODEBLOCK7
Each step fails the pipeline on its respective exit code — no deployment proceeds past a critical finding.
Workflow 3: CVE Triage
Respond to a new CVE affecting your application.
CODEBLOCK8
Workflow 4: Incident Response
Security incident handling procedure.
CODEBLOCK9
Tool Reference
security_scanner.py
| Option | Description |
|---|
| INLINECODE5 | Directory or file to scan |
| INLINECODE6 |
Minimum severity: critical, high, medium, low |
|
--verbose, -v | Show files as they're scanned |
|
--json | Output results as JSON |
|
--output, -o | Write results to file |
Exit Codes: 0 = no critical/high findings · 1 = high severity findings · 2 = critical severity findings
vulnerability_assessor.py
| Option | Description |
|---|
| INLINECODE13 | Directory containing dependency files |
| INLINECODE14 |
Minimum severity: critical, high, medium, low |
|
--verbose, -v | Show files as they're scanned |
|
--json | Output results as JSON |
|
--output, -o | Write results to file |
Exit Codes: 0 = no critical/high vulnerabilities · 1 = high severity vulnerabilities · 2 = critical severity vulnerabilities
compliance_checker.py
| Option | Description |
|---|
| INLINECODE21 | Directory to check |
| INLINECODE22 |
Framework: soc2, pci-dss, hipaa, gdpr, all |
|
--verbose, -v | Show checks as they run |
|
--json | Output results as JSON |
|
--output, -o | Write results to file |
Exit Codes: 0 = compliant (90%+ score) · 1 = non-compliant (50-69% score) · 2 = critical gaps (<50% score)
Security Standards
See references/security_standards.md for OWASP Top 10 full guidance, secure coding standards, authentication requirements, and API security controls.
Secure Coding Checklist
CODEBLOCK10
Compliance Frameworks
See references/compliance_requirements.md for full control mappings. Run compliance_checker.py to verify the controls below:
SOC 2 Type II
- - CC6 Logical Access: authentication, authorization, MFA
- CC7 System Operations: monitoring, logging, incident response
- CC8 Change Management: CI/CD, code review, deployment controls
PCI-DSS v4.0
- - Req 3/4: Encryption at rest and in transit (TLS 1.2+)
- Req 6: Secure development (input validation, secure coding)
- Req 8: Strong authentication (MFA, password policy)
- Req 10/11: Audit logging, SAST/DAST/penetration testing
HIPAA Security Rule
- - Unique user IDs and audit trails for PHI access (164.312(a)(1), 164.312(b))
- MFA for person/entity authentication (164.312(d))
- Transmission encryption via TLS (164.312(e)(1))
GDPR
- - Art 25/32: Privacy by design, encryption, pseudonymization
- Art 33: Breach notification within 72 hours
- Art 17/20: Right to erasure and data portability
Best Practices
Secrets Management
CODEBLOCK11
SQL Injection Prevention
CODEBLOCK12
XSS Prevention
CODEBLOCK13
Authentication
CODEBLOCK14
Security Headers
CODEBLOCK15
Reference Documentation
| Document | Description |
|---|
| INLINECODE32 | OWASP Top 10, secure coding, authentication, API security |
| INLINECODE33 |
CVE triage, CVSS scoring, remediation workflows |
|
references/compliance_requirements.md | SOC 2, PCI-DSS, HIPAA, GDPR full control mappings |
高级安全运维工程师
安全运维的完整工具包,包括漏洞管理、合规性验证、安全编码实践和安全自动化。
目录
核心能力
1. 安全扫描器
扫描源代码中的安全漏洞,包括硬编码密钥、SQL注入、XSS、命令注入和路径遍历。
bash
扫描项目的安全问题
python scripts/security_scanner.py /path/to/project
按严重级别过滤
python scripts/security_scanner.py /path/to/project --severity high
输出JSON格式用于CI/CD
python scripts/security_scanner.py /path/to/project --json --output report.json
检测项:
- - 硬编码密钥(API密钥、密码、AWS凭证、GitHub令牌、私钥)
- SQL注入模式(字符串拼接、f-string、模板字面量)
- XSS漏洞(innerHTML赋值、不安全的DOM操作、React不安全模式)
- 命令注入(shell=True、exec、eval与用户输入)
- 路径遍历(涉及用户输入的文件操作)
2. 漏洞评估器
扫描npm、Python和Go生态系统中依赖项的已知CVE。
bash
评估项目依赖项
python scripts/vulnerability_assessor.py /path/to/project
仅关键/高风险
python scripts/vulnerability_assessor.py /path/to/project --severity high
导出漏洞报告
python scripts/vulnerability_assessor.py /path/to/project --json --output vulns.json
扫描对象:
- - package.json 和 package-lock.json(npm)
- requirements.txt 和 pyproject.toml(Python)
- go.mod(Go)
输出内容:
- - 带有CVSS评分的CVE ID
- 受影响的包版本
- 修复版本
- 总体风险评分(0-100)
3. 合规性检查器
验证安全合规性,涵盖SOC 2、PCI-DSS、HIPAA和GDPR框架。
bash
检查所有框架
python scripts/compliance_checker.py /path/to/project
特定框架
python scripts/compliance_checker.py /path/to/project --framework soc2
python scripts/compliance_checker.py /path/to/project --framework pci-dss
python scripts/compliance_checker.py /path/to/project --framework hipaa
python scripts/compliance_checker.py /path/to/project --framework gdpr
导出合规性报告
python scripts/compliance_checker.py /path/to/project --json --output compliance.json
验证项:
- - 访问控制实现
- 静态和传输中加密
- 审计日志
- 认证强度(MFA、密码哈希)
- 安全文档
- CI/CD安全控制
工作流程
工作流程1:安全审计
对代码库进行完整的安全评估。
bash
步骤1:扫描代码漏洞
python scripts/security_scanner.py . --severity medium
如果退出码为2则停止——在继续前解决关键发现
bash
步骤2:检查依赖项漏洞
python scripts/vulnerability_assessor.py . --severity high
如果退出码为2则停止——在继续前修补关键CVE
bash
步骤3:验证合规性控制
python scripts/compliance_checker.py . --framework all
如果退出码为2则停止——在继续前解决关键差距
bash
步骤4:生成综合报告
python scripts/security_scanner.py . --json --output security.json
python scripts/vulnerability_assessor.py . --json --output vulns.json
python scripts/compliance_checker.py . --json --output compliance.json
工作流程2:CI/CD安全门禁
将安全检查集成到部署流水线中。
yaml
.github/workflows/security.yml
name: security-scan
on:
pull_request:
branches: [main, develop]
jobs:
security-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set-up-python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: security-scanner
run: python scripts/security_scanner.py . --severity high
- name: vulnerability-assessment
run: python scripts/vulnerability_assessor.py . --severity critical
- name: compliance-check
run: python scripts/compliance_checker.py . --framework soc2
每个步骤根据其退出码使流水线失败——在关键发现未解决前不允许部署。
工作流程3:CVE分类处理
响应影响应用程序的新CVE。
- 1. 评估(0-2小时)
- 使用vulnerability_assessor.py识别受影响的系统
- 检查CVE是否正在被积极利用
- 确定针对您环境的CVSS环境评分
- 如果面向互联网的系统CVSS 9.0+则停止——立即升级
- 2. 优先级排序
- 关键(CVSS 9.0+,面向互联网):24小时
- 高(CVSS 7.0-8.9):7天
- 中(CVSS 4.0-6.9):30天
- 低(CVSS < 4.0):90天
- 3. 修复
- 将受影响的依赖项更新到修复版本
- 运行security_scanner.py验证修复(必须返回退出码0)
- 如果扫描器仍标记该CVE则停止——不要部署
- 测试回归问题
- 部署并加强监控
- 4. 验证
- 重新运行vulnerability_assessor.py
- 确认CVE不再报告
- 记录修复操作
工作流程4:事件响应
安全事件处理流程。
阶段1:检测与识别(0-15分钟)
- - 接收并确认告警
- 初始严重性评估(SEV-1至SEV-4)
- 指定事件指挥官
- 建立沟通渠道
阶段2:遏制(15-60分钟)
- - 识别受影响的系统
- 必要时进行网络隔离
- 如果凭证泄露则轮换
- 保留证据(日志、内存转储)
阶段3:清除(1-4小时)
- - 识别根本原因
- 移除恶意软件/后门
- 修补漏洞(运行security_scanner.py;必须返回退出码0)
- 加固系统
阶段4:恢复(4-24小时)
- - 从干净备份恢复系统
- 恢复服务上线
- 启用增强监控
- 恢复用户访问
阶段5:事后处理(24-72小时)
- - 记录事件时间线
- 完成根本原因分析
- 记录经验教训
- 实施预防措施
- 向利益相关者提交报告
工具参考
security_scanner.py
| 选项 | 描述 |
|---|
| target | 要扫描的目录或文件 |
| --severity, -s |
最低严重级别:critical, high, medium, low |
| --verbose, -v | 显示正在扫描的文件 |
| --json | 以JSON格式输出结果 |
| --output, -o | 将结果写入文件 |
退出码: 0 = 无关键/高风险发现 · 1 = 高风险发现 · 2 = 关键风险发现
vulnerability_assessor.py
| 选项 | 描述 |
|---|
| target | 包含依赖项文件的目录 |
| --severity, -s |
最低严重级别:critical, high, medium, low |
| --verbose, -v | 显示正在扫描的文件 |
| --json | 以JSON格式输出结果 |
| --output, -o | 将结果写入文件 |
退出码: 0 = 无关键/高风险漏洞 · 1 = 高风险漏洞 · 2 = 关键风险漏洞
compliance_checker.py
| 选项 | 描述 |
|---|
| target | 要检查的目录 |
| --framework, -f |
框架:soc2, pci-dss, hipaa, gdpr, all |
| --verbose, -v | 显示正在运行的检查项 |
| --json | 以JSON格式输出结果 |
| --output, -o | 将结果写入文件 |
退出码: 0 = 合规(90%+评分) · 1 = 不合规