T09 · Insecure Skill Coding Practices
- Location
hooks/scripts/check-config.sh:12- Finding
Arbitrary Command Execution Through Project-Controlled Environment File
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
DepRadar is mostly a disclosed dependency scanner, but it installs an automatic session-start hook that can execute shell code from a project config file.
Review before installing. At minimum, disable or fix the SessionStart hook so dotenv files are parsed without shell source, avoid project-controlled .claude/depradar.env in untrusted repos, pin or skip automatic npm dependency installation, use least-privilege API tokens, and only send notifications to webhook URLs you control.
hooks/scripts/check-config.sh:12Arbitrary Command Execution Through Project-Controlled Environment File
scripts/depradar.py:769API Credentials Written Without Enforced Restrictive Permissions
scripts/lib/notify.py:27Slack Notification Target Permits Arbitrary HTTP Endpoints
scripts/sync.sh:165Installer Automatically Resolves and Executes Unlocked npm Dependencies
scripts/lib/render.py:367Untrusted Community and Release Content Is Embedded in Agent-Consumed Output
Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
mkdir -p .claude
cat > .claude/depradar.env << 'EOF'
# Project-level settings — safe to commit (no secrets here)
# GITHUB_TOKEN and other secrets should stay in ~/.config/depradar/.env
EOF
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
Cache is stored in ~/.cache/depradar/. Delete it to clear everything:
rm -rf ~/.cache/depradar/
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
Cache is stored in ~/.cache/depradar/. Delete it to clear everything:
rm -rf ~/.cache/depradar/
The finding indicates the skill performs configuration loading and credential availability checks rather than the stated dependency analysis workflow. Touching local config and secrets-adjacent material under the guise of a scanner is risky because users may not expect the skill to inspect auth setup or build request headers to third-party services.
The finding indicates the skill performs configuration loading and credential availability checks rather than the stated dependency analysis workflow. Touching local config and secrets-adjacent material under the guise of a scanner is risky because users may not expect the skill to inspect auth setup or build request headers to third-party services.
The finding indicates the skill performs configuration loading and credential availability checks rather than the stated dependency analysis workflow. Touching local config and secrets-adjacent material under the guise of a scanner is risky because users may not expect the skill to inspect auth setup or build request headers to third-party services.
The finding indicates the skill performs configuration loading and credential availability checks rather than the stated dependency analysis workflow. Touching local config and secrets-adjacent material under the guise of a scanner is risky because users may not expect the skill to inspect auth setup or build request headers to third-party services.
The finding indicates the skill performs configuration loading and credential availability checks rather than the stated dependency analysis workflow. Touching local config and secrets-adjacent material under the guise of a scanner is risky because users may not expect the skill to inspect auth setup or build request headers to third-party services.
The finding indicates the skill performs configuration loading and credential availability checks rather than the stated dependency analysis workflow. Touching local config and secrets-adjacent material under the guise of a scanner is risky because users may not expect the skill to inspect auth setup or build request headers to third-party services.
The finding indicates the skill performs configuration loading and credential availability checks rather than the stated dependency analysis workflow. Touching local config and secrets-adjacent material under the guise of a scanner is risky because users may not expect the skill to inspect auth setup or build request headers to third-party services.
The finding indicates the skill performs configuration loading and credential availability checks rather than the stated dependency analysis workflow. Touching local config and secrets-adjacent material under the guise of a scanner is risky because users may not expect the skill to inspect auth setup or build request headers to third-party services.
The finding indicates the skill performs configuration loading and credential availability checks rather than the stated dependency analysis workflow. Touching local config and secrets-adjacent material under the guise of a scanner is risky because users may not expect the skill to inspect auth setup or build request headers to third-party services.
Referenced artifact was not completely inspected
Where `{SKILL_ROOT}` is the directory containing this `SKILL.md` file.
Referenced artifact was not completely inspected
Where `{SKILL_ROOT}` is the directory containing this `SKILL.md` file.
The skill includes instructions to access and modify agent configuration/install directories under ~/.claude, ~/.codex, and ~/.agents. These locations are sensitive because changes there can affect future agent behavior, persistence, and trust boundaries beyond the current project.
> "GitHub API rate limit reached. Add `GITHUB_TOKEN` to `~/.config/depradar/.env` for 5,000 requests/hour. Run `/depradar --diagnose` to check your config."
**Script not found:**
> "Could not find `depradar.py`. Make sure the skill is installed: copy the `depradar-skill/` directory to `~/.claude/skills/`. Run `bash ~/.claude/skills/depradar-skill/scripts/sync.sh` to install."
**Python not found:**
> "Python 3.8+ is required. Install from python.org or via: `brew install python3` (Mac) / `sudo apt install python3` (Linux)."
The skill directs use of a local .env file containing API tokens and discusses reading those credentials for operation. In an agent setting, referencing secret-bearing files increases the risk of credential exposure through logs, accidental echoing, or overbroad file access beyond what a dependency scan should need.
# ~/.config/depradar/.env
# Strongly recommended — free at github.com/settings/tokens
# Scopes needed: (none — public repos only)
The troubleshooting advice instructs appending a GitHub token to ~/.config/depradar/.env. Encouraging direct secret material creation in predictable paths can lead to insecure storage practices and increases the chance that an agent later reads or mishandles the token.
Fix: Add GITHUB_TOKEN to ~/.config/depradar/.env:
echo "GITHUB_TOKEN=ghp_yourtoken" >> ~/.config/depradar/.env
Get a token at: github.com/settings/tokens (no scopes needed for public repos)
Package name closely resembles a popular package, suggesting possible typosquatting. Attackers publish malicious packages with similar names to trick developers into installing them.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# ── Locate config files ────────────────────────────────────────────────────────
PROJECT_ENV=".claude/depradar.env"
GLOBAL_ENV="$HOME/.config/depradar/.env"
# Load project-level env if present
if [[ -f "$PROJECT_ENV" ]]; then
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# ── Locate config files ────────────────────────────────────────────────────────
PROJECT_ENV=".claude/depradar.env"
GLOBAL_ENV="$HOME/.config/depradar/.env"
# Load project-level env if present
if [[ -f "$PROJECT_ENV" ]]; then
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# ── Locate config files ────────────────────────────────────────────────────────
PROJECT_ENV=".claude/depradar.env"
GLOBAL_ENV="$HOME/.config/depradar/.env"
# Load project-level env if present
if [[ -f "$PROJECT_ENV" ]]; then
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# ── Locate config files ────────────────────────────────────────────────────────
PROJECT_ENV=".claude/depradar.env"
GLOBAL_ENV="$HOME/.config/depradar/.env"
# Load project-level env if present
if [[ -f "$PROJECT_ENV" ]]; then
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# ── Locate config files ────────────────────────────────────────────────────────
PROJECT_ENV=".claude/depradar.env"
GLOBAL_ENV="$HOME/.config/depradar/.env"
# Load project-level env if present
if [[ -f "$PROJECT_ENV" ]]; then
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# ── Locate config files ────────────────────────────────────────────────────────
PROJECT_ENV=".claude/depradar.env"
GLOBAL_ENV="$HOME/.config/depradar/.env"
# Load project-level env if present
if [[ -f "$PROJECT_ENV" ]]; then
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# ── Locate config files ────────────────────────────────────────────────────────
PROJECT_ENV=".claude/depradar.env"
GLOBAL_ENV="$HOME/.config/depradar/.env"
# Load project-level env if present
if [[ -f "$PROJECT_ENV" ]]; then