k8s-hpa-cost-tuning
Audited by Socket on Sep 16, 2026
2 alerts found:
Anomalyx2The code appears to be a legitimate Datadog incident-metrics CLI and contains no clear malware or sabotage behavior. It has a meaningful credential-exfiltration risk because --site and DD_SITE are used to construct the API hostname without an allowlist; credentials could be sent to an attacker-controlled HTTPS domain. It also permits arbitrary local file writes through --out and does not escape metric scope values before query construction. Restrict site values to approved Datadog domains, validate or constrain output paths, and escape query tag values.
The code appears to be a legitimate Datadog Kubernetes cost-audit CLI and contains no clear malware or sabotage behavior. The primary security concern is destination confusion: an unrestricted --site/DD_SITE value can redirect Datadog API credentials to an attacker-controlled host. Restrict the site to approved Datadog domains or validate it before sending credentials. The arbitrary output path and direct query-tag interpolation are normal but should be used only with trusted inputs.