T09 · Insecure Skill Coding Practices
- Location
scripts/fetch_products.py:238- Finding
API Key Exposed Through Process Command-Line Arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly a coherent product-comparison integration, but it includes unsafe troubleshooting and credential/file-handling practices that warrant review before installation.
Review before installing. Use a dedicated Zyte API key with limited quota, do not store real keys in shared or committed config files, avoid authenticated or sensitive URLs, and do not run the documented /etc/resolv.conf command. Raw extraction files may be left in predictable /tmp paths, so use this only in a trusted local environment or revise the scripts first.
scripts/fetch_products.py:238API Key Exposed Through Process Command-Line Arguments
SKILL.md:73API Key Prefix Disclosed During Environment Validation
scripts/fetch_products.py:99Predictable Shared Temporary Files Permit Symlink Attacks and Data Exposure
SKILL.md:278Troubleshooting Instructions Overwrite Global DNS Configuration
README.md:117Documentation Encourages Plaintext API-Key Persistence
The declared description presents a higher-level product comparison skill: extracting structured product data, building side-by-side comparison tables, and providing intelligent purchase recommendations. The supplied code chunk only implements the fetch stage. It sends Zyte API requests with {"url": ..., "product": true}, handles retries/rate limits, saves raw API responses to /tmp/product__raw.json, and prints a machine-readable fetch summary. While this partially aligns with the extraction portion of the description, it does not itself perform structured parsing, cross-product comparison, table generation, or recommendation logic. Therefore the code's actual behavior is materially narrower than the declared primary purpose.
The description presents a higher-level product comparison skill: ingest multiple e-commerce URLs, use the Zyte API, compare products, and recommend which to buy. The actual code chunk is much narrower. It only parses an already-saved Zyte API response from a local file into normalized JSON for one product. This parsing step could be a supporting component of the broader skill, but by itself it does not implement the core declared behaviors—API extraction from URLs, multi-product comparison, comparison tables, or purchase recommendations. Therefore the supplied code chunk does not accurately represent the declared purpose.
The markdown recommends a destructive privileged system change without warning about its scope or side effects. Overwriting /etc/resolv.conf can break local name resolution, alter security monitoring and policy enforcement, and affect unrelated applications and sessions beyond the skill's execution.
The README describes extracting product data from user-provided URLs via the Zyte API but does not prominently warn that those URLs will be transmitted to a third-party service. Even if the URLs are public pages, they may contain sensitive query strings, tracking tokens, private storefront paths, or business-sensitive browsing intent, so silent sharing creates a privacy and data-handling risk.
The README says the skill triggers automatically when it detects product-comparison intent and e-commerce URLs, but does not define clear activation boundaries or exclusions. In an agent environment, ambiguous triggers can cause unintended invocation on loosely related prompts or pasted URLs, leading to unnecessary outbound requests, surprise actions, and possible disclosure of user-supplied links to the external service.
The README tells users to overwrite /etc/resolv.conf with nameserver 8.8.8.8, which is a privileged system-wide network configuration change unrelated to the core product-comparison function. This can disrupt enterprise DNS, break VPN/split-DNS setups, weaken monitoring or policy enforcement, and trains users to run unsafe commands copied from troubleshooting docs.
The skill instructs the agent to perform network access and write response files under /tmp, but it does not declare any explicit tool scope or permissions boundary. That increases the risk of over-broad execution because a host system may allow capabilities beyond what the skill actually needs, making misuse or accidental abuse harder to constrain and audit.
The trigger phrases are overly broad and can cause the skill to activate for common shopping-advice requests that may not require external fetching or API use. Overbroad activation increases the chance of unnecessary network access, secret use via ZYTE_API_KEY, and unintended processing of user-provided URLs, especially when the skill also has side effects like writing files and making remote calls.
The skill tells the operator to overwrite /etc/resolv.conf with a public DNS server. That is a privileged system configuration change unrelated to the core business logic of product comparison, and it can disrupt host networking, bypass enterprise DNS controls, and create confidentiality and integrity risks for all subsequent network traffic on the system.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
req = urllib.request.Request(
"https://api.zyte.com/v1/extract",
data=payload,
headers=headers,
method="POST",
Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
No suspicious patterns detected.