T01 · Skill Instruction Hijacking
- Location
scripts/commands/agents.sh:129- Finding
Indirect Prompt Injection Through Repository-Controlled Content
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has a coherent project-dashboard purpose, but it reads and stores repository and agent-instruction content with weak scoping and hardening.
Install only after reviewing the code and using it on repositories you trust. Keep ~/.god-mode private, avoid custom analysis.agentFiles entries with absolute paths or .. components, do not automatically send generated prompts to an LLM with write-capable tools, and prefer a non-persistent PATH setup unless you trust the cloned scripts directory.
scripts/commands/agents.sh:129Indirect Prompt Injection Through Repository-Controlled Content
scripts/lib/db.sh:23SQL Injection Through Raw SQLite String Interpolation
scripts/lib/analysis/agents.sh:28Repository-Boundary Bypass in Configurable Agent-File Discovery
scripts/lib/config.sh:195Unsafe yq Expression Construction From Project Metadata
scripts/lib/db.sh:4Plaintext Sensitive Cache Created Without Explicit Permission Hardening
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
Testing
npm test before commits
## Installation
### Prerequisites
- `gh` - [GitHub CLI](https://cli.github.com/) (authenticated)
- `sqlite3` - Usually pre-installed
- `jq` - `brew install jq` or `apt install jq`
### Install
```bash
# Clone
git clone https://github.com/InfantLab/god-mode-skill
cd god-mode-skill
# Add to PATH
echo 'export PATH="$PATH:'$(pwd)'/scripts"' >> ~/.bashrc
source ~/.bashrc
# Setup
god setup
Or for OpenClaw:
openclaw skills add god-mode
# 1. Add your first project
god projects add github:yourname/yourrepo
# 2. Sync data
god sync
# 3. See the overview
god status
# 4. Analyze your agents.md
god agents analyze yourrepo
| Command | Description |
|---|---|
god status | Overview of all projects |
god status <project> | Details for one project |
god sync | Fetch latest data |
The skill includes a first-run setup workflow that creates directories, initializes config/database state, checks dependencies/authentication, and may add repositories and trigger syncs, but the top-level description does not emphasize this bootstrap and mutation role. Users expecting passive oversight may unknowingly authorize filesystem changes and external sync activity, which raises both integrity and privacy concerns.
The skill includes a first-run setup workflow that creates directories, initializes config/database state, checks dependencies/authentication, and may add repositories and trigger syncs, but the top-level description does not emphasize this bootstrap and mutation role. Users expecting passive oversight may unknowingly authorize filesystem changes and external sync activity, which raises both integrity and privacy concerns.
The skill includes a first-run setup workflow that creates directories, initializes config/database state, checks dependencies/authentication, and may add repositories and trigger syncs, but the top-level description does not emphasize this bootstrap and mutation role. Users expecting passive oversight may unknowingly authorize filesystem changes and external sync activity, which raises both integrity and privacy concerns.
The skill includes a first-run setup workflow that creates directories, initializes config/database state, checks dependencies/authentication, and may add repositories and trigger syncs, but the top-level description does not emphasize this bootstrap and mutation role. Users expecting passive oversight may unknowingly authorize filesystem changes and external sync activity, which raises both integrity and privacy concerns.
The skill includes a first-run setup workflow that creates directories, initializes config/database state, checks dependencies/authentication, and may add repositories and trigger syncs, but the top-level description does not emphasize this bootstrap and mutation role. Users expecting passive oversight may unknowingly authorize filesystem changes and external sync activity, which raises both integrity and privacy concerns.
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.
Testing (not mentioned)
But 31% of your commits touch tests
→ Add: "Write tests for new code"
📝 SUGGESTED ADDITIONS
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.
4. **Suggests improvements** based on your patterns
Example insights:
- "You write lots of tests but don't mention testing in agents.md"
- "40% of commits are error-handling fixes - add error handling guidance"
- "Your 'use TypeScript strict' instruction is working - 0 type errors"
The skill advertises commands that sync data from GitHub and other providers, which implies network access, but it does not declare an explicit tool scope such as permissions or allowed-tools. This weakens user visibility and policy enforcement around outbound access, increasing the chance that an agent invokes network-capable behavior without clear authorization boundaries.
The skill stores project data and analyses locally in ~/.god-mode, including commits, PRs, issues, and saved contexts, which creates persistent retention of potentially sensitive repository metadata. While persistence is part of the advertised design, it still expands the exposure window if the local machine is shared, compromised, or subject to over-collection beyond what users expect.
## Overview
**god-mode** gives you a bird's-eye view of all your coding projects and coaches you to write better AI agent instructions.
**Key features:**
- Multi-project status dashboard
The script assembles repository metadata, full agent instruction content, commit summaries, and recent commit messages into a prompt and prints it for downstream LLM handling. That can expose sensitive internal codebase context, secrets accidentally present in agents.md or commit messages, and private repository identifiers to an external model or logs without any consent, warning, redaction, or policy gate.
The usage/help text frames the command as only listing and managing configured projects. In practice, adding a project also initializes and upserts into the database, and removing a project can delete commits, pull requests, issues, sync state, analyses, and project rows, which is materially broader than the documented behavior.
The file header and help text describe this script as god status that shows an overview or project details, but the script calls show_project_detail/show_overview at L67-L70 before those functions are defined later in the file. In bash scripts, this means the documented behavior is contradicted by the actual execution flow, which will fail rather than provide status output.
This code stores full agent file contents in the database, not just a hash or metadata, which can persist sensitive instructions, secrets, internal URLs, or prompt-injection content longer than necessary. In the god-mode context, which aggregates cross-repo project status and agent guidance, central retention increases blast radius if the database is later queried by broader tooling or exposed to unauthorized users.
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.
echo ""
# Step 2: Create directories
echo -e "${BOLD}Setting up directories...${RESET}"
echo ""
The install instructions append a new PATH entry to ~/.bashrc and immediately source it, which creates a persistent shell-environment change without warning the user. While common in setup guides, persistent profile modification can unexpectedly affect later sessions, command resolution, and troubleshooting, especially if users do not realize a repo-local scripts directory has been permanently trusted.
The script first initializes the database and immediately dispatches to a status view at L56-L71, then repeats a second 'Run the appropriate view' dispatch at L305-L315. This contradicts the implied intent of a single status command execution and indicates the code structure does not match the documented command behavior.
This code calls the GitHub API to retrieve repository file contents and then returns the decoded content, but there is no confirmation prompt or user-facing disclosure at the point of network access. Because the operation transmits repository identifiers to an external service and reads remote content, it fits the code-file warning criterion.
The function reads the discovered local agent file with cat and packages its full contents into JSON, but there is no confirmation prompt, print/log message, or explicit warning near this data-access behavior. Reading and surfacing local instruction files may affect user privacy expectations, so the behavior should be disclosed.
This code file performs data access and analysis over commit messages and later author metadata, which may contain sensitive project or personal information. Although the file has developer-facing comments about its purpose, it lacks any user-facing prompt, log, or warning indicating that repository history content will be queried and processed.
The code initializes and writes to a SQLite database at a user-home path, creating directories and a database file if needed. Although the file contains developer comments and one echo during initialization, there is no consistent user disclosure for ongoing write operations such as inserts and updates performed throughout this library.
At L60, the comment says Azure and GitLab are "Stubbed, not fully implemented," and provider_supported returns failure for them. But provider_call at L38-L47 actively dispatches Azure and GitLab function names as if those providers are available. This creates an intent/documentation contradiction about which providers the interface actually supports.
No suspicious patterns detected.