-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2953 from returntocorp/merge-develop-to-release
Merge Develop into Release
- Loading branch information
Showing
5 changed files
with
104 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -13,6 +13,8 @@ rules: | |
free($VAR); | ||
... | ||
- pattern-not-inside: | ||
free($VAR); | ||
... | ||
$VAR = NULL; | ||
... | ||
- pattern-not-inside: | ||
|
49 changes: 49 additions & 0 deletions
49
java/android/security/exported_activity.AndroidManifest.xml
This file contains 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,49 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:dataExtractionRules="@xml/data_extraction_rules" | ||
android:fullBackupContent="@xml/backup_rules" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/Theme.Demo_web" | ||
tools:targetApi="31"> | ||
<!-- ok: exported_activity --> | ||
<activity | ||
android:name=".cool" | ||
android:exported="false"> | ||
<meta-data | ||
android:name="android.app.lib_name" | ||
android:value="" /> | ||
</activity> | ||
<!-- ruleid: exported_activity --> | ||
<activity | ||
android:name=".MainActivity2"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.GET_CONTENT"/> | ||
</intent-filter> | ||
<meta-data | ||
android:name="android.app.lib_name" | ||
android:value="" /> | ||
</activity> | ||
<!-- ruleid: exported_activity --> | ||
<activity | ||
android:name=".MainActivity" | ||
android:exported="true"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
|
||
<meta-data | ||
android:name="android.app.lib_name" | ||
android:value="" /> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
This file contains 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,41 @@ | ||
rules: | ||
- id: exported_activity | ||
patterns: | ||
- pattern-not-inside: <activity ... android:exported="false" ... /> | ||
- pattern-inside: "<activity ... /> \n" | ||
- pattern-either: | ||
- pattern: | | ||
<activity ... android:exported="true" ... /> | ||
- pattern: | | ||
<activity ... <intent-filter> ... /> | ||
message: Use of Exported Activity | ||
languages: | ||
- generic | ||
severity: WARNING | ||
paths: | ||
exclude: | ||
- sources/ | ||
- classes3.dex | ||
- '*.so' | ||
include: | ||
- '*AndroidManifest.xml' | ||
metadata: | ||
vulnerability: Use of exported components | ||
Description: >- | ||
The application exports an activity. Any application on the device can launch the exported activity which may compromise the integrity of your application or its data. | ||
Ensure that any exported activities do not have privileged access to your application's control plane. | ||
Severity: HIGH | ||
category: security | ||
subcategory: | ||
- vuln | ||
cwe: | ||
- 'CWE-926: Improper Export of Android Application Components' | ||
confidence: MEDIUM | ||
likelihood: MEDIUM | ||
impact: MEDIUM | ||
owasp: | ||
- A5:2021 Security Misconfiguration | ||
technology: | ||
- Android | ||
references: | ||
- https://cwe.mitre.org/data/definitions/926.html |
This file contains 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
This file contains 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