Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问clear审计提醒

senior-security高级保安

Agent Skill

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

总安装

3,224

周安装

133

GitHub Stars

103

下载量

1,053
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:senior-security(高级保安)
来源仓库:https://github.com/borghei/claude-skills
仓库路径:skills/senior-security
安装命令:
npx skills add https://github.com/borghei/claude-skills --skill senior-security
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/borghei/claude-skills --skill senior-security

简介

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。

  • 它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。
  • 使用时不能把工具输出直接当最终结论,senior-security 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 涉及密钥、令牌、用户数据或生产系统时, 应先确认最小权限、脱敏方式和操作边界。

SKILL.md

Senior Security Engineer

The agent performs STRIDE threat analysis with DREAD risk scoring, designs defense-in-depth security architectures with Zero Trust principles, conducts secure code reviews against OWASP Top 10, and scans codebases for hardcoded secrets across 20+ credential patterns.


Table of Contents


Threat Modeling Workflow

Identify and analyze security threats using STRIDE methodology.

Workflow: Conduct Threat Model

  1. Define system scope and boundaries:

- Identify assets to protect - Map trust boundaries - Document data flows

  1. Create data flow diagram:

- External entities (users, services) - Processes (application components) - Data stores (databases, caches) - Data flows (APIs, network connections)

  1. Apply STRIDE to each DFD element:

- Spoofing: Can identity be faked? - Tampering: Can data be modified? - Repudiation: Can actions be denied? - Information Disclosure: Can data leak? - Denial of Service: Can availability be affected? - Elevation of Privilege: Can access be escalated?

  1. Score risks using DREAD:

- Damage potential (1-10) - Reproducibility (1-10) - Exploitability (1-10) - Affected users (1-10) - Discoverability (1-10)

  1. Prioritize threats by risk score
  2. Define mitigations for each threat
  3. Document in threat model report
  4. Validation: All DFD elements analyzed; STRIDE applied; threats scored; mitigations mapped

STRIDE Threat Categories

CategoryDescriptionSecurity PropertyMitigation Focus
SpoofingImpersonating users or systemsAuthenticationMFA, certificates, strong auth
TamperingModifying data or codeIntegritySigning, checksums, validation
RepudiationDenying actionsNon-repudiationAudit logs, digital signatures
Information DisclosureExposing dataConfidentialityEncryption, access controls
Denial of ServiceDisrupting availabilityAvailabilityRate limiting, redundancy
Elevation of PrivilegeGaining unauthorized accessAuthorizationRBAC, least privilege

STRIDE per Element Matrix

DFD ElementSTRIDE
External EntityXX
ProcessXXXXXX
Data StoreXXXX
Data FlowXXX

See: references/threat-modeling-guide.md


Security Architecture Workflow

Design secure systems using defense-in-depth principles.

Workflow: Design Secure Architecture

  1. Define security requirements:

- Compliance requirements (GDPR, HIPAA, PCI-DSS) - Data classification (public, internal, confidential, restricted) - Threat model inputs

  1. Apply defense-in-depth layers:

- Perimeter: WAF, DDoS protection, rate limiting - Network: Segmentation, IDS/IPS, mTLS - Host: Patching, EDR, hardening - Application: Input validation, authentication, secure coding - Data: Encryption at rest and in transit

  1. Implement Zero Trust principles:

- Verify explicitly (every request) - Least privilege access (JIT/JEA) - Assume breach (segment, monitor)

  1. Configure authentication and authorization:

- Identity provider selection - MFA requirements - RBAC/ABAC model

  1. Design encryption strategy:

- Key management approach - Algorithm selection - Certificate lifecycle

  1. Plan security monitoring:

- Log aggregation - SIEM integration - Alerting rules

  1. Document architecture decisions
  2. Validation: Defense-in-depth layers defined; Zero Trust applied; encryption strategy documented; monitoring planned

Defense-in-Depth Layers

Layer 1: PERIMETER
  WAF, DDoS mitigation, DNS filtering, rate limiting

Layer 2: NETWORK
  Segmentation, IDS/IPS, network monitoring, VPN, mTLS

Layer 3: HOST
  Endpoint protection, OS hardening, patching, logging

Layer 4: APPLICATION
  Input validation, authentication, secure coding, SAST

Layer 5: DATA
  Encryption at rest/transit, access controls, DLP, backup

Authentication Pattern Selection

Use CaseRecommended Pattern
Web applicationOAuth 2.0 + PKCE with OIDC
API authenticationJWT with short expiration + refresh tokens
Service-to-servicemTLS with certificate rotation
CLI/AutomationAPI keys with IP allowlisting
High securityFIDO2/WebAuthn hardware keys

See: references/security-architecture-patterns.md


Vulnerability Assessment Workflow

Identify and remediate security vulnerabilities in applications.

Workflow: Conduct Vulnerability Assessment

  1. Define assessment scope:

- In-scope systems and applications - Testing methodology (black box, gray box, white box) - Rules of engagement

  1. Gather information:

- Technology stack inventory - Architecture documentation - Previous vulnerability reports

  1. Perform automated scanning:

- SAST (static analysis) - DAST (dynamic analysis) - Dependency scanning - Secret detection

  1. Conduct manual testing:

- Business logic flaws - Authentication bypass - Authorization issues - Injection vulnerabilities

  1. Classify findings by severity:

- Critical: Immediate exploitation risk - High: Significant impact, easier to exploit - Medium: Moderate impact or difficulty - Low: Minor impact

  1. Develop remediation plan:

- Prioritize by risk - Assign owners - Set deadlines

  1. Verify fixes and document
  2. Validation: Scope defined; automated and manual testing complete; findings classified; remediation tracked

OWASP Top 10 Mapping

RankVulnerabilityTesting Approach
A01Broken Access ControlManual IDOR testing, authorization checks
A02Cryptographic FailuresAlgorithm review, key management audit
A03InjectionSAST + manual payload testing
A04Insecure DesignThreat modeling, architecture review
A05Security MisconfigurationConfiguration audit, CIS benchmarks
A06Vulnerable ComponentsDependency scanning, CVE monitoring
A07Authentication FailuresPassword policy, session management review
A08Software/Data IntegrityCI/CD security, code signing verification
A09Logging FailuresLog review, SIEM configuration check
A10SSRFManual URL manipulation testing

Vulnerability Severity Matrix

Impact / ExploitabilityEasyModerateDifficult
CriticalCriticalCriticalHigh
HighCriticalHighMedium
MediumHighMediumLow
LowMediumLowLow

Secure Code Review Workflow

Review code for security vulnerabilities before deployment.

Workflow: Conduct Security Code Review

  1. Establish review scope:

- Changed files and functions - Security-sensitive areas (auth, crypto, input handling) - Third-party integrations

  1. Run automated analysis:

- SAST tools (Semgrep, CodeQL, Bandit) - Secret scanning - Dependency vulnerability check

  1. Review authentication code:

- Password handling (hashing, storage) - Session management - Token validation

  1. Review authorization code:

- Access control checks - RBAC implementation - Privilege boundaries

  1. Review data handling:

- Input validation - Output encoding - SQL query construction - File path handling

  1. Review cryptographic code:

- Algorithm selection - Key management - Random number generation

  1. Document findings with severity
  2. Validation: Automated scans passed; auth/authz reviewed; data handling checked; crypto verified; findings documented

Security Code Review Checklist

CategoryCheckRisk
Input ValidationAll user input validated and sanitizedInjection
Output EncodingContext-appropriate encoding appliedXSS
AuthenticationPasswords hashed with Argon2/bcryptCredential theft
SessionSecure cookie flags set (HttpOnly, Secure, SameSite)Session hijacking
AuthorizationServer-side permission checks on all endpointsPrivilege escalation
SQLParameterized queries used exclusivelySQL injection
File AccessPath traversal sequences rejectedPath traversal
SecretsNo hardcoded credentials or keysInformation disclosure
DependenciesKnown vulnerable packages updatedSupply chain
LoggingSensitive data not loggedInformation disclosure

Secure vs Insecure Patterns

PatternIssueSecure Alternative
SQL string formattingSQL injectionUse parameterized queries with placeholders
Shell command buildingCommand injectionUse subprocess with argument lists, no shell
Path concatenationPath traversalValidate and canonicalize paths
MD5/SHA1 for passwordsWeak hashingUse Argon2id or bcrypt
Math.random for tokensPredictable valuesUse crypto.getRandomValues

Incident Response Workflow

Respond to and contain security incidents.

Workflow: Handle Security Incident

  1. Identify and triage:

- Validate incident is genuine - Assess initial scope and severity - Activate incident response team

  1. Contain the threat:

- Isolate affected systems - Block malicious IPs/accounts - Disable compromised credentials

  1. Eradicate root cause:

- Remove malware/backdoors - Patch vulnerabilities - Update configurations

  1. Recover operations:

- Restore from clean backups - Verify system integrity - Monitor for recurrence

  1. Conduct post-mortem:

- Timeline reconstruction - Root cause analysis - Lessons learned

  1. Implement improvements:

- Update detection rules - Enhance controls - Update runbooks

  1. Document and report
  2. Validation: Threat contained; root cause eliminated; systems recovered; post-mortem complete; improvements implemented

Incident Severity Levels

LevelDescriptionResponse TimeEscalation
P1 - CriticalActive breach, data exfiltrationImmediateCISO, Legal, Executive
P2 - HighConfirmed compromise, contained1 hourSecurity Lead, IT Director
P3 - MediumPotential compromise, under investigation4 hoursSecurity Team
P4 - LowSuspicious activity, low impact24 hoursOn-call engineer

Incident Response Checklist

PhaseActions
IdentificationValidate alert, assess scope, determine severity
ContainmentIsolate systems, preserve evidence, block access
EradicationRemove threat, patch vulnerabilities, reset credentials
RecoveryRestore services, verify integrity, increase monitoring
Lessons LearnedDocument timeline, identify gaps, update procedures

Security Tools Reference

Recommended Security Tools

CategoryTools
SASTSemgrep, CodeQL, Bandit (Python), ESLint security plugins
DASTOWASP ZAP, Burp Suite, Nikto
Dependency ScanningSnyk, Dependabot, npm audit, pip-audit
Secret DetectionGitLeaks, TruffleHog, detect-secrets
Container SecurityTrivy, Clair, Anchore
InfrastructureCheckov, tfsec, ScoutSuite
NetworkWireshark, Nmap, Masscan
PenetrationMetasploit, sqlmap, Burp Suite Pro

Cryptographic Algorithm Selection

Use CaseAlgorithmKey Size
Symmetric encryptionAES-256-GCM256 bits
Password hashingArgon2idN/A (use defaults)
Message authenticationHMAC-SHA256256 bits
Digital signaturesEd25519256 bits
Key exchangeX25519256 bits
TLSTLS 1.3N/A

See: references/cryptography-implementation.md


Tools and References

Scripts

ScriptPurposeUsage
threat_modeler.pySTRIDE threat analysis with risk scoringpython threat_modeler.py --component "Authentication"
secret_scanner.pyDetect hardcoded secrets and credentialspython secret_scanner.py /path/to/project

Threat Modeler Features:

  • STRIDE analysis for any system component
  • DREAD risk scoring
  • Mitigation recommendations
  • JSON and text output formats
  • Interactive mode for guided analysis

Secret Scanner Features:

  • Detects AWS, GCP, Azure credentials
  • Finds API keys and tokens (GitHub, Slack, Stripe)
  • Identifies private keys and passwords
  • Supports 20+ secret patterns
  • CI/CD integration ready

References

DocumentContent
security-architecture-patterns.mdZero Trust, defense-in-depth, authentication patterns, API security
threat-modeling-guide.mdSTRIDE methodology, attack trees, DREAD scoring, DFD creation
cryptography-implementation.mdAES-GCM, RSA, Ed25519, password hashing, key management

Security Standards Reference

Compliance Frameworks

FrameworkFocusApplicable To
OWASP ASVSApplication securityWeb applications
CIS BenchmarksSystem hardeningServers, containers, cloud
NIST CSFRisk managementEnterprise security programs
PCI-DSSPayment card dataPayment processing
HIPAAHealthcare dataHealthcare applications
SOC 2Service organization controlsSaaS providers

Security Headers Checklist

HeaderRecommended Value
Content-Security-Policydefault-src self; script-src self
X-Frame-OptionsDENY
X-Content-Type-Optionsnosniff
Strict-Transport-Securitymax-age=31536000; includeSubDomains
Referrer-Policystrict-origin-when-cross-origin
Permissions-Policygeolocation=(), microphone=(), camera=()

Related Skills

SkillIntegration Point
senior-devopsCI/CD security, infrastructure hardening
senior-secopsSecurity monitoring, incident response
senior-backendSecure API development
senior-architectSecurity architecture decisions

Anti-Patterns

  • Security by obscurity -- hiding endpoints or using non-standard ports is not a control; implement authentication, authorization, and encryption
  • MD5/SHA1 for password hashing -- both are broken for this purpose; use Argon2id or bcrypt with cost factor >= 12
  • Math.random for tokens -- predictable values allow session hijacking; use crypto.getRandomValues() or secrets.token_hex()
  • Shell=True in subprocess -- enables command injection; use argument lists with subprocess.run(["cmd", "arg"])
  • Threat model without data flow diagram -- STRIDE analysis requires DFD elements to be systematic; skip the DFD and you miss entire attack surfaces
  • Accepted risks without review cadence -- DREAD scores drift as systems evolve; re-validate accepted risks every 90 days

Troubleshooting

ProblemCauseSolution
Secret scanner reports false positives on test fixturesTest files contain example tokens that match secret patternsAdd test directories to the exclude list or filter by --severity critical to focus on confirmed secrets
Threat model returns all threats instead of component-specific onesComponent name does not match any entry in the component mappingUse a recognized component keyword (e.g., "authentication", "api", "database", "network", "storage") or a composite like "web application"
DREAD scores seem inflated for low-likelihood threatsDREAD factors are derived from likelihood and severity with fixed multipliersInterpret DREAD as a relative ranking within the report, not an absolute metric; adjust risk acceptance thresholds accordingly
Secret scanner misses secrets in non-standard file extensionsOnly files whose extensions appear in the pattern's file_extensions list are scannedRename config files to use a recognized extension (e.g., .conf, .env, .yml) or extend the pattern database
Threat model does not cover custom component typesThe COMPONENT_MAPPING dictionary has a fixed set of keywordsAdd new entries to COMPONENT_MAPPING in threat_modeler.py for project-specific components
Secret scanner exits with code 1 even after fixing secretsPrevious scan results are cached or the fix introduced a new matchRe-run the scanner after every fix; exit code 1 triggers whenever any critical or high finding remains
Security headers audit produces incomplete resultsApplication is behind a reverse proxy that strips or overrides headersTest headers at the edge (CDN/load balancer) rather than at the application origin

Success Criteria

  • Zero critical- or high-severity secrets detected by secret_scanner.py across the entire codebase before every release.
  • Threat model coverage above 90%: every component in the data flow diagram has a completed STRIDE analysis with documented mitigations.
  • All OWASP Top 10 vulnerability categories addressed in the security architecture with at least one compensating control per category.
  • Mean time to remediate critical vulnerabilities under 48 hours from discovery to verified fix.
  • 100% of authentication and authorization code paths reviewed with the Secure Code Review Checklist before merge.
  • Incident response exercises (tabletop or simulated) conducted at least quarterly with post-mortem documentation.
  • DREAD risk scores for all remaining accepted risks reviewed and re-validated every 90 days.

Scope & Limitations

This skill covers:

  • Application-level security: threat modeling, secure code review, secret detection, and vulnerability assessment for web applications and APIs.
  • Security architecture design: defense-in-depth layering, Zero Trust patterns, authentication/authorization model selection, and encryption strategy.
  • Incident response planning: severity classification, containment procedures, post-mortem frameworks, and runbook creation.
  • Compliance mapping: OWASP ASVS, CIS Benchmarks, NIST CSF, PCI-DSS, HIPAA, and SOC 2 alignment at the application layer.

This skill does NOT cover:

  • Infrastructure and cloud security hardening (see senior-devops and aws-solution-architect).
  • Runtime security monitoring, SIEM rule authoring, and SOC operations (see senior-secops).
  • Full regulatory compliance programs, audit evidence collection, and certification processes (see ra-qm-team).
  • Network penetration testing tooling, red team operations, and physical security assessments.

Integration Points

SkillIntegrationData Flow
senior-devopsCI/CD pipeline security gatesThreat model mitigations feed into pipeline hardening requirements; secret scanner runs as a pre-commit or CI step
senior-secopsSecurity monitoring and incident responseThreat model outputs define detection rules; incident severity levels align with SecOps alerting tiers
senior-backendSecure API developmentSecure code review checklist applied to backend PRs; authentication pattern selection guides API auth implementation
senior-architectSecurity architecture decisionsDefense-in-depth layers and Zero Trust principles inform architecture design reviews; STRIDE results feed architecture risk register
senior-qaSecurity testing integrationVulnerability assessment findings become QA regression test cases; OWASP Top 10 mapping drives security test coverage
ra-qm-teamCompliance framework alignmentSecurity controls mapped to SOC 2, PCI-DSS, and HIPAA requirements; threat model documentation satisfies audit evidence needs

Tool Reference

threat_modeler.py

Purpose: Performs STRIDE threat analysis on system components with DREAD risk scoring, mitigation recommendations, and structured reporting.

Usage:

python threat_modeler.py --component "User Authentication"
python threat_modeler.py --component "API Gateway" --assets "user_data,tokens" --json
python threat_modeler.py --component "Database" --output report.txt
python threat_modeler.py --interactive
python threat_modeler.py --list-threats

Flags:

FlagShortTypeRequiredDescription
--component-cstringYes (unless --interactive or --list-threats)Component to analyze (e.g., "User Authentication", "API Gateway", "Database")
--assets-astringNoComma-separated list of assets to protect
--jsonflagNoOutput report as JSON instead of text
--interactive-iflagNoRun guided interactive threat modeling session
--list-threats-lflagNoList all threats in the built-in database
--output-ostringNoWrite report to file path instead of stdout

Example:

$ python threat_modeler.py --component "API Gateway" --json --output api-threats.json
Report written to api-threats.json

Output Formats:

  • Text (default): Structured report grouped by STRIDE category with risk scores, DREAD ratings, attack vectors, and mitigations.
  • JSON (--json): Machine-readable object containing component, analysis_date, summary (counts by risk level), and threats array with full DREAD breakdown per threat.

secret_scanner.py

Purpose: Detects hardcoded secrets, API keys, credentials, and private keys in source code. Supports 20+ secret patterns across cloud providers (AWS, GCP, Azure), authentication tokens (GitHub, GitLab, Slack, Stripe, Twilio, SendGrid), cryptographic keys, and generic credential patterns. Exits with code 1 when critical or high findings are present, making it CI/CD-ready.

Usage:

python secret_scanner.py /path/to/project
python secret_scanner.py /path/to/file.py
python secret_scanner.py /path/to/project --format json --output report.json
python secret_scanner.py /path/to/project --severity critical
python secret_scanner.py --list-patterns

Flags:

FlagShortTypeRequiredDescription
pathpositionalYes (unless --list-patterns)File or directory path to scan
--format-fchoice: text, jsonNoOutput format (default: text)
--output-ostringNoWrite report to file path instead of stdout
--list-patterns-lflagNoList all detection patterns with IDs and severity
--severity-schoice: critical, high, medium, lowNoMinimum severity threshold to report (includes all levels from critical down to the specified level)

Example:

$ python secret_scanner.py ./src --severity high --format json
{
  "target": "./src",
  "scan_date": "2026-03-21T10:30:00",
  "summary": { "total": 2, "by_severity": { "critical": 1, "high": 1, "medium": 0, "low": 0 } },
  "findings": [ ... ]
}

Output Formats:

  • Text (default): Severity-grouped report showing pattern ID, file path with line number, masked match text, and remediation recommendation.
  • JSON (--format json): Machine-readable object with target, scan_date, summary (counts by severity), and findings array. Each finding includes pattern_id, name, severity, file_path, line_number, matched_text (masked), and recommendation.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

31.05%
按下载量换算327

OpenCode

20.35%
按下载量换算214

Gemini CLI

16.37%
按下载量换算172

Antigravity

12.14%
按下载量换算128

Cursor

8.29%
按下载量换算87

windsurf

3.6%
按下载量换算38

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/borghei/claude-skills --skill senior-security;npx skills add borghei/claude-skills --skill "senior-security" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills