T09 · Insecure Skill Coding Practices
- Location
scripts/secret-scanner.sh:79- Finding
Secret Scanner Discloses Detected Credentials in JSON Output
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This security-monitoring skill is mostly coherent, but it needs Review because some scripts inspect local credential stores and one JSON mode can print secret values into logs.
Review before installing. Use it only if you are comfortable with local security-audit scripts reading credential metadata and selected credential files under your home directory. Avoid secret-scanner.sh --format=json until matches are masked or removed, and treat any generated reports or logs as sensitive. Prefer running individual scripts for the exact scope you intend instead of full-audit.sh when auditing only one repository.
scripts/secret-scanner.sh:79Secret Scanner Discloses Detected Credentials in JSON Output
scripts/token-watchdog.sh:98Full Audit Automatically Reads Account-Wide Credential and Private-Key Files
scripts/permission-auditor.sh:91Platform-Specific Permission Commands Can Cause Incorrect Security Results
scripts/git-hygiene.sh:251Tracked Sensitive Files Do Not Affect Git Hygiene Exit Status
This finding indicates the documented primary purpose differs from the actual effective capability, with the real emphasis reportedly being auditing installed skills rather than the infrastructure checks advertised. Such mismatch is dangerous because it can both hide undeclared inspection behavior and cause defenders to rely on nonexistent protections, leading to misconfiguration and missed incidents.
This finding indicates the documented primary purpose differs from the actual effective capability, with the real emphasis reportedly being auditing installed skills rather than the infrastructure checks advertised. Such mismatch is dangerous because it can both hide undeclared inspection behavior and cause defenders to rely on nonexistent protections, leading to misconfiguration and missed incidents.
This finding indicates the documented primary purpose differs from the actual effective capability, with the real emphasis reportedly being auditing installed skills rather than the infrastructure checks advertised. Such mismatch is dangerous because it can both hide undeclared inspection behavior and cause defenders to rely on nonexistent protections, leading to misconfiguration and missed incidents.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
echo -e "${BOLD}Checking .gitignore completeness...${RESET}"
REQUIRED_PATTERNS=(
".env"
".env.*"
"*.key"
"*.pem"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
echo -e "${BOLD}Checking .gitignore completeness...${RESET}"
REQUIRED_PATTERNS=(
".env"
".env.*"
"*.key"
"*.pem"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
echo -e "${BOLD}Checking .gitignore completeness...${RESET}"
REQUIRED_PATTERNS=(
".env"
".env.*"
"*.key"
"*.pem"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"*.keystore"
"id_rsa"
"id_ed25519"
"credentials.json"
"token.json"
"*.secret"
)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"*.keystore"
"id_rsa"
"id_ed25519"
"credentials.json"
"token.json"
"*.secret"
)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"*.keystore"
"id_rsa"
"id_ed25519"
"credentials.json"
"token.json"
"*.secret"
)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"*.keystore"
"id_rsa"
"id_ed25519"
"credentials.json"
"token.json"
"*.secret"
)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
SENSITIVE_PATHS=(
"$HOME/.config/fulcra/token.json"
"$HOME/.config/gh/hosts.yml"
"$HOME/.netrc"
"$HOME/.npmrc"
"$HOME/.pypirc"
"$HOME/.docker/config.json"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"$HOME/.config/fulcra/token.json"
"$HOME/.config/gh/hosts.yml"
"$HOME/.netrc"
"$HOME/.npmrc"
"$HOME/.pypirc"
"$HOME/.docker/config.json"
"$HOME/.kube/config"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"$HOME/.config/fulcra/token.json"
"$HOME/.config/gh/hosts.yml"
"$HOME/.netrc"
"$HOME/.npmrc"
"$HOME/.pypirc"
"$HOME/.docker/config.json"
"$HOME/.kube/config"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"$HOME/.netrc"
"$HOME/.npmrc"
"$HOME/.pypirc"
"$HOME/.docker/config.json"
"$HOME/.kube/config"
"$HOME/.aws/credentials"
"$HOME/.aws/config"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"$HOME/.netrc"
"$HOME/.npmrc"
"$HOME/.pypirc"
"$HOME/.docker/config.json"
"$HOME/.kube/config"
"$HOME/.aws/credentials"
"$HOME/.aws/config"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"$HOME/.npmrc"
"$HOME/.pypirc"
"$HOME/.docker/config.json"
"$HOME/.kube/config"
"$HOME/.aws/credentials"
"$HOME/.aws/config"
"$HOME/.gnupg"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"$HOME/.npmrc"
"$HOME/.pypirc"
"$HOME/.docker/config.json"
"$HOME/.kube/config"
"$HOME/.aws/credentials"
"$HOME/.aws/config"
"$HOME/.gnupg"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"$HOME/.pypirc"
"$HOME/.docker/config.json"
"$HOME/.kube/config"
"$HOME/.aws/credentials"
"$HOME/.aws/config"
"$HOME/.gnupg"
"$HOME/.secrets"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"$HOME/.pypirc"
"$HOME/.docker/config.json"
"$HOME/.kube/config"
"$HOME/.aws/credentials"
"$HOME/.aws/config"
"$HOME/.gnupg"
"$HOME/.secrets"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"$HOME/.docker/config.json"
"$HOME/.kube/config"
"$HOME/.aws/credentials"
"$HOME/.aws/config"
"$HOME/.gnupg"
"$HOME/.secrets"
"$HOME/.env"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Check group readable for very sensitive files
group_perms=${perms:(-2):1}
case "$spath" in
*credentials*|*token*|*.netrc|*.pypirc|*hosts.yml)
if [[ "$group_perms" =~ [4567] ]]; then
emit_finding "WARNING" "Group-Readable" "$spath is group-readable (perms: $perms)"
fi
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
--include='*.go' --include='*.rs' --include='*.java' --include='*.sh' \
--include='*.bash' --include='*.zsh' --include='*.yml' --include='*.yaml' \
--include='*.json' --include='*.xml' --include='*.toml' --include='*.ini' \
--include='*.cfg' --include='*.conf' --include='*.config' --include='*.env' \
--include='*.env.*' --include='*.properties' --include='*.tf' \
--include='*.md' --include='*.txt' --include='*.html' --include='*.css' \
--include='*.dockerfile' --include='Dockerfile' --include='*.csv' \
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
--include='*.go' --include='*.rs' --include='*.java' --include='*.sh' \
--include='*.bash' --include='*.zsh' --include='*.yml' --include='*.yaml' \
--include='*.json' --include='*.xml' --include='*.toml' --include='*.ini' \
--include='*.cfg' --include='*.conf' --include='*.config' --include='*.env' \
--include='*.env.*' --include='*.properties' --include='*.tf' \
--include='*.md' --include='*.txt' --include='*.html' --include='*.css' \
--include='*.dockerfile' --include='Dockerfile' --include='*.csv' \
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).
fi
fi
# Check for chmod 777 or overly permissive operations
bad_chmod=$(echo "$content" | grep -noE 'chmod\s+(777|666|a\+[rwx])' 2>/dev/null | head -3) || true
if [[ -n "$bad_chmod" ]]; then
while IFS= read -r match; do
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
NPMRC="$HOME/.npmrc"
if [[ -f "$NPMRC" ]]; then
if grep -q '_authToken' "$NPMRC" 2>/dev/null; then
emit_token "INFO" "NPM" "Auth token present in ~/.npmrc"
else
emit_token "MISSING" "NPM" "No auth token in ~/.npmrc"
fi
No suspicious patterns detected.