-
Notifications
You must be signed in to change notification settings - Fork 54
Adds automatic domain validation and allow-listing #2092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bs-shobhitkumar
wants to merge
26
commits into
master
Choose a base branch
from
PER_6583_auto_domain_validation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ninadbstack
reviewed
Feb 2, 2026
ninadbstack
reviewed
Feb 2, 2026
ninadbstack
reviewed
Feb 2, 2026
ninadbstack
reviewed
Feb 2, 2026
ninadbstack
reviewed
Feb 2, 2026
ninadbstack
reviewed
Feb 4, 2026
| } | ||
|
|
||
| // Executes domain validation via external service | ||
| async function executeDomainValidation(network, hostname, url, domainValidation, client, workerUrl) { |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally move this to a different file - this file is getting too long with standalone functions
ninadbstack
approved these changes
Feb 4, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new auto domain allow-listing feature to the Percy client and core, enabling automatic validation and management of external domains accessed during snapshot capture. This helps streamline asset handling by validating domains against project configuration and an external service, and by persisting new discoveries for future builds. The implementation includes changes to both the core logic and the client API, as well as comprehensive tests for the new functionality.
The most important changes are:
Core logic for auto domain allow-listing:
Percyclass, including sets for pre-approved, pre-blocked, session-allowed, and session-blocked domains, as well as statistics tracking. (packages/core/src/percy.js)packages/core/src/network.js) [1] [2]packages/core/src/network.js) [1] [2]Project domain configuration persistence:
Percyclass to load project domain config at startup and save newly discovered allowed/blocked domains at shutdown, integrating with the Percy client API. (packages/core/src/percy.js) [1] [2] [3]Percy client API enhancements:
patchmethod and new methodsupdateProjectDomainConfigandvalidateDomainto thePercyClientclass to support updating project domain configuration and validating domains via an external service. (packages/client/src/client.js) [1] [2]Test coverage for new features:
updateProjectDomainConfigandvalidateDomainmethods, including positive and negative scenarios and request payload validation. (packages/client/test/client.test.js,packages/client/test/helpers.js) [1] [2]Wiring and context propagation:
packages/core/src/discovery.js,packages/core/src/network.js) [1] [2]