Back to skill

Security audit

Islamic Companion

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed Islamic utility, but it has a serious shell-configuration execution weakness plus insecure handling of location/API data that users should review before installing.

Install only if you are comfortable reviewing and fixing shell scripts first. Avoid storing the Zakat API key in config.json, do not run scheduler setup unless you have inspected the CRON_ADD jobs, and prefer HTTPS-only API paths before using Quran or calendar features on untrusted networks.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
lib/config.sh:25
Finding

Arbitrary Command Execution Through Generated Shell Configuration

Content
View full analysis
"$bash_file" <&2 return 1 fi ``` ### Technical Analysis Values obtained from `config.json` are interpolated directly into a shell script without shell-safe serialization. The resulting `config.bash` is then sourced into the current process. JSON string v ...[truncated 1737 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
lib/zakat.sh:17
Finding

Zakat API Key Exposed Through Process Arguments and Error Logs

Content
View full analysis
&2 return 1 fi local url="https://islamicapi.com/api/v1/zakat-nisab?api_key=${api_key}¤cy=${currency}&standard=common&unit=g" local response=$(api_call "$url") ``` The complete URL is passed to `curl` and printed on failure: ```bash api_call() { local url="$1" local retries="${2:-3}" local response local http_code local count=0 while [ $count -lt $retries ]; do # Fetch with curl, capturing HTTP code and content # Using -w to get http code at the end response=$(curl -sL -w "\n%{http_code}" "$url") ``` ```bash # If failed after retries echo "Error: API request failed after $retries attempts. URL: $url HTTP: $http_code" >&2 if [ ! -z "$content" ]; then echo "Response: $content" >&2 fi return 1 ``` ### Technical Analysis Placing a secret in a URL query string creates several disclosure channels: - The URL is supplied as a command-line argument to `curl` and may be visible to local process inspection tools while the request is running. - The entire URL, including `api_key`, is written to standard error after a failed request. - Captured terminal output, agent logs, cron logs, monitoring systems, or support bundles may retain the key. - Query strings may be recorded by upstream HTTP infrastructure and server-side access logs. HTTPS protects the request in transit but does not prevent exposure through local process arguments or application and server logging. The Python implementation in `src/api.py` also uses a query parameter, but it does not explicitly print the complete c ...[truncated 1239 chars]
Remediation
View remediation
` with `api_key=[REDACTED]`. - Change `api_call` so error messages report only the destination host, path, and status code, not the complete query string. - Avoid printing untrusted response bodies by default because they may contain reflected secrets or sensitive diagnostics. - Use a protected secret store or an environment variable rather than plaintext `config.json`. - Rotate any API key that may already have appeared in terminal, agent, or scheduler logs. - Review external service logs and retention policies for query-string handling. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
lib/calendar.sh:27
Finding

Plaintext HTTP Allows Interception and Tampering of Calendar and Quran Traffic

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Unpinned Python Dependency Produces Non-Reproducible and Unverified Installations

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (58)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Generating job scheduling commands and system-event payloads introduces persistence and potential local operational side effects beyond a simple information utility. In context, the skill already warns users to review cron output, which reduces severity, but the top-level purpose still understates the risk of automation-related behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Generating job scheduling commands and system-event payloads introduces persistence and potential local operational side effects beyond a simple information utility. In context, the skill already warns users to review cron output, which reduces severity, but the top-level purpose still understates the risk of automation-related behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Generating job scheduling commands and system-event payloads introduces persistence and potential local operational side effects beyond a simple information utility. In context, the skill already warns users to review cron output, which reduces severity, but the top-level purpose still understates the risk of automation-related behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Generating job scheduling commands and system-event payloads introduces persistence and potential local operational side effects beyond a simple information utility. In context, the skill already warns users to review cron output, which reduces severity, but the top-level purpose still understates the risk of automation-related behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Generating job scheduling commands and system-event payloads introduces persistence and potential local operational side effects beyond a simple information utility. In context, the skill already warns users to review cron output, which reduces severity, but the top-level purpose still understates the risk of automation-related behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Generating job scheduling commands and system-event payloads introduces persistence and potential local operational side effects beyond a simple information utility. In context, the skill already warns users to review cron output, which reduces severity, but the top-level purpose still understates the risk of automation-related behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Generating job scheduling commands and system-event payloads introduces persistence and potential local operational side effects beyond a simple information utility. In context, the skill already warns users to review cron output, which reduces severity, but the top-level purpose still understates the risk of automation-related behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Generating job scheduling commands and system-event payloads introduces persistence and potential local operational side effects beyond a simple information utility. In context, the skill already warns users to review cron output, which reduces severity, but the top-level purpose still understates the risk of automation-related behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Generating job scheduling commands and system-event payloads introduces persistence and potential local operational side effects beyond a simple information utility. In context, the skill already warns users to review cron output, which reduces severity, but the top-level purpose still understates the risk of automation-related behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Generating job scheduling commands and system-event payloads introduces persistence and potential local operational side effects beyond a simple information utility. In context, the skill already warns users to review cron output, which reduces severity, but the top-level purpose still understates the risk of automation-related behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Generating job scheduling commands and system-event payloads introduces persistence and potential local operational side effects beyond a simple information utility. In context, the skill already warns users to review cron output, which reduces severity, but the top-level purpose still understates the risk of automation-related behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Generating job scheduling commands and system-event payloads introduces persistence and potential local operational side effects beyond a simple information utility. In context, the skill already warns users to review cron output, which reduces severity, but the top-level purpose still understates the risk of automation-related behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Generating job scheduling commands and system-event payloads introduces persistence and potential local operational side effects beyond a simple information utility. In context, the skill already warns users to review cron output, which reduces severity, but the top-level purpose still understates the risk of automation-related behavior.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · src/scheduler.py (reported line 19)May include surrounding context.

python
now = datetime.now()
    today_str = now.strftime("%Y-%m-%d")
    
    # We output instructions for the user/agent on what to schedule.
    # In a real automated environment, the agent would parse this or we'd use a tool directly.
    # The plan says to print CRON_ADD lines.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The README shows a fixed quran_language value of id, which suggests the skill is configured to use Indonesian by default. The document does not indicate that users can choose another language or that this locale restriction is optional, which may violate language/locale choice policy.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill documentation declares no explicit tool permissions even though the described behavior clearly requires shell execution, network access, environment variable access, and local file read/write. This weakens review boundaries and can lead an agent platform to grant broader capabilities than users expect, especially given features like cron generation, caching, and API-backed lookups.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The configuration sets quran_language to id, which establishes a specific language/locale preference in the skill documentation. Under the policy, forcing a specific language without offering user choice or making the constraint explicitly justified is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The quran_language field is hard-coded to id, which indicates a fixed language/locale choice in configuration. Because there is no accompanying indication of user selection, opt-in, or region-specific justification in this file, it appears to enforce a specific language and may violate the stated language/locale policy.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The helper prints the full failed-response body and URL to stderr after retry exhaustion. Failed API responses often contain sensitive data such as tokens, account details, request echoes, or internal error diagnostics, so unconditional logging can leak secrets into terminal history, CI logs, or centralized logging systems.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

This code transmits user-supplied location information to an external third-party service, which is security-relevant because it shares potentially sensitive user location context outside the local environment. In this file, the risk is increased because the transmission occurs over HTTP rather than HTTPS, enabling both privacy leakage and response tampering in transit.

Content

Scanner excerpt · lib/calendar.sh (reported line 31)May include surrounding context.

sh
local enc_city=$(url_encode "$city")
    local enc_country=$(url_encode "$country")
    
    local url="http://api.aladhan.com/v1/calendarByCity?city=${enc_city}&country=${enc_country}&method=${CALCULATION_METHOD}&school=${CALCULATION_SCHOOL}&month=${month}&year=${year}"
    
    local response=$(api_call "$url")
    if [ $? -eq 0 ] && [ ! -z "$response" ]; then

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The calendar API request is made over plain HTTP, which exposes user query data such as city, country, and timing preferences to interception or modification by anyone on the network path. Because the response influences prayer calendar output, an active attacker could tamper with returned timings and mislead users without detection.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script reads zakat.api_key from config.json and writes it directly into config.bash, then later sources that generated file. This persists a secret in an additional plaintext artifact, increasing exposure through accidental commits, backups, loose file permissions, or other local disclosure paths; because the generated file is executable shell syntax, unescaped secret content could also create sourcing risk if the JSON helper does not safely sanitize values.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

This code performs an outbound request to api.aladhan.com and embeds exact geographic coordinates in the URL query string. In the context of an Islamic prayer utility, the transmission is functionally related to the feature, but it still constitutes external disclosure of potentially sensitive location data to a third party and should be treated as a privacy-relevant vulnerability if not transparently handled.

Content

Scanner excerpt · lib/prayer.sh (reported line 27)May include surrounding context.

sh
fi
    
    # Fetch from API
    local url="https://api.aladhan.com/v1/timings/${today}?latitude=${LOCATION_LATITUDE}&longitude=${LOCATION_LONGITUDE}&method=${CALCULATION_METHOD}&school=${CALCULATION_SCHOOL}"
    
    local response=$(api_call "$url")
    if [ $? -eq 0 ] && [ ! -z "$response" ]; then

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The function constructs a remote API request that includes precise latitude and longitude values, which are sensitive location data, and sends them to a third-party service without any user-facing notice or consent flow in this file. Even though HTTPS is used, this still exposes user location to an external provider and may create privacy and compliance risks if users are unaware of the transmission.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest describes the skill as providing Islamic utilities for prayer times, fasting schedules, and Zakat calculations. This file instead implements a quote feature, including random quote retrieval from a remote quotes API and a scheduled daily quote automation flow, which is a separate user-facing capability not covered by that description.

Content

No source excerpt is available for this finding.