JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.
If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.
If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.
| CodeSonar® 9.2p0 | CONFIDENTIAL | CodeSecure Inc |
Potentially sensitive data is stored in a cache.
The following are considered sensitive system data.
| クラス名 | Sensitive Data Cached (Java) | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 日本語クラス名 | Sensitive Data Cached (Java) | |||||||||||||||
| クラス分類 | セキュリティ (security) | |||||||||||||||
| ニーモニック | JAVA.MISC.SD.CACHE | |||||||||||||||
| カテゴリー |
|
|||||||||||||||
| 対応言語 | Available for Java and Kotlin. Android Only. Warnings of this class will only be reported in Android code: that is, code that uses the Android API. |
|||||||||||||||
| 有効/無効設定 | このワーニングクラスのチェックはデフォルトで無効になっています。チェックを有効にするにはプロジェクト設定ファイル
(configuration file)に以下の WARNING_FILTER ルールを追加してください。
WARNING_FILTER += allow class="Sensitive Data Cached (Java)" |
In the following example, an IMEI (International Mobile Equipment Identity) is cached in three different locations.
package com.juliasoft.julia.tests.checks.sensitiveDataCaching;
import java.util.Locale;
import android.app.Activity;
import android.content.ClipData;
import android.content.ClipDescription;
import android.content.ClipboardManager;
import android.content.Context;
import android.provider.UserDictionary;
import android.telephony.TelephonyManager;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
public class CacheLeak extends Activity {
public void MyMethod()
{
TelephonyManager telephonyManager = (TelephonyManager) getSystemService(this.TELEPHONY_SERVICE);
String imei=telephonyManager.getDeviceId();
UserDictionary.Words.addWord(this, imei, 100, "imei" , Locale.ITALY); /* "Sensitive Data Cached (Java)"
* warning issued here: IMEI can be accessed through spellchecker and word suggestions.
*/
}
public void MyMethod2()
{
TelephonyManager telephonyManager = (TelephonyManager) getSystemService(this.TELEPHONY_SERVICE);
String imei=telephonyManager.getDeviceId();
ClipboardManager cpManage = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
cpManage.setText(imei); /* "Sensitive Data Cached (Java)"
* warning issued here: IMEI can be accessed by pasting from clipboard.
*/
}
public void MyMethod4()
{
TelephonyManager telephonyManager = (TelephonyManager) getSystemService(this.TELEPHONY_SERVICE);
String imei=telephonyManager.getDeviceId();
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
Editor editor = sharedPref.edit();
editor.putString("key", imei); // "Sensitive Data Cached (Java)" warning issued here
* warning issued here: IMEI can be accessed preferences and the autocompiling fields.
*/
editor.commit();
}
}
設定ファイルの以下のパラメータがこのワーニングクラスのチェックに影響します。
To report problems with this documentation, please visit https://support.codesecure.com/.