Conversation
There was a problem hiding this comment.
Pull request overview
This PR replaces broken SonarSource documentation links with inline guidance from archived content. The original links to SonarSource rules documentation were returning 404 errors, so the PR substitutes them with explanatory text based on archived versions of the documentation.
Changes:
- Replaced dead SonarSource link references with inline security guidance about cross-domain messaging
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| resources/guidelines/testing/store/quality-guidelines-plugins/index.md | Replaced broken SonarSource link with inline explanation of cross-domain messaging security |
| resources/guidelines/testing/store/quality-guidelines-apps/index.md | Replaced broken SonarSource link with inline explanation of cross-domain messaging security |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ### Ensure cross-domain messages are sent to the intended domain | ||
|
|
||
| Link: ["Cross-document messaging domains should be carefully restricted"](https://rules.sonarsource.com/javascript/RSPEC-2819) | ||
| When using `postMessage()` or similar cross-window messaging APIs, verify the message origin (e.g. `event.origin`) and restrict target domains to trusted URLs instead of `'*'`. This prevents malicious sites from sending or receiving messages inappropriately. |
There was a problem hiding this comment.
The word 'inappropriately' could be replaced with 'unauthorized' for clearer security-focused language.
| When using `postMessage()` or similar cross-window messaging APIs, verify the message origin (e.g. `event.origin`) and restrict target domains to trusted URLs instead of `'*'`. This prevents malicious sites from sending or receiving messages inappropriately. | |
| When using `postMessage()` or similar cross-window messaging APIs, verify the message origin (e.g. `event.origin`) and restrict target domains to trusted URLs instead of `'*'`. This prevents malicious sites from sending or receiving unauthorized messages. |
| ### Ensure cross-domain messages are sent to the intended domain | ||
|
|
||
| ["Cross-document messaging domains should be carefully restricted"](https://rules.sonarsource.com/javascript/RSPEC-2819) | ||
| When using `postMessage()` or similar cross-window messaging APIs, verify the message origin (e.g. `event.origin`) and restrict target domains to trusted URLs instead of `'*'`. This prevents malicious sites from sending or receiving messages inappropriately. |
There was a problem hiding this comment.
The word 'inappropriately' could be replaced with 'unauthorized' for clearer security-focused language.
| When using `postMessage()` or similar cross-window messaging APIs, verify the message origin (e.g. `event.origin`) and restrict target domains to trusted URLs instead of `'*'`. This prevents malicious sites from sending or receiving messages inappropriately. | |
| When using `postMessage()` or similar cross-window messaging APIs, verify the message origin (e.g. `event.origin`) and restrict target domains to trusted URLs instead of `'*'`. This prevents malicious sites from sending or receiving unauthorized messages. |
There are no active links anymore on that, so I searched the webarchive and added context here:
https://web.archive.org/web/20230927143646/https://rules.sonarsource.com/typescript/type/Vulnerability/RSPEC-2819/
Not sure if still needed, but better then a 404 - Sonarcube support does not answer. Rules seem to be removed.