Skip to content

refactor(notifications): build the notification intent without apply - #34

Merged
kaulith merged 2 commits into
developfrom
fix/codeql-implicit-pendingintent
Sep 5, 2026
Merged

refactor(notifications): build the notification intent without apply#34
kaulith merged 2 commits into
developfrom
fix/codeql-implicit-pendingintent

Conversation

@kaulith

@kaulith kaulith commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Clears code scanning alert #1, java/android/implicit-pendingintents, high, at NotificationHelper.kt:95.

False positive. The intent already names its destination component and the PendingIntent already carries FLAG_IMMUTABLE, which are the two things the rule asks for; the query's ExplicitIntentSanitizer barrier needs local data flow from the constructor carrying the Class argument, and Intent(...).apply { } routes the value through kotlin.apply instead. Setting the fields on a local val restores that flow. Action, flags, data, request code and notification behaviour are unchanged.

CodeQL also gains workflow_dispatch, since it runs only on trunk pushes and a weekly cron today.

@kaulith
kaulith enabled auto-merge (squash) September 5, 2026 22:44
@kaulith
kaulith merged commit 204fa53 into develop Sep 5, 2026
4 checks passed
@kaulith
kaulith deleted the fix/codeql-implicit-pendingintent branch September 5, 2026 22:48
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.

1 participant