agentscrub

v1.1.29 suspicious
6.0
Medium Risk

Scrub secrets and credentials from AI coding assistant session logs

🤖 AI Analysis

Final verdict: SUSPICIOUS

The package shows signs of potential misuse due to its network and shell execution capabilities, despite no clear evidence of malicious intent. Further scrutiny is advised.

  • network risk due to urllib usage
  • shell risk from subprocess calls
Per-check LLM notes
  • Network: The use of urllib to make network calls could be legitimate but requires further investigation into the purpose and destinations.
  • Shell: Subprocess calls to shell commands like 'du' and 'grep' may have benign purposes but can also indicate risky behavior if used to execute arbitrary code or manipulate files.
  • Obfuscation: The use of base64 decoding with error handling suggests possible obfuscation but could also be a standard practice for data encoding/decoding.
  • Credentials: No clear patterns indicating credential harvesting were found.
  • Metadata: The maintainer has a new or inactive account and lacks a proper author name, which may indicate a lower level of trustworthiness.

📦 Package Quality Overall: Low (4.0/10)

○ Low Test Suite 1.0

No test suite detected

  • No test files or test-runner configuration detected
◈ Medium Documentation 5.0

Some documentation present

  • Detailed PyPI description (13110 chars)
○ Low Contributing Guide 4.0

No contributing guide or governance files found

  • Development Status classifier >= Beta
◈ Medium Type Annotations 5.0

Partial type annotation coverage

  • 91 type-annotated function signatures detected in source
◈ Medium Multiple Contributors 5.0

Limited contributor diversity

  • 1 unique contributor(s) across 94 commits in ppravdin/agentscrub
  • Single author but highly active (94 commits)

🔬 Heuristic Checks

Outbound Network Calls score 1.5

Found 1 network call pattern(s)

  • dest: Path) -> None: with urllib.request.urlopen(url, timeout=60) as response: dest.write_byt
Code Obfuscation score 2.0

Found 1 obfuscation pattern(s)

  • try: v = base64.b64decode(g + "==").decode("utf-8", errors="replace").strip()
Shell / Subprocess Execution score 10.0

Found 6 shell execution pattern(s)

  • s: return "?" r = subprocess.run( ["du", "-sch", *[str(p) for p in paths]], c
  • b.source) + "/"]) r = subprocess.run(cmd, capture_output=True, text=True) msg = r.stderr.
  • if found: r = subprocess.run([str(path)] + args, capture_output=True, text=True, timeout=
  • [i:i + BATCH] r = subprocess.run( ["grep", "-lF", f"--file={pf}"] + [str(f) f
  • nter.""" try: r = subprocess.run( ["grep", "-oF", f"--file={patterns_file}", str(
  • install cron first") r = subprocess.run(["crontab", "-l"], capture_output=True, text=True) if r.
Credential Harvesting

No credential harvesting patterns detected

Typosquatting

No typosquatting candidates detected

Registered Email Domain

No author email provided

Suspicious Page Links

All external links appear legitimate

Git Repository History

Repository ppravdin/agentscrub appears legitimate

Maintainer History score 4.0

2 maintainer concern(s) found

  • Author name is missing or very short
  • Author "" appears to have only 1 package on PyPI (new or inactive account)
Known CVE Vulnerabilities

No known vulnerabilities found in OSV database.

💡 AI App Starter Prompt

Use this prompt to build a project with agentscrub
Create a secure coding environment monitor using the 'agentscrub' Python package. This mini-application will serve as a real-time log scrubber for developers working with AI coding assistants. The goal is to ensure that any sensitive information, such as API keys, passwords, or other credentials, is not inadvertently logged into session files.

**Application Features:**
- **Real-Time Monitoring:** Continuously scan session logs for any incoming data.
- **Pattern Matching:** Use regular expressions to identify patterns that match common credentials formats.
- **Scrubbing Mechanism:** Automatically replace identified credentials with placeholders ('*REDACTED*') to protect privacy.
- **Configuration Management:** Allow users to customize the patterns and keywords that trigger scrubbing actions.
- **Notification System:** Send alerts to developers when potential security breaches are detected.

**How 'agentscrub' is Utilized:**
- Integrate 'agentscrub' as the core engine for detecting and scrubbing sensitive information from logs.
- Leverage its built-in capabilities for handling different types of secrets and credentials securely.
- Use it to ensure that no sensitive data is stored in plain text within the application's log files.

Your task is to design and implement this mini-app, focusing on efficiency, security, and user-friendliness. Make sure to document your code thoroughly and include instructions for setting up and running the application.