Back to skill

Security audit

Welfare Guide

Security checks for vulnerabilities and agentic risk

Overview

This is a Korean welfare-benefits guidance skill that is coherent with its stated purpose, with manageable privacy and API-key handling cautions.

Before installing, expect the skill to discuss sensitive eligibility details such as age, household, income, disability, pregnancy, or region. Share only what is needed, confirm final eligibility with official agencies, and if you use a data.go.kr API key, store it with restrictive permissions such as a private directory and chmod 600 on the key file.

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
SKILL.md:60
Finding
API Credential File May Be Created with Overly Permissive Permissions## Vulnerability Details **File Location**: `SKILL.md`, lines 60–63 **Vulnerability Type**: Insecure plaintext credential storage and insufficient file-permission hardening **Risk Level**: Medium **Complete Code Snippet**: ```bash mkdir -p ~/.config/data-go-kr echo "YOUR_API_KEY" > ~/.config/data-go-kr/api_key ``` ### Technical Analysis The documented setup procedure stores the data.go.kr API key in a plaintext file without explicitly restricting permissions on either the containing directory or the credential file. File permissions therefore depend on the user's current `umask`. With a common `umask` of `022`, the directory may be created as mode `755` and the key file as mode `644`. On a multi-user system, these defaults can allow other local users to traverse the directory and read the API credential. Although the placeholder itself is not a hardcoded secret, users are instructed to replace it with a real key. The resulting credential file could consequently expose a valid API credential. ### Attack Path 1. A user follows the setup instructions and replaces `YOUR_API_KEY` with a valid data.go.kr API key. 2. The shell creates `~/.config/data-go-kr/api_key` using the permissions permitted by the user's existing `umask`. 3. If the resulting directory and file are readable by other local accounts, an attacker with local system access reads the file. 4. The attacker copies the API key and uses it to submit unauthorized requests to the associated government-data APIs. 5. The unauthorized requests consume the victim's API quota and may cause service disruption, rate limiting, or account-level consequences. Exploitation requires access through another local account or process that can read the affected user's files; this finding does not independently grant remote access or elevated privileges. ### Impact Assessment The exposed privilege is limited to the access granted by the compromised data.go.kr API key. A succ ...[truncated 411 chars]
Remediation
## Remediation Suggestions Replace the setup commands with permission-safe credential provisioning: ```bash install -d -m 700 "$HOME/.config/data-go-kr" umask 077 printf '%s\n' "YOUR_API_KEY" > "$HOME/.config/data-go-kr/api_key" chmod 600 "$HOME/.config/data-go-kr/api_key" ``` Additional hardening measures: 1. Verify ownership and permissions before reading the key: ```bash test "$(stat -c '%a' "$HOME/.config/data-go-kr/api_key")" = "600" || { echo "Unsafe API key permissions" >&2; exit 1; } ``` 2. Ensure future scripts never print the credential in command output, logs, or error messages. 3. Avoid passing the key directly as a command-line argument, where it could appear in process listings. 4. Prefer an operating-system credential manager or secret store when available. 5. Document credential rotation and revocation procedures for suspected disclosure. 6. Add the credential path and equivalent secret files to source-control ignore rules.
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (15)

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger list includes generic terms such as "지원금", "복지", and "혜택", which are broad everyday topic words rather than narrowly scoped invocation phrases. The file does not provide exclusion conditions or negative examples, so the skill could be invoked unintentionally during ordinary discussion of benefits or welfare.

Session Persistence

Medium
Category
Rogue Agent
Content
- [보조금24](https://www.data.go.kr/data/15113968/openapi.do) (15113968)
3. 키 저장:
   ```bash
   mkdir -p ~/.config/data-go-kr
   echo "YOUR_API_KEY" > ~/.config/data-go-kr/api_key
   ```
> API 미등록 시에도 `web_search` 폴백으로 주요 복지 정보 조회 가능합니다.
Confidence
86% confidence
Finding
The setup instructions direct users to persist an API key in a plaintext file under ~/.config, which can expose credentials to other local processes, backups, shell history, or users if file permissions are not restricted. In the context of a skill that accesses government API services, leaked keys could enable unauthorized API use, quota exhaustion, or attribution of abuse to the legitimate user.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The beginner_alias list includes very generic Korean phrases such as '쉽게', '기초', and '어떻게 해?' that can appear in many unrelated conversations. This can cause unintended activation of the welfare skill, leading the agent to collect personal eligibility details or provide welfare-specific guidance when the user did not intend to enter this domain.

Vague Triggers

Medium
Confidence
91% confidence
Finding
The benefit_search triggers include broad phrases like '나 해당 돼?' and '맞춤 복지', which are underspecified and may match routine conversation once partial context is present. In a skill that handles eligibility guidance, accidental invocation increases the chance of unnecessary prompting for sensitive demographic and financial information.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The childcare intent includes '아이 키우면', a broad conversational phrase that may be used in general parenting discussions rather than welfare inquiries. Because this skill outputs support packages and may steer users toward benefits workflows, accidental matches can create privacy and trust issues through unsolicited benefit profiling.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The birth_support intent contains '출산하면', which is too broad and can appear in non-benefit discussions about childbirth. In this welfare context, the phrase can over-trigger government-support guidance and may prompt users for regional or family details they did not intend to share for benefit lookup.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The youth_support intent uses generic terms such as '청년 지원' and '취업 지원', which can refer to many non-welfare contexts including general career advice. This raises the risk of misrouting users into a government-benefits workflow and eliciting unnecessary age or eligibility information.

Vague Triggers

Medium
Confidence
94% confidence
Finding
Triggers like '어떻게 신청해?', '신청 방법', and '온라인 신청' are highly generic procedural phrases that could be uttered for almost any topic. In this skill, they can hijack unrelated conversations into welfare application guidance, creating confusion and increasing the chance of collecting unnecessary personal details about support programs.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The entire playbook, including required response text and disclaimers, is written only in Korean and provides no indication that users may choose another language. Under the language/locale policy, a skill should not impose a specific language unless the constraint is explicitly justified or the user is given a choice.

Vague Triggers

Medium
Confidence
89% confidence
Finding
The example phrases for benefit lookup are broad enough to match ordinary conversation about support or subsidies without clear exclusion or disambiguation rules. In this welfare context, over-broad routing can cause the agent to invoke this skill on ambiguous requests, leading to incorrect benefit guidance, unnecessary collection of sensitive personal details, or failure to hand off to a more appropriate skill.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The automatic beginner-mode switch is triggered by extremely generic keywords like 'easily', 'basic', and 'how do I do it?', which commonly appear in unrelated user requests. That makes misrouting likely and can suppress the correct intent path, reducing answer quality and potentially causing the system to omit important eligibility or application details in a government-benefits domain.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The file consists entirely of Korean-language output templates and does not include any natural-language indication that the user can choose another language. Under the policy rule, forcing a specific language without user opt-in can be a locale/language policy violation unless the regional constraint is clearly documented and justified.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The entire skill guidance is written only in Korean and provides no indication that users may choose another language or locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the regional constraint is explicitly justified.

Natural-Language Policy Violations

Low
Confidence
83% confidence
Finding
The domain name, disclaimer, trigger phrases, and glossary are all fixed in Korean, and the file does not indicate that language selection is optional or that the skill is intentionally limited to Korean users. Under the policy, forcing a specific language without user opt-in can be a natural-language policy issue.

Natural-Language Policy Violations

Low
Confidence
80% confidence
Finding
The file presents all routing instructions and trigger phrases exclusively in Korean, with no indication that users may choose another language. Under the language/locale policy, forcing a specific language without documented opt-in can be a policy issue unless the locale restriction is explicitly justified.

Static analysis

No suspicious patterns detected.