T08 · Insecure Dependencies
- Location
SKILL.md:35- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does what it says, but its authentication guidance can expose account passwords through command-line arguments and plaintext credential files without adequate warnings.
Install only if you are comfortable managing gallery-dl and its credentials yourself. Avoid putting real passwords on the command line, prefer restricted tokens or safer auth methods where possible, and if you use .netrc or config files, protect them with owner-only permissions and remove or rotate credentials when no longer needed.
SKILL.md:35Unpinned Third-Party Dependency Installation
scripts/gallery.py:28Authentication Password Exposed Through Command-Line Arguments
SKILL.md:149Plaintext Credential Files Recommended Without Permission Hardening
Listing --username, --password, and --netrc as routine options normalizes credential entry mechanisms that are unsafe in many agent and CLI environments. Command-line credentials are commonly exposed through shell history, process inspection, audit logs, and agent execution traces, making this a real credential-access risk.
| `--limit N` | Limit number of downloads | no limit |
| `--username USER` | Login username | - |
| `--password PASS` | Login password | - |
| `--netrc` | Use .netrc for auth | false |
---
The example explicitly instructs users to supply credentials on the command line, which is a well-known secret-handling weakness. In a tool-using agent context, those credentials may be captured in transcripts, command logs, observability pipelines, or visible to other local users via process metadata.
gallery-dl "URL" --username USER --password PASS
### 2. .netrc File
Create `~/.netrc`:
Creating ~/.netrc introduces persistent plaintext credentials on disk, which can be harvested if file permissions are weak, backups are exposed, or the host is shared. While .netrc can be acceptable in some Unix workflows, the skill omits critical safeguards and therefore presents a real credential-handling risk.
Create ~/.netrc:
machine twitter.com
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
parser.add_argument('-v', '--verbose', action='store_true', help='Verbose output')
parser.add_argument('--username', help='Username for authentication')
parser.add_argument('--password', help='Password for authentication')
parser.add_argument('--netrc', action='store_true', help='Use .netrc for authentication')
parser.add_argument('--config', help='Custom config file')
args = parser.parse_args()
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
parser.add_argument('-v', '--verbose', action='store_true', help='Verbose output')
parser.add_argument('--username', help='Username for authentication')
parser.add_argument('--password', help='Password for authentication')
parser.add_argument('--netrc', action='store_true', help='Use .netrc for authentication')
parser.add_argument('--config', help='Custom config file')
args = parser.parse_args()
The activation criteria are broad enough to match many generic image-download requests, which can cause the agent to invoke this skill in contexts the user did not explicitly intend. That increases the chance of unnecessary package installation, network access to third-party sites, or guidance for downloading content from services with legal, privacy, or policy constraints.
The skill documents passing usernames and passwords directly on the command line and storing credentials in plaintext config files without warning about process-list exposure, shell history retention, file-permission requirements, or safer alternatives. In an agent setting, this can lead to credential leakage into logs, transcripts, telemetry, or multi-user system artifacts.
The guidance to create ~/.netrc and a persistent config file encourages long-lived session or credential persistence on the local machine. In an agent environment, this can outlast the immediate task, broaden the blast radius of host compromise, and create unintended cross-task access to third-party accounts.
Create ~/.netrc:
machine twitter.com
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def run_gallery_dl(args_list):
"""Run gallery-dl command"""
# Check if gallery-dl is installed
result = subprocess.run(['which', 'gallery-dl'], capture_output=True)
if result.returncode != 0:
print("❌ gallery-dl not found. Install with: pip install gallery-dl")
sys.exit(1)
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
print("❌ gallery-dl not found. Install with: pip install gallery-dl")
sys.exit(1)
result = subprocess.run(['gallery-dl'] + args_list, capture_output=True, text=True)
return result.returncode, result.stdout, result.stderr
def main():
This wrapper accepts usernames and passwords as command-line arguments, which can expose secrets through shell history, process listings, audit logs, and orchestration tooling. In an agent or multi-user environment, that significantly increases the chance of credential disclosure beyond the intended destination service.