Back to skill

Security audit

CodeGraph

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious with medium confidence: it reports a potential unsafe file-handling issue and several concerns, while analysis of much of the artifact was incomplete.

Consider the skill’s reported risk and the incomplete scan before installing. In particular, the scanner says files outside the authorized repository could be embedded in an output, and many files were only partially inspected; the scan therefore cannot establish that the artifact is safe.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/build-walkthrough.mjs
Finding

Source embedding follows repository symlinks to files outside the authorized repository

Content
View full analysis

Impact

External configuration, private source, or secrets can be copied into a deliverable under an innocuous repository-relative filename. Sharing that deliverable exposes the copied contents. Even a one-line reference embeds the complete target file. No automatic network exfiltration was established.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (49)

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 30)May include surrounding context.

md
`validate.mjs` and `build-html.mjs` (ESM + `node:` prefix imports).

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 151)May include surrounding context.

md
> **Note on `web`**: when `editor.id === 'web'`, `build-html.mjs` embeds every

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 200)May include surrounding context.

md
Run `build-html.mjs` to produce `graph.html`. Open path is reported to user.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 814)May include surrounding context.

md
After validation passes, run `build-html.mjs`:

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 30)May include surrounding context.

md
`validate.mjs` and `build-html.mjs` (ESM + `node:` prefix imports).

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 248)May include surrounding context.

md
6. **Validate** with `validate.mjs` (extended for review mode).

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 784)May include surrounding context.

md
When `validate.mjs` returns a non-zero exit with a JSON error report:

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
85% confidence
Finding

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.

Content

Scanner excerpt · SKILL.md (reported line 56)May include surrounding context.

To find the skill dir from a shell:

bash
find . ~/.claude/skills ~/.dsh/skills ~/.agents/skills -type f -name SKILL.md \
  \( -path '*codegraph*' -o -path '*CodeGraph*' \) 2>/dev/null | head -1 | xargs dirname

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 236)May include surrounding context.

md
2. **Run `diff-status.mjs`**: get `addedLines` / `removedLines` per file.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/_smoke-validate.mjs (reported line 116)May include surrounding context.

js
{
    name: 'absolute path',
    mmd: `flowchart TD\nA[x] --> B[y]`,
    locs: { A: ['/etc/passwd', 1], B: ['src/handler.ts', 2] },
    expectOk: false,
  },
  // Should fail: nonexistent file

Unvalidated Output Injection

High
Category
Output Handling
Confidence
90% confidence
Finding

Model output is used without validation or sanitization. Unvalidated output injected into downstream contexts (SQL, shell, HTML) enables injection attacks and arbitrary code execution.

Content

Scanner excerpt · scripts/mermaid-adapter.mjs (reported line 107)May include surrounding context.

js
// Mermaid emits HTML void tags inside foreignObject labels. HTML parsing
  // preserves SVG namespaces while accepting that embedded label markup.
  const template = document.createElement('template');
  template.innerHTML = result.svg;
  const svg = template.content.querySelector('svg');
  // Source navigation belongs to CodeGraph even when the Mermaid source uses
  // click/link directives. Keep anchor contents without native navigation.

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · vendor/mermaid-parser.bundle.mjs (reported line 1)May include surrounding context.

js
e:!0})},K8=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of A8e(e))!R8e.call(t,i)&&i!==r&&Z8(t,i,{get:()=>e[i],enumerable:!(n=_8e(e,i))||n.enumerable});return t},$r=(t,e,r)=>(K8(t,e,"default"),r&&K8(r,e,"default")),Pt=(t,e,r)=>(r=t!=null?C8e(L8e(t)):{},K8(e||!t||!t.__esModule?Z8(r,"default",{value:t,enumerable:!0}):r,t));var $2,Q8=R(()=>{$2={name:"mermaid",version:"11.12.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pn

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · vendor/mermaid.min.js (reported line 1)May include surrounding context.

js
peof e=="function")for(let a of Z9e(e))!J9e.call(t,a)&&a!==r&&QT(t,a,{get:()=>e[a],enumerable:!(n=K9e(e,a))||n.enumerable});return t},Er=(t,e,r)=>(fL(t,e,"default"),r&&fL(r,e,"default")),ms=(t,e,r)=>(r=t!=null?j9e(Q9e(t)):{},fL(e||!t||!t.__esModule?QT(r,"default",{value:t,enumerable:!0}):r,t));var Dr=(t,e,r)=>eLe(t,typeof e!="symbol"?e+"":e,r);var nb,dL=L(()=>{nb={name:"mermaid",version:"11.12.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pn

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 56)May include surrounding context.

To find the skill dir from a shell:

bash
find . ~/.claude/skills ~/.dsh/skills ~/.agents/skills -type f -name SKILL.md \
  \( -path '*codegraph*' -o -path '*CodeGraph*' \) 2>/dev/null | head -1 | xargs dirname

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/_mermaid-browser-test.py (reported line 52)May include surrounding context.

python
def run(*args):
    result = subprocess.run(args, capture_output=True, text=True)
    assert result.returncode == 0, (args, result.stdout, result.stderr)
    return result.stdout

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/_semantic-location-test.py (reported line 26)May include surrounding context.

python
def run(*args):
    return subprocess.run(args, check=True, capture_output=True, text=True).stdout


def build(root, name, locs):

PR-head shorthand does not select the PR base as explicitly documented.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The comment at L192–L193 says that when only --head is pr/N, the base is also taken from the PR. However, L197 replaces baseRef only when --base itself uses PR shorthand, leaving an ordinary supplied base unchanged. This can produce review attribution against a different baseline than the documented PR comparison.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · vendor/highlight.min.js (reported line 3)May include surrounding context.

js
\n/}]},r=e.inherit(u,{begin:/\(/,end:/\)/}),a=e.inherit(e.APOS_STRING_MODE,{className:"string"}),s=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:i,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[o]},{begin:/'/,end:/'/,contains:[o]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[u,s,a,r,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[u,r,s,a]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[s]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"s

MCP server referenced without pinned version: 'npx madge'.

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · vendor/mermaid-parser.bundle.mjs (reported line 1108)May include surrounding context.

js
]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(ui||(ui={}));W3={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Uy,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(W3);hi=class{constructor(e,r=W3){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(i,a)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let s=new Array(this.traceInitIndent+1).join("	");this.traceIni

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · vendor/mermaid-parser.bundle.mjs (reported line 1110)May include surrounding context.

js
ng <lineTerminatorCharacters> property on the Lexer config.
	For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),er(e)?i={modes:{defaultMode:Hn(e)},defaultMode:Gy}:(a=!1,i=Hn(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(eTe(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(tTe(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},jt(i.modes,(o,l)=>{i.modes[l]=f0(o,u=>ps(u))});let s=qn(i.modes);if(jt(i.modes,(o,l)=>{this.TR

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · vendor/mermaid-parser.bundle.mjs (reported line 1110)May include surrounding context.

js
ng <lineTerminatorCharacters> property on the Lexer config.
	For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),er(e)?i={modes:{defaultMode:Hn(e)},defaultMode:Gy}:(a=!1,i=Hn(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(eTe(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(tTe(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},jt(i.modes,(o,l)=>{i.modes[l]=f0(o,u=>ps(u))});let s=qn(i.modes);if(jt(i.modes,(o,l)=>{this.TR

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · vendor/mermaid-parser.bundle.mjs (reported line 1165)May include surrounding context.

js
get||a.set)?Object.defineProperty(t.prototype,i,a):t.prototype[i]=r.prototype[i]})})}var pke=R(()=>{});function q_(t=void 0){return function(){return t}}var Zy,Ys,Qy,ua,i5,a5,Lo=R(()=>{Nn();Ty();qwe();Nm();qy();zTe();U$();HTe();eke();tke();rke();nke();ike();ake();hke();fke();pke();Q3();Zy=tf(Zo,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Zy);Ys=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:rf,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Qy=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});(function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RU

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · vendor/mermaid-parser.bundle.mjs (reported line 1165)May include surrounding context.

js
get||a.set)?Object.defineProperty(t.prototype,i,a):t.prototype[i]=r.prototype[i]})})}var pke=R(()=>{});function q_(t=void 0){return function(){return t}}var Zy,Ys,Qy,ua,i5,a5,Lo=R(()=>{Nn();Ty();qwe();Nm();qy();zTe();U$();HTe();eke();tke();rke();nke();ike();ake();hke();fke();pke();Q3();Zy=tf(Zo,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Zy);Ys=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:rf,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Qy=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});(function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RU