T09 · Insecure Skill Coding Practices
- Location
watchdog.py:171- Finding
HTTPS and SSL Monitoring Disables TLS Certificate Validation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a coherent local monitoring skill, but its SSL checks can falsely report certificates as valid, which is risky for infrastructure monitoring.
Review this carefully before relying on it for certificate or HTTPS security monitoring. It appears locally scoped and not malicious, but its SSL checks are not trustworthy as shipped, and several advertised features are incomplete or inconsistent with the code.
watchdog.py:171HTTPS and SSL Monitoring Disables TLS Certificate Validation
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
infra-watchdog add-monitor
--type http
--name "Main API"
--url https://api.example.com/health
--expected-status 200
--timeout 5
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def check_docker(self, container_id: str) -> Tuple[str, float, str]:
"""Check Docker container status. Returns (status, 0, details)."""
try:
result = subprocess.run(
['docker', 'inspect', container_id],
capture_output=True,
text=True,
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def check_disk(self, mount_point: str = '/') -> Tuple[str, float, str]:
"""Check disk usage. Returns (status, 0, details)."""
try:
result = subprocess.run(
['df', '-h', mount_point],
capture_output=True,
text=True,
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def check_memory(self) -> Tuple[str, float, str]:
"""Check memory usage. Returns (status, 0, details)."""
try:
result = subprocess.run(
['free', '-b'],
capture_output=True,
text=True,
The function claims to check SSL certificate expiry, but it disables certificate validation and then returns 'Certificate valid' without actually parsing or comparing the certificate expiration date. This can create a false sense of safety, causing operators to miss expired or invalid certificates and undermining the monitoring system's reliability for security-sensitive infrastructure.
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.
def cmd_cron_install(args):
"""Install cron job for periodic checks."""
config = load_config()
interval = config.get('check_interval_minutes', 5)
This code performs network requests to user-supplied targets via urllib without any confirmation prompt or explicit user-facing notice at the point of execution. Although network monitoring is the skill's purpose, the code itself lacks disclosure that running checks will contact configured endpoints and transmit request metadata to them.
No suspicious patterns detected.