Skip to content

Conversation

@nabeelalam
Copy link
Contributor

@nabeelalam nabeelalam commented Oct 29, 2025

Description:

Improved PagerDuty detector logic for credential validation.

Added handling for PagerDuty’s 403 Forbidden response for API tokens which are valid but do not have access to the resource:

{
  "error": {
    "message": "Access Denied",
    "code": 2010
  }
}

If the 403 response body contains the string "Access Denied" and the code "2010", the detector now treats this specific case as a successful credential validation (return true, nil).

Any other 403 response will return an unverified response with verification error since credential validity can’t be confirmed.

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

@nabeelalam nabeelalam requested a review from a team as a code owner October 29, 2025 14:25
@nabeelalam nabeelalam changed the title [] Added 403 Forbidden status check in pagerdutyapikey detector verification [Update] Added Forbidden Response Check in PagerDuty Detector Verification Oct 29, 2025
@nabeelalam nabeelalam self-assigned this Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants