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

Update malware protection pixels #3672

Merged
merged 5 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15296,8 +15296,8 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit";
requirement = {
kind = exactVersion;
version = 221.3.0;
branch = "alex/malware-protection-pixels";
kind = branch;
};
};
9FF521422BAA8FF300B9819B /* XCRemoteSwiftPackageReference "lottie-spm" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/duckduckgo/BrowserServicesKit",
"state" : {
"revision" : "b71ed70ce9b0ef3ce51d4f96da0193ab70493944",
"version" : "221.3.0"
"branch" : "alex/malware-protection-pixels",
"revision" : "2686d3b15309d60b25b0e2913ada53362cb37b4d"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ extension SpecialErrorPageTabExtension: NavigationResponder {

@MainActor
private func redirectMaliciousIframeNavigationAction(_ navigationAction: NavigationAction, with threatKind: MaliciousSiteProtection.ThreatKind) -> NavigationActionPolicy? {
PixelKit.fire(MaliciousSiteProtection.Event.iframeLoaded)
PixelKit.fire(MaliciousSiteProtection.Event.iframeLoaded(category: threatKind))

// Extract the URL of the source frame (the iframe) that initiated the navigation action
let iframeTopUrl = navigationAction.sourceFrame.url
Expand Down Expand Up @@ -232,7 +232,7 @@ extension SpecialErrorPageTabExtension: SpecialErrorPageUserScriptDelegate {
guard let errorData, let webView, let url = webView.url else { return }
switch errorData {
case .maliciousSite(kind: let threatKind, url: _):
PixelKit.fire(MaliciousSiteProtection.Event.visitSite)
PixelKit.fire(MaliciousSiteProtection.Event.visitSite(category: threatKind))

exemptions[url] = threatKind
state.bypassedMaliciousSiteThreatKind = threatKind
Expand Down
Loading