Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

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

@github-actions
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
@alessandroboron alessandroboron force-pushed the alessandro/malicious-site-protection-settings branch from 560ed08 to 70f7b65 Compare January 29, 2025 02:18
Base automatically changed from alessandro/malicious-site-protection-settings to alessandro/malicious-site-protection January 29, 2025 02:54
@alessandroboron alessandroboron force-pushed the alessandro/malicious-site-protection-pixels branch from 1f2627c to 85da6b7 Compare January 29, 2025 04:48
@alessandroboron
Copy link
Contributor Author

@SabrinaTardio as PixelKit is not ready to be used in iOS I did a small refactoring to use the normal Pixel function on the client. Could you please have a look at this commit 85da6b7 and check you’re happy with it? Thanks!

@alessandroboron alessandroboron force-pushed the alessandro/malicious-site-protection-pixels branch 2 times, most recently from ddf250a to 1d8ac73 Compare January 29, 2025 05:35
@SabrinaTardio
Copy link
Contributor

SabrinaTardio commented Jan 29, 2025

@SabrinaTardio as PixelKit is not ready to be used in iOS I did a small refactoring to use the normal Pixel function on the client. Could you please have a look at this commit 85da6b7 and check you’re happy with it? Thanks!

First of all sorry for not catching this earlier...
I am not managing to build and therefore I cannot test… the changes however make sense
If you have time once everything is shipped would be nice to refactor to user PixelKit (happy to help, assist with it)

@alessandroboron
Copy link
Contributor Author

@SabrinaTardio as PixelKit is not ready to be used in iOS I did a small refactoring to use the normal Pixel function on the client. Could you please have a look at this commit 85da6b7 and check you’re happy with it? Thanks!

First of all sorry for not catching this earlier... I am not managing to build and therefore I cannot test… the changes however make sense If you have time once everything is shipped would be nice to refactor to user PixelKit (happy to help, assist with it)

Sweet, we can chat once I ship it to make PixelKit iOS friendly :)

@alessandroboron alessandroboron force-pushed the alessandro/malicious-site-protection branch from fd7939a to b3806d8 Compare January 31, 2025 01:31
@alessandroboron alessandroboron force-pushed the alessandro/malicious-site-protection-pixels branch from 1d8ac73 to f78ab07 Compare January 31, 2025 01:32
@alessandroboron alessandroboron merged commit 5ed0dd3 into alessandro/malicious-site-protection Jan 31, 2025
13 checks passed
@alessandroboron alessandroboron deleted the alessandro/malicious-site-protection-pixels branch January 31, 2025 02:22
alessandroboron added a commit that referenced this pull request Feb 4, 2025
Task/Issue URL:
https://app.asana.com/0/1206329551987282/1207169456840072/f

**Description**:
This PR adds the pixel events for the malicious site protection feature.
Note that iframes handling is descoped for the time being.
[Pixels definition](https://app.asana.com/0/1208717418466383/1208808591364106/f)
alessandroboron added a commit that referenced this pull request Feb 6, 2025
Task/Issue URL:
https://app.asana.com/0/1206329551987282/1207169456840072/f

**Description**:
This PR adds the pixel events for the malicious site protection feature.
Note that iframes handling is descoped for the time being.
[Pixels definition](https://app.asana.com/0/1208717418466383/1208808591364106/f)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants