> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/merchant-tokenization/ja/sdk-tong-he/security/general.md).

# 一般

以下の一覧は、アプリケーションが従う必要のある一般的なセキュリティ要件を示しています。

## 公開アプリケーションには Thales SDK のリリースバリアントを使用すること <a href="#use-release-variant-of-thales-sdk-for-publishing-applications" id="use-release-variant-of-thales-sdk-for-publishing-applications"></a>

アプリケーションを iOS App Store や Google Play ストアに公開する前に、アプリケーションが SDK のリリースバリアントを使用するように構成されていることを確認してください。

{% hint style="danger" %}
本番アプリケーションでデバッグ用の SDK バリアントを使用すると重大なセキュリティ上の問題を引き起こし、エンドユーザーに関する機密データが露出する可能性があります。
{% endhint %}

## デバッグシンボルの削除 <a href="#removal-of-debug-symbols" id="removal-of-debug-symbols"></a>

アプリケーションにはいかなるデバッグシンボルも含めないでください。この対策はリバースエンジニアリングの難易度を高め、機密変数、構造、およびロジックの容易な特定を防ぎます。

## 機密データ漏洩の防止 <a href="#prevention-of-sensitive-data-leaks" id="prevention-of-sensitive-data-leaks"></a>

バックグラウンド状態で機密データが漏洩しないよう、アプリケーションのライフサイクルを注意深く管理する必要があります。バックグラウンドに移行する前に UI に表示されている機密データを削除することが推奨されます。すべての機密データはアプリがフォアグラウンドに復帰するまで消去または暗号化しておくべきです。機密データのログ出力は避けてください。

## コード難読化 <a href="#code-obfuscation" id="code-obfuscation"></a>

アプリケーションのリバースエンジニアリングの難易度を高めるために：

* Android アプリケーションでは、クラス名、関数名、および Thales SDK の公開 API を隠すために十分な難読化を行う必要があります。さらに、アプリ内で使用される機密文字列も難読化するべきです。
* iOS アプリケーションでは、この分野のツールが成熟していないため難読化は推奨されますが必須ではありません。

## ネットワーク通信 <a href="#network-communication" id="network-communication"></a>

アプリケーションがサーバーとのすべてのネットワーク通信に HTTPS を使用することを強く推奨します。自己署名証明書は避けるべきです。以下は証明書ピンニングに関する推奨ガイドラインです：

* ホスト名がリーフ証明書の Subject 名と一致していることを確認してください。
* 証明書チェーン内の各証明書が有効期限切れでないことを確認してください。
* 信頼チェーンが有効であり、証明書チェーンがシステムの信頼ストアで検証されることを確認してください。
* ルート CA またはリーフ証明書の SHA256 ハッシュがアプリ内にハードコードされたハッシュと一致することを確認してください。

個人を特定できる情報（PII）を含む機密データの場合、TLS 経由で送信する際に追加の暗号化および認証メカニズムを適用します。

## RASP 保護 <a href="#rasp-protection" id="rasp-protection"></a>

アプリケーションで Runtime Application Self Protection を有効にするために商用ツールを利用することを強く推奨します [RASP](https://en.wikipedia.org/wiki/Runtime_application_self-protection)。これにより、root や jailbreak の検出、アプリへのフック試行、デバッグ、アプリ改ざん、エミュレータ検出などを検出するのに役立ちます。

## ログ使用の制限 <a href="#limit-log-usage" id="limit-log-usage"></a>

デバイス上のログを出力する際には注意が必要です。ログは攻撃者にとって有用な情報源になり得ます。PII やその他のユーザー機密情報など重要な情報をログに表示しないようにして、攻撃者に悪用されるのを防いでください。モバイルアプリからログを除去するには、難読化ツールの使用やビルドフラグで条件付きにログを囲み本番ビルドで除外するなどの方法があります。

Android ではログは共有リソースであり、 `READ_LOGS` 権限でアクセス可能であり、ユーザーの機密情報を不適切にログ出力すると他のアプリケーションへの意図しないデータ漏洩につながる可能性があります。

## 安全なコーディング手法の採用 <a href="#adoption-of-secure-coding-practices" id="adoption-of-secure-coding-practices"></a>

入力検証、適切なメモリ管理、安全な C 関数の使用、機密データを格納するために不変コンテナを使用しないことなど、確立された安全なコーディング手法に従ってください。詳細については [OWASP Secure Coding Practices Quick Reference Guide](https://owasp.org/www-project-secure-coding-practices-quick-reference-guide) を参照することを推奨します。これらの手法は PMD や HP Fortify のような静的コード解析ツールを使用して強制することができます。

## 監査とペネトレーションテスト <a href="#audits-and-penetration-testing" id="audits-and-penetration-testing"></a>

アーキテクチャおよびソースコードの監査を実施してアプリケーションのセキュリティを詳細に評価してください。さらに、アプリケーションやデバイス、その他のシステム層に対する攻撃をシミュレートするためにペネトレーションテストを実施してください。これにより脆弱性の特定とアプリケーション全体のセキュリティ状況の評価に役立ちます。

## アプリケーションセキュリティの耐性を評価する <a href="#evaluate-the-resilience-of-application-security" id="evaluate-the-resilience-of-application-security"></a>

OWASP モバイルアプリケーション セキュリティ検証基準 [MASVS](https://github.com/OWASP/owasp-masvs) はモバイルアプリケーションのベースラインとなるセキュリティ要件を確立します。これを使用することを強く推奨します [チェックリスト](https://github.com/OWASP/owasp-mastg/releases/latest) でアプリケーションのセキュリティ状況を評価してください。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.payments.thalescloud.io/merchant-tokenization/ja/sdk-tong-he/security/general.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
