Skip to content

Commit 83c8e22

Browse files
egregius313subatoi
andauthored
Apply suggestions from documentation review
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
1 parent 5990975 commit 83c8e22

File tree

2 files changed

+9
-15
lines changed

2 files changed

+9
-15
lines changed

java/ql/src/Security/CWE/CWE-312/AllowBackupAttributeEnabled.qhelp

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,29 @@
33
"qhelp.dtd">
44
<qhelp>
55
<overview>
6-
<p>The Android manifest file defines configuration settings for Android
7-
applications. In this file, the <code>android:allowBackup</code> attribute of
8-
the <code>application</code> element can be used to define whether or not the
9-
application can have automatic backups.</p>
10-
11-
<p>Enabling backups may allow an attacker to extract sensitive data. Therefore,
12-
it is advised to set <code>android:allowBackup</code> to <code>false</code> if
13-
your application uses any sensitive data.</p>
6+
<p>In the Android manifest file, you can use the <code>android:allowBackup</code> attribute of the <code>application</code> element to define whether the
7+
application will have automatic backups or not.</p>
8+
9+
<p>If your application uses any sensitive data, you should disable automatic backups to prevent attackers from extracting it.</p>
1410
</overview>
1511

1612
<recommendation>
17-
<p>For Android applications which process sensitive data, set the
18-
<code>android:allowBackup</code> setting to <code>false</code> in the manifest
13+
<p>For Android applications which process sensitive data, set <code>android:allowBackup</code> to <code>false</code> in the manifest
1914
file.</p>
2015

21-
<p>Note: Since Android 6.0 (Marshmallow), applications default to participating
22-
in automatic backups. Therefore, it is necessary to explicitly disable backups.
16+
<p>Note: Since Android 6.0 (Marshmallow), automatic backups for applications are switched on by default.
2317
</p>
2418
</recommendation>
2519

2620
<example>
2721

28-
<p>In the two examples below, the <code>android:allowBackup</code> setting is enabled:</p>
22+
<p>In the following two (bad) examples, the <code>android:allowBackup</code> setting is enabled:</p>
2923

3024
<sample src="AllowBackupTrue.xml" />
3125

3226
<sample src="AllowBackupEmpty.xml"/>
3327

34-
<p>A corrected version explicity sets <code>android:allowBackup</code> to <code>false</code>:</p>
28+
<p>In the following (good) example, <code>android:allowBackup</code> is set to <code>false</code>:</p>
3529

3630
<sample src="AllowBackupFalse.xml"/>
3731

java/ql/src/Security/CWE/CWE-312/AllowBackupAttributeEnabled.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @name Android allowBackup attribute enabled
3-
* @description Android manifests which do not disable the `android:allowBackup` attribute allow backups, which can store sensitive information.
3+
* @description Enabling the `android:allowBackup` attribute may allow an attacker to extract sensitive data.
44
* @kind problem
55
* @problem.severity recommendation
66
* @security-severity 7.5

0 commit comments

Comments
 (0)