feat: Manage a custom list of audit target URLs#2142
Merged
slitviachenko merged 6 commits intomainfrom Apr 8, 2026
Merged
Conversation
- Bumped `@adobe/spacecat-shared-data-access` dependency to version ^3.45.0 in `package.json` and `package-lock.json`. - Introduced `auditTargetURLsPatchGuard` to validate and normalize audit target URLs in site configurations. - Updated `SitesController` to utilize the new validation logic when updating site configurations.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
nitinja
reviewed
Apr 6, 2026
| if (url.protocol !== 'https:') { | ||
| return { ok: false, error: 'URL must use HTTPS' }; | ||
| } | ||
| if (siteHostname && url.hostname !== siteHostname) { |
Member
There was a problem hiding this comment.
Hostname check -> following case comes to mind
Example: In https://www.example.com
Protocol: https://
Hostname: www.example.com
but the page user entered could be blog.example.com/page -> thats sounds like a valid page, but fails this check?
Contributor
Author
There was a problem hiding this comment.
@nitinja , I believe we need to onboard blog.example.com separately, as technically it may be running on a different tech stack, such as EDS vs AEMaaCS, etc.
…custom-list-of-audit-target-URLs
|
This PR will trigger a minor release when merged. |
nitinja
approved these changes
Apr 7, 2026
- Introduced `MAX_MANUAL_AUDIT_TARGET_URLS` constant to limit the number of manual audit target URLs to 500. - Added `normalizeHostnameForAuditTargetMatch` function to standardize hostname comparisons by lowercasing and stripping leading `www.`. - Updated `validateAuditTargetUrlString` to utilize the new normalization function for hostname checks. - Enhanced error messages to clarify hostname matching requirements. - Added tests for the new normalization function and updated validation logic to ensure compliance with the new limits and behaviors.
…custom-list-of-audit-target-URLs
solaris007
pushed a commit
that referenced
this pull request
Apr 8, 2026
# [1.424.0](v1.423.0...v1.424.0) (2026-04-08) ### Features * Manage a custom list of audit target URLs ([#2142](#2142)) ([6103477](6103477))
Member
|
🎉 This PR is included in version 1.424.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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
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.
@adobe/spacecat-shared-data-accessdependency to version ^3.45.0 inpackage.jsonandpackage-lock.json.auditTargetURLsPatchGuardto validate and normalize audit target URLs in site configurations.SitesControllerto utilize the new validation logic when updating site configurations.Please ensure your pull request adheres to the following guidelines:
describe here the problem you're solving.
If the PR is changing the API specification:
yet. Ideally, return a 501 status code with a message explaining the feature is not implemented yet.
If the PR is changing the API implementation or an entity exposed through the API:
If the PR is introducing a new audit type:
Related Issues
https://jira.corp.adobe.com/browse/SITES-42547
Thanks for contributing!