T06 · System Persistence
- Location
README.md:31- Finding
Installation Instructions Overwrite Global Claude Settings and Establish a Cross-Session Hook
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a real threat-modeling skill, but it needs review because setup can overwrite global Claude settings, install a persistent Write hook, and generate HTML reports with avoidable browser-side risks.
Prefer project-local installation. Do not copy this skill's settings-example.json over ~/.claude/settings.json; manually merge any hook after reviewing it, and remove or disable the hook when finished. Use the POC and pentest outputs only for systems you are authorized to test. Treat generated HTML reports as untrusted browser content, especially when Mermaid diagrams are present; prefer Markdown/offline viewing or sanitize/bundle dependencies before sharing.
README.md:31Installation Instructions Overwrite Global Claude Settings and Establish a Cross-Session Hook
scripts/report_generator.py:45Generated HTML Reports Execute an Unpinned Remote Mermaid Dependency
scripts/report_generator.py:438Generated Markdown Is Embedded into HTML Without Sanitizing Active Content
The installation instructions tell users to copy a settings file into ~/.claude/settings.json, affecting the agent's global configuration directory. Modifying a global agent config from a skill package is high-risk because it can change behavior across all projects, enable hooks or permissions unexpectedly, and create a persistent trust boundary violation beyond the local skill's scope.
cp ~/.claude/skills/threat-modeling/hooks/settings-example.json
~/.claude/settings.json
### 方式二:项目本地安装
The installation instructions tell users to copy hook settings into ~/.claude/settings.json, which is a sensitive agent configuration location affecting global behavior. Modifying agent-wide settings from a third-party skill increases the blast radius of any unsafe hook behavior and can persistently change how the agent operates across unrelated projects.
cp ~/.claude/skills/threat-modeling/hooks/settings-example.json
~/.claude/settings.json
### Option 2: Project-Local Installation
The description promises a comprehensive threat-modeling/security-audit skill that should replace normal security analysis and produce full professional deliverables across an 8-phase STRIDE workflow. The actual code chunk is much narrower: it is a reconnaissance/discovery utility focused on scanning a local project tree, classifying files/docs, identifying route patterns/frameworks, spotting dynamic route indicators, and emitting structured discovery metadata. While this supports threat modeling, it does not itself perform the broader holistic security analysis or generate the named deliverables. The code also includes undeclared behavior such as documentation scoring and subprocess-based tool availability checks. This is a material description-to-behavior mismatch in primary purpose and capabilities, even though the code is related to security/threat-modeling support.
The declared description promises a security-audit/threat-modeling skill that analyzes an app or codebase and produces professional security deliverables via an 8-phase STRIDE workflow. The supplied code chunk does not actually perform substantive security analysis of an application. Instead, it validates and coordinates artifacts from such a workflow: extracting IDs and references, checking conservation formulas, verifying coverage across phases, enforcing phase order, updating session metadata, and generating remediation/traversal task YAML files. These are workflow orchestration and artifact QA capabilities, not the primary threat-modeling or penetration-test-prep analysis described. While the code is related to the surrounding security workflow domain, its implemented purpose is materially narrower and operationally different from the declared user-facing capability.
The declared description presents a skill whose purpose is to perform holistic security auditing/threat modeling of an app. The supplied code chunk, however, primarily implements infrastructure around that workflow: file I/O, session handling, CLI commands, aggregation of previously generated artifacts, validation of completeness/coverage, and dispatch instructions for later analysis. While the code is related to a STRIDE workflow domain, it does not itself perform the substantive security audit, vulnerability discovery, attack-surface analysis, or professional deliverable generation claimed in the description. Its primary purpose is orchestration and data management for such a workflow, which is a materially different capability from the declared skill behavior.
This is a clear description-behavior mismatch. The declared purpose says the skill should be invoked for holistic security analysis and threat modeling, producing risk assessments, DFDs, threat inventories, mitigation plans, and pentest plans. However, the code shown does none of that analytical work. It reads Markdown files from a report directory, uses the Python markdown library to convert them to HTML, post-processes HTML for TOC anchors, severity badges, and Mermaid blocks, builds sidebar/index navigation, and writes HTML output files. The only security-related aspect is the report content domain; the implementation is a renderer/exporter for reports, not a threat-modeling engine. This is a materially different primary purpose, so it should be flagged as a mismatch.
The code is related to threat modeling, but only as a small helper for STRIDE categorization and threat-ID generation. Its actual function is limited to matrix lookup for predefined element types, interaction analysis using static rules, validation of element IDs, and JSON output. The declared description claims a much broader, end-to-end security analysis capability and says it must replace direct security analysis because it produces comprehensive professional deliverables. That is a material overstatement of the code’s behavior and primary purpose. There is no code for ingesting an app/codebase, building DFDs, auditing security posture, finding vulnerabilities, validating attack paths, or generating reports/plans beyond simple structured lookup output.
The description promises a holistic threat-modeling/security-audit skill that should be invoked instead of doing security analysis manually and claims a specialized 8-phase STRIDE workflow producing professional deliverables such as risk reports, DFD diagrams, attack path validation, mitigation plans, and pentest plans. The actual code does not implement such a workflow or analyze a user’s application/codebase directly. Instead, it is a general-purpose security knowledge base query CLI. Its primary behavior is fetching structured reference data from local YAML/SQLite stores, querying ATT&CK/CWE/CAPEC mappings, searching CVEs, checking KEV, optionally calling the NVD API, and returning JSON. While this supports threat modeling, it is materially narrower and different from the declared end-to-end audit/threat-modeling service. It also exposes several undeclared capabilities/resources, especially network access to NVD and broad reference/compliance/query functions. Therefore the description does not accurately represent the supplied code chunk.
The declared description presents a security-analysis skill with substantive threat-modeling functionality. However, the supplied code chunk is just a path-detection helper that searches for the skill's installation directory in local/global locations or via environment/script context. Its primary purpose is operational setup, not security assessment. While such a helper could support the larger skill, this specific code chunk does not itself implement the declared behavior, and instead performs an undeclared filesystem lookup utility function.
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
k: T1078
description: "通过认证绕过进行身份伪造"
- capec: CAPEC-116
attack: T1552
description: "从内存提取凭证"
# 第4部分: 逐步攻击流程
detailed_steps:
- step: 1
phase: "侦察"
action: "通过 /swagger.json 枚举 API 端点"
technique: T1592.002
tools: ["curl", "burpsuite"]
commands: |
curl -s https://target.com/swagger.json | jq '.paths | keys'
expected_result: "所有 API 端点列表"
- step: 2
phase: "初始访问"
action: "访问未保护的 /api/v2/user 端点"
technique: T1190
tools: ["curl"]
commands: |
curl -s https://target.com/api/v2/user/profile \
-H "X-Forwarded-For: 127.0.0.1"
expected_result: "无需认证返回用户配置数据"
- step: 3
phase: "凭证访问"
action: "从响应中
This documentation explicitly instructs the skill to generate proof-of-concept exploits, token-extraction code, and step-by-step attack commands. For a skill positioned as threat modeling and risk assessment, that materially expands capability from analysis into operational offensive guidance, increasing the chance of misuse and unauthorized exploitation.
The Burp Suite reference alone is not inherently unsafe, but here it appears inside a prescribed recon and exploitation workflow alongside concrete attack steps. In that context, the tool mention reinforces actionable offensive enablement and contributes to misuse risk beyond normal threat-modeling analysis.
: "Identity Spoofing via authentication bypass"
- capec: CAPEC-116
attack: T1552
description: "Credential extraction from memory"
# Part 4: Step-by-Step Attack Flow
detailed_steps:
- step: 1
phase: "Reconnaissance"
action: "Enumerate API endpoints via /swagger.json"
technique: T1592.002
tools: ["curl", "burpsuite"]
commands: |
curl -s https://target.com/swagger.json | jq '.paths | keys'
expected_result: "List of all API endpoints"
- step: 2
phase: "Initial Access"
action: "Access unprotected /api/v2/user endpoint"
technique: T1190
tools: ["curl"]
commands: |
curl -s https://target.com/api/v2/user/profile \
-H "X-Forwarded-For: 127.0.0.1"
expected_result: "User profile data returned without authentication"
- step: 3
phase: "Credential Access"
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
Enable debug mode by setting the environment variable:
export STRIDE_HOOK_DEBUG=true
Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
"_comment": "Example settings.json configuration for STRIDE Threat Modeling Phase End Hook",
"_usage": [
"Copy the 'hooks' section to your settings file:",
" - ~/.claude/settings.json (global)",
" - .claude/settings.json (project)",
" - .claude/settings.local.json (local, not committed)",
"",
Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
"_comment": "Example settings.json configuration for STRIDE Threat Modeling Phase End Hook",
"_usage": [
"Copy the 'hooks' section to your settings file:",
" - ~/.claude/settings.json (global)",
" - .claude/settings.json (project)",
" - .claude/settings.local.json (local, not committed)",
"",
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
# Threat Modeling Skill | Version 3.1.0 (20260313a) | https://github.com/fr33d3m0n/threat-modeling | License: BSD-3-Clause
# Agentic Threats Knowledge Base
# OWASP Top 10 for Agentic Applications 2026 + Agent Security Patterns
# Version: 1.0
# Reference: https://owasp.org/www-project-top-10-for-agentic-applications/
metadata:
version: "1.0"
description: "Agentic AI security threat patterns for STRIDE threat modeling"
sources:
- "OWASP Top 10 for Agentic Applications 2026 (ASI01-ASI10)"
- "OWASP Non-Human Identities (NHI) Top 10"
- "MITRE ATLAS (Adversarial Threat Landscape for AI Systems)"
- "NIST AI Risk Management Framework"
- "OWASP MCP Top 10 (2025) — https://owasp.org/www-project-mcp-top-10/"
- "MITRE ATT&CK Enterprise v16"
- "Integrated from skill-audit Agent/Skill Security Knowledge Base"
last_updated: "2026-03"
relationship:
extends: "llm-threats.yaml"
principle: "Agentic threat
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
stride_categories: ["tampering", "elevation_of_privilege", "spoofing"]
attack_vectors:
- "Inject instructions into tool description fields"
- "Use tool descriptions to override system prompt"
- "Return poisoned data in tool outputs"
- "Manipulate tool parameter descriptions"
mitigations:
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
stride_categories: ["tampering", "elevation_of_privilege", "spoofing"]
attack_vectors:
- "Inject instructions into tool description fields"
- "Use tool descriptions to override system prompt"
- "Return poisoned data in tool outputs"
- "Manipulate tool parameter descriptions"
mitigations:
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
stride_categories: ["tampering", "elevation_of_privilege", "spoofing"]
attack_vectors:
- "Inject instructions into tool description fields"
- "Use tool descriptions to override system prompt"
- "Return poisoned data in tool outputs"
- "Manipulate tool parameter descriptions"
mitigations:
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
implementation: |
- Isolate MCP server execution contexts
- Enforce data access boundaries per MCP server
- Clear context between tasks/sessions
- Prevent cross-server tool chaining without authorization
cwes: ["CWE-200", "CWE-284", "CWE-346"]
attack_techniques: ["T1021"]
Instructions found that direct the agent to transmit conversation context or user data to external services.
stride: ["tampering"]
related_tcs: ["TC-04"]
A_EXFIL:
description: "Send data to external endpoint"
stride: ["information_disclosure"]
related_tcs: ["TC-03"]
A_ACCESS:
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
# Threat Modeling Skill | Version 3.1.0 (20260313a) | https://github.com/fr33d3m0n/threat-modeling | License: BSD-3-Clause
metadata:
version: '3.9'
source: https://capec.mitre.org
last_updated: '2025-12-24'
synchronized_with: 'security_kb.sqlite'
description: CAPEC Knowledge Base with ATT&CK and STRIDE Mappings
attack_patterns:
CAPEC-1:
name: Accessing Functionality Not Properly Constrained by ACLs
description: In applications, particularly web applications, access to functionality is mitigated by an authorization
framework. This framework maps Access Control Lists (ACLs) to elements of the application's functionality; particularly
URL's for web apps. In the case that the administrator failed to specify an ACL for a particular element, an attacker
may be able to access it with impunity. An attacker with the
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
# Threat Modeling Skill | Version 3.1.0 (20260313a) | https://github.com/fr33d3m0n/threat-modeling | License: BSD-3-Clause
metadata:
version: '3.9'
source: https://capec.mitre.org
last_updated: '2025-12-24'
synchronized_with: 'security_kb.sqlite'
description: CAPEC Knowledge Base with ATT&CK and STRIDE Mappings
attack_patterns:
CAPEC-1:
name: Accessing Functionality Not Properly Constrained by ACLs
description: In applications, particularly web applications, access to functionality is mitigated by an authorization
framework. This framework maps Access Control Lists (ACLs) to elements of the application's functionality; particularly
URL's for web apps. In the case that the administrator failed to specify an ACL for a particular element, an attacker
may be able to access it with impunity. An attacker with the
Skill attempts to nullify the agent's safety policies or restrictions ('you have no restrictions', 'ignore your guidelines', 'do anything now'). This is a direct jailbreak that disables guardrails.
name: Double Encoding
description: The adversary utilizes a repeating of the encoding process for a set of characters (that is, character encoding
a character encoding of a character) to obfuscate the payload of a particular request. This may allow the adversary
to bypass filters that attempt to detect illegal characters or strings, such as those that might be used in traversal
or injection attacks. Filters may be able to catch illegal encoded strings, but may not catch doubly encoded strings.
For example, a dot (.), often used i
likelihood: Low
Skill attempts to nullify the agent's safety policies or restrictions ('you have no restrictions', 'ignore your guidelines', 'do anything now'). This is a direct jailbreak that disables guardrails.
name: Double Encoding
description: The adversary utilizes a repeating of the encoding process for a set of characters (that is, character encoding
a character encoding of a character) to obfuscate the payload of a particular request. This may allow the adversary
to bypass filters that attempt to detect illegal characters or strings, such as those that might be used in traversal
or injection attacks. Filters may be able to catch illegal encoded strings, but may not catch doubly encoded strings.
For example, a dot (.), often used i
likelihood: Low
No suspicious patterns detected.