Skip to content
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

Malicious Site Protection - Pixels #3779

Open
wants to merge 1 commit into
base: alessandro/malicious-site-protection-settings
Choose a base branch
from

Conversation

alessandroboron
Copy link
Contributor

Task/Issue URL: https://app.asana.com/0/1206329551987282/1207169456840072/f

Description:

This PR adds the pixel events for the malicious site protection feature.

Pixels definition

Note that iframes handling is descoped for the time being.

Steps to test this PR:

Prerequisites
Ensure that isMaliciousSiteProtectionEnabled and shouldDetectMaliciousThreat(forDomain domain: String?) -> Bool defined in MaliciousSiteProtectionFeatureFlags.swift -> return true

Scenario 1 - Navigate to a Malicious site - Phishing

  1. Navigate to http://privacy-test-pages.site/security/badware/phishing.html
  2. Ensure that Pixel malicious-site-protection_error-page-shown is fired with category phishing.

Scenario 2 - Navigate to a Malicious site - Malware

  1. Navigate to http://privacy-test-pages.site/security/badware/malware.html
  2. Ensure that Pixel malicious-site-protection_error-page-shown is fired with category malware.

Scenario 3 - Visit Malicious Site - Phishing

  1. Navigate to http://privacy-test-pages.site/security/badware/phishing.html
  2. Tap the “Advanced” button.
  3. Tap the “Accept risk and visit site” button.
  4. Ensure that Pixel malicious-site-protection_visit-site is fired with category phishing.

Scenario 4 - Visit Malicious Site - Malware

  1. Navigate to http://privacy-test-pages.site/security/badware/malware.html
  2. Tap the “Advanced” button.
  3. Tap the “Accept risk and visit site” button.
  4. Ensure that Pixel malicious-site-protection_visit-site is fired with category malware.

Scenario 3 - Enable/Disable feature in App settings

  1. Go to App Settings -> General.
  2. Enable/Disable Malicious Site Protection.
  3. Ensure that Pixel malicious-site-protection_feature-toggled is fired with parameter newState true / false depending on the setting value.

Definition of Done (Internal Only):

Copy Testing:

  • Use of correct apostrophes in new copy, ie rather than '

Orientation Testing:

  • Portrait
  • Landscape

Device Testing:

  • iPhone SE (1st Gen)
  • iPhone 8
  • iPhone X
  • iPhone 14 Pro
  • iPad

OS Testing:

  • iOS 15
  • iOS 16
  • iOS 17

Theme Testing:

  • Light theme
  • Dark theme

Internal references:

Software Engineering Expectations
Technical Design Template

@alessandroboron alessandroboron force-pushed the alessandro/malicious-site-protection-settings branch from fae19a7 to 5be55a9 Compare January 10, 2025 07:33
@alessandroboron alessandroboron force-pushed the alessandro/malicious-site-protection-pixels branch from cc1da21 to 6aeb628 Compare January 10, 2025 07:33
Copy link
Contributor

@SabrinaTardio SabrinaTardio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pixels are fired as expected!

func leaveSite() {
// Fire Pixel
}
func leaveSite() { }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double checking: No pixel and not implemented yet?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don’t fire any pixels when the user taps “Leave site” button. Implementation is in its parent which is generic special error handler. It calls leaveSite on its children in case we need to do custom actions. But it’s not the case as we’re not sending pixels.

func advancedInfoPresented() {
// Fire Pixel
}
func advancedInfoPresented() { }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just double checking: No pixel to send?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As Above

Copy link

This PR has been inactive for more than 7 days and will be automatically closed 7 days from now.

@github-actions github-actions bot added the stale label Jan 18, 2025
@alessandroboron alessandroboron force-pushed the alessandro/malicious-site-protection-settings branch 2 times, most recently from 0d2df3b to 1a42e54 Compare January 22, 2025 07:00
@alessandroboron alessandroboron force-pushed the alessandro/malicious-site-protection-pixels branch 2 times, most recently from 3a690aa to 81f4f71 Compare January 22, 2025 07:10
@alessandroboron alessandroboron force-pushed the alessandro/malicious-site-protection-settings branch from 1537387 to d2d7bd4 Compare January 23, 2025 01:08
@alessandroboron alessandroboron force-pushed the alessandro/malicious-site-protection-pixels branch from 81f4f71 to b20b0a3 Compare January 23, 2025 01:08
@alessandroboron alessandroboron force-pushed the alessandro/malicious-site-protection-settings branch from d2d7bd4 to 560ed08 Compare January 24, 2025 09:15
@alessandroboron alessandroboron force-pushed the alessandro/malicious-site-protection-pixels branch from 5323ec5 to 1f2627c Compare January 24, 2025 09:26
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