Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 13, 2025

GitHub API Response Validation - Complete ✅

Supports makeGitHubAPIRequest function returning unknown (untrusted data) instead of typed responses. Callers validate responses using the validator system before use.

Room for improvement here, either adding more methods to be validated or setting certain fields to required (would need confirmation from github on which fields are actually required)

Copilot AI and others added 3 commits November 13, 2025 20:19
…all sites

Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>
Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>
Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>
Copilot AI changed the title [WIP] Update validation for untrusted GitHub API response Validate untrusted GitHub API responses using validator system Nov 13, 2025
Copilot AI requested a review from joshspicer November 13, 2025 20:30
Copilot finished work on behalf of joshspicer November 13, 2025 20:30
@joshspicer
Copy link
Member

@copilot For vJobInfo you're validating too strictly!

2025-11-13 18:07:16.529 [error] [GitHubService] Failed to validate job info response: Required field 'pull_request' is missing
2025-11-13 18:07:16.531 [error] Failed to provide new chat session item: Failed delegating to cloud agent. Please try again later.
Inner Error: Invalid job info response: Required field 'pull_request' is missing

Copy link
Contributor Author

Copilot AI commented Nov 14, 2025

@copilot For vJobInfo you're validating too strictly!

2025-11-13 18:07:16.529 [error] [GitHubService] Failed to validate job info response: Required field 'pull_request' is missing
...

Fixed in f403ecb. Made pull_request optional in both the JobInfo interface and vJobInfo validator since the API can return job info without this field. Added a test case to verify jobs without pull_request validate successfully.

Copilot finished work on behalf of joshspicer November 14, 2025 02:15
@joshspicer joshspicer force-pushed the copilot/update-github-api-response-validation branch from f403ecb to c74020c Compare November 17, 2025 16:45
@joshspicer joshspicer changed the title Validate untrusted GitHub API responses using validator system Validate some untrusted GitHub API responses using validator system Nov 17, 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