Back to skill

Security audit

aso-keywords-metadata-rewrite

Security checks for vulnerabilities and agentic risk

Overview

The research task is coherent, but its optional automation grants broader repository access than needed and handles an API key insecurely.

The main workflow drafts metadata and consumes disclosed AppGoat credits. Before enabling scheduled automation, restrict repository changes to the intended output, pin and install only the needed skill, and correct credential handling so secrets avoid command arguments and temporary files have restricted access.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

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

md
with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          prompt: |
            Use the aso-keywords-metadata-rewrite skill for <app link>, country us. Do not call track_keywords.
            Write the result to metadata/us.md, commit it on a new branch and open a pull request with gh pr create.
          claude_args: |
            --mcp-config ${{ runner.temp }}/appgoat-mcp.json

The comment says the API key is not placed on the command line, but jq receives it as a command-line argument.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The shell expands APPGOAT_API_KEY into jq's command-line arguments, contradicting the comment and potentially exposing the credential to processes or monitoring tools permitted to inspect process arguments. The short-lived command on a hosted CI runner reduces the exposure window, but a stolen key could permit unauthorized AppGoat usage and credit consumption.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
cp -r /tmp/appgoat-skills/skills/* .claude/skills/
          # Hosted AppGoat MCP server; the key goes into a file, not the command line.
          jq -n --arg key "$APPGOAT_API_KEY" \
            '{mcpServers: {appgoat: {type: "http", url: "https://api.appgoat.ai/mcp", headers: {"x-api-key": $key}}}}' \
            > "$RUNNER_TEMP/appgoat-mcp.json"
      - uses: anthropics/claude-code-action@v1
        env:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · reference/api.md (reported line 3)May include surrounding context.

md
# REST fallback

Without the AppGoat MCP server, call the API directly. Base URL `https://api.appgoat.ai/v1`,
header `x-api-key: $APPGOAT_API_KEY` (create a key at https://dash.appgoat.ai). Responses are
`{ "data": …, "meta": { "credits_used", "credits_remaining", … } }`; errors carry `error.hint`.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · reference/api.md (reported line 19)May include surrounding context.

| get_keyword_ranks | GET /tracked-keywords/{id}/ranks?app={app_id} |

bash
curl -s -G -H "x-api-key: $APPGOAT_API_KEY" https://api.appgoat.ai/v1/keywords \
  --data-urlencode "qs=habit tracker,daily routine" -d store=apple -d country=us -d app=284882215

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · reference/api.md (reported line 19)May include surrounding context.

| get_keyword_ranks | GET /tracked-keywords/{id}/ranks?app={app_id} |

bash
curl -s -G -H "x-api-key: $APPGOAT_API_KEY" https://api.appgoat.ai/v1/keywords \
  --data-urlencode "qs=habit tracker,daily routine" -d store=apple -d country=us -d app=284882215

Static analysis

No suspicious patterns detected.