T09 · Insecure Skill Coding Practices
- Location
pagerduty.js:13- Finding
Arbitrary API Endpoint Override Can Expose PagerDuty Credentials
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its PagerDuty management purpose, but it can send the PagerDuty API key to an arbitrary or unencrypted endpoint if an undocumented environment variable is set, and it can change live incident and alerting state.
Review this before installing in a production PagerDuty account. Keep PAGERDUTY_BASE_URL unset unless the code is changed to restrict it to HTTPS PagerDuty-controlled hosts, use a least-privilege API key, and require explicit human approval before commands that create, acknowledge, resolve, add notes, or create maintenance windows.
pagerduty.js:13Arbitrary API Endpoint Override Can Expose PagerDuty Credentials
The maintenance-window command can suppress alerts for one or more services, but the documentation does not clearly warn that misuse can hide active incidents or prevent detection of new outages. In operational contexts, an agent could be instructed to create maintenance windows too broadly or at the wrong time, materially reducing monitoring visibility during real failures.
This function creates maintenance windows for services, which can suppress or alter operational alert handling, yet the code provides no visible warning, confirmation, or explanatory comment about the impact. Because this is a potentially disruptive and time-bounded operational change, users should be explicitly informed before it executes.
The skill requires environment access to a PagerDuty API key and performs networked API operations, but it does not declare an explicit tool scope such as permissions or allowed-tools. That mismatch weakens enforcement and review, making it easier for an agent platform or user to invoke sensitive capabilities without clear least-privilege boundaries.
The skill prominently advertises state-changing operations like triggering, acknowledging, and resolving incidents without a clear warning that these actions modify live production incident state. In an agent-driven workflow, that can lead to accidental incident creation, premature resolution, or workflow confusion when users assume the commands are informational.
This code reads the PagerDuty API key from an environment variable and uses it to make outbound API requests, but provides no user-facing notice, confirmation, or explicit warning about transmitting data to PagerDuty. The header comment describes usage but does not disclose that incident details, notes, and service metadata will be sent to an external service using account credentials.
The skill can trigger, acknowledge, and resolve incidents through POST/PUT requests, which are safety-relevant state changes, but there is no confirmation prompt, user-facing log, or warning comment describing these effects. The current file header only shows invocation format and does not warn that these commands will create or alter live incident state.