来源信息
- 仓库
- pluginagentmarketplace/custom-plugin-ai-red-teaming
- 最近来源活动
- 2025年12月30日 11:42
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 3
- 分支
- 0
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
菜单
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-ai-red-teaming --skill secure-deployment命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
CI/CD integration and automation frameworks for continuous AI security testing
Standard datasets and benchmarks for evaluating AI security, robustness, and safety
Professional certifications, CTF competitions, and training resources for AI security practitioners
正在显示 SKILL.md
基于 SOC 职业分类
| name | secure-deployment |
| version | 2.0.0 |
| description | Security best practices for deploying AI/ML models to production environments |
| sasmp_version | 1.3.0 |
| bonded_agent | 06-api-security-tester |
| bond_type | SECONDARY_BOND |
| input_schema | {"type":"object","required":["deployment_stage"],"properties":{"deployment_stage":{"type":"string","enum":["pre_deployment","deployment","runtime","all"]},"environment":{"type":"string","enum":["development","staging","production"]}}} |
| output_schema | {"type":"object","properties":{"security_score":{"type":"number"},"checks_passed":{"type":"integer"},"checks_failed":{"type":"integer"},"recommendations":{"type":"array"}}} |
| owasp_llm_2025 | ["LLM03","LLM06"] |
| nist_ai_rmf | ["Govern","Manage"] |
Deploy AI/ML models securely with defense-in-depth strategies and zero-trust architecture.
Skill: secure-deployment
Agent: 06-api-security-tester
OWASP: LLM03 (Supply Chain), LLM06 (Excessive Agency)
NIST: Govern, Manage
Use Case: Secure production deployment
Model Training → [Security Scan] → [Signing] → [Encrypted Storage]
↓
[Canary Deploy] ← [Staged Rollout] ← [Integrity Check] ← [Pull]
↓
[Production] → [Continuous Monitoring]
Security Scans:
- model_vulnerability_scan
- dependency_audit
- bias_evaluation
- adversarial_robustness_test
- pii_leak_detection
- license_compliance
- secrets_detection
class PreDeploymentChecker:
def run_all_checks(self, model_path):
results = []
# Dependency audit
results.append(.audit_dependencies(model_path))
results.append(.scan_for_secrets(model_path))
results.append(.detect_pii_leakage(model_path))
results.append(.test_robustness(model_path))
results.append(.evaluate_bias(model_path))
results
():
vulns = .dependency_scanner.scan(path)
critical = [v v vulns v.severity == ]
critical:
CheckResult(, , critical)
CheckResult(, )
():
secrets = .secret_scanner.scan(path)
secrets:
CheckResult(, , secrets)
CheckResult(, )
Container Security:
base_image: distroless/python3
user: nonroot (UID 65532)
filesystem: read-only
capabilities: drop ALL
seccomp: runtime/default
Network Security:
ingress: API gateway only
egress: allowlist only
mtls: required
network_policy: strict
Secrets Management:
provider: HashiCorp Vault
injection: sidecar
rotation: 24 hours
never_in_env: true
Model Storage:
encryption: AES-256-GCM
signing: RSA-4096
integrity: SHA-256 hash
access: RBAC enforced
# Kubernetes deployment security
SECURE_DEPLOYMENT = """
apiVersion: apps/v1
kind: Deployment
spec:
template:
spec:
securityContext:
runAsNonRoot: true
runAsUser: 65532
fsGroup: 65532
seccompProfile:
type: RuntimeDefault
containers:
- name: model-server
image: distroless/python3:nonroot
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
resources:
limits:
cpu: "4"
memory: "16Gi"
nvidia.com/gpu: "1"
requests:
cpu: "2"
memory: "8Gi"
volumeMounts:
- name: model
mountPath: /model
readOnly: true
- name: tmp
mountPath: /tmp
"""
Isolation:
runtime: gvisor
network: namespace isolated
process: pid namespace
Monitoring:
logging: structured JSON
metrics: Prometheus
tracing: OpenTelemetry
alerts: PagerDuty
Resource Protection:
cpu_limit: enforced
memory_limit: enforced
gpu_memory: enforced
timeout: 30 seconds
class RuntimeProtection:
def __init__(self):
self.timeout = 30 # seconds
self.max_memory = 16 * 1024**3 # 16GB
self.rate_limiter = RateLimiter()
def protected_inference(self, model, input_data, user_id):
# Rate limiting
if not self.rate_limiter.allow(user_id):
raise RateLimitError()
# Timeout protection
with timeout(self.timeout):
# Memory monitoring
with memory_limit(self.max_memory):
result = model.infer(input_data)
# Log the request
self.log_inference(user_id, input_data, result)
return result
Rollout Strategy:
canary:
initial_percentage: 5%
increment: 10%
interval: 1 hour
success_criteria:
- error_rate < 0.1%
- latency_p99 < 5s
- no_security_alerts
rollback:
automatic: true
triggers:
- error_rate > 1%
- security_alert
- latency_p99 > 10s
Pre-Deployment:
- [ ] Dependencies scanned and patched
- [ ] Secrets removed from codebase
- [ ] PII leak testing passed
- [ ] Adversarial robustness validated
- [ ] Model signed and verified
- [ ] Access controls configured
Deployment:
- [ ] Non-root container
- [ ] Read-only filesystem
- [ ] Resource limits set
- [ ] Network policies applied
- [ ] Secrets via vault
- [ ] TLS/mTLS enabled
Runtime:
- [ ] Monitoring enabled
- [ ] Alerting configured
- [ ] Logging comprehensive
- [ ] Rate limiting active
- [ ] Rollback tested
# .github/workflows/secure-deploy.yml
name: Secure Deployment
jobs:
security-scan:
steps:
- name: Dependency Audit
run: pip-audit --strict
- name: Secret Scan
run: gitleaks detect
- name: Container Scan
run: trivy image $IMAGE
- name: SBOM Generation
run: syft $IMAGE -o spdx-json
deploy:
needs: security-scan
steps:
- name: Sign Image
run: cosign sign $IMAGE
- name: Verify Signature
run: cosign verify $IMAGE
- name: Deploy Canary
run: kubectl apply -f canary.yaml
CRITICAL:
- Secrets in codebase
- Critical vulnerabilities
- No authentication
HIGH:
- Root container
- Missing encryption
- No rate limiting
MEDIUM:
- Missing resource limits
- Incomplete logging
- Outdated dependencies
LOW:
- Non-optimal configs
- Missing SBOM
Issue: Deployment failing security scan
Solution: Update dependencies, remove secrets, fix configs
Issue: Container won't start (read-only FS)
Solution: Use tmpfs for temp files, volume for model
Issue: High latency after security layers
Solution: Optimize validation, use caching, async logging
| Component | Purpose |
|---|---|
| Agent 06 | Security testing |
| Agent 08 | CI/CD automation |
| /test api | Pre-deploy testing |
| ArgoCD | GitOps deployment |
Deploy AI models securely with defense-in-depth practices.