Repository navigation
Update iOS and Android platform interaction for App Notifications #3985
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
Open
mateofumis
wants to merge
6
commits into
OWASP:master
Choose a base branch
from
mateofumis:update/ios-and-android-platform-interaction-on-notifications
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
73fa2d2
Add new MASTG-KNOW covering iOS App Notifications
mateofumis 2dc7831
Update MASTG-KNOW for Android App Notifications
mateofumis 31a9d59
Fix phrasing on privacy implications of notifications
mateofumis 1a4c6e0
Merge branch 'master' into update/ios-and-android-platform-interactio…
mateofumis aa15fc3
explain non-exempt notifications; clarify notification listener access
mateofumis 0cfb30f
Merge remote-tracking branch 'origin/update/ios-and-android-platform-…
mateofumis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| masvs_category: MASVS-PLATFORM | ||
| platform: android | ||
| title: App Notifications | ||
| --- | ||
|
|
||
| Android apps use [notifications](https://developer.android.com/develop/ui/views/notifications "About notifications") to provide information to users outside the app's UI. A basic notification can contain an icon, a title, and text content, which can be configured using [`NotificationCompat.Builder`](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder "NotificationCompat.Builder") methods such as `setContentTitle` and `setContentText`. On Android 13 (API level 33) and higher, posting non-exempt notifications is subject to the [`POST_NOTIFICATIONS`](https://developer.android.com/develop/ui/compose/notifications/notification-permission "Notification runtime permission") runtime permission. | ||
|
|
||
| - Notifications can appear on the device's lock screen. Apps can control the level of detail displayed on a secure lock screen using [`setVisibility`](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder#setVisibility(int) "setVisibility") with `VISIBILITY_PUBLIC`, `VISIBILITY_PRIVATE`, or `VISIBILITY_SECRET`. For private notifications, [`setPublicVersion`](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder#setPublicVersion(android.app.Notification) "setPublicVersion") can provide alternative content to display when the full notification is hidden. Users retain control over lock screen visibility through the system notification settings. | ||
|
|
||
| - Apps can implement a [`NotificationListenerService`](https://developer.android.com/reference/android/service/notification/NotificationListenerService "NotificationListenerService") to receive system callbacks when notifications are posted or removed after the user grants notification access. The receiving app can process or retain the notification content independently of the app that posted it. Starting with Android 15 (API level 35), the system prevents [untrusted notification listeners from reading unredacted content from notifications in which an OTP is detected](https://developer.android.com/about/versions/15/behavior-changes-all#otp_redaction "OTP Redaction"). | ||
|
mateofumis marked this conversation as resolved.
Outdated
|
||
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| --- | ||
| masvs_category: MASVS-PLATFORM | ||
| platform: ios | ||
| title: App Notifications | ||
| --- | ||
|
|
||
| iOS provides developers with _local_ and _remote_ [app notifications](https://developer.apple.com/notifications/ "Notifications") to communicate relevant information to the user. Notifications can display an alert, play a sound, or badge the app's icon. | ||
|
mateofumis marked this conversation as resolved.
|
||
|
|
||
| While useful, app notifications also have privacy implications: | ||
|
|
||
| - For remote notifications, the [APNs payload](https://developer.apple.com/documentation/usernotifications/generating-a-remote-notification "APNs payload") can define user-visible content such as the notification's `title`, `subtitle`, and `body`. When notification previews are hidden, notification categories can use the [`hiddenPreviewsShowTitle`](https://developer.apple.com/documentation/usernotifications/unnotificationcategoryoptions/hiddenpreviewsshowtitle "hiddenPreviewsShowTitle") and [`hiddenPreviewsShowSubtitle`](https://developer.apple.com/documentation/usernotifications/unnotificationcategoryoptions/hiddenpreviewsshowsubtitle "hiddenPreviewsShowSubtitle") options to keep the title or subtitle visible, while [`hiddenPreviewsBodyPlaceholder`](https://developer.apple.com/documentation/usernotifications/unnotificationcategory/hiddenpreviewsbodyplaceholder "hiddenPreviewsBodyPlaceholder") defines placeholder text to display instead of the notification body. | ||
|
|
||
| - Notifications can appear on the device's Lock Screen and display their content according to the user's notification preview settings. iOS allows users to control when [notification previews](https://support.apple.com/guide/iphone/change-notification-settings-iph7c3d96bab/ios#:~:text=Prevent%20notification%20previews%20from%20appearing%20on%20the%20Lock%20Screen "Prevent notification previews from appearing on the Lock Screen") are shown, while apps can customize the content displayed when previews are hidden using notification categories. | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.