CWE一覧に戻る
CWE-487

パッケージレベルのスコープへの依存

Reliance on Package-level Scope
脆弱性 作成中
JA

Javaパッケージは本質的にクローズドではないので、コード・セキュリティのためにパッケージに依存するのは良い習慣ではない。

パッケージ・スコープの目的は、プログラムの他の部分からの偶発的なアクセ スを防ぐことである。これはソフトウェア開発を容易にする機能であり、セキュリティ機能ではない。

EN

Java packages are not inherently closed; therefore, relying on them for code security is not a good practice.

The purpose of package scope is to prevent accidental access by other parts of a program. This is an ease-of-software-development feature but not a security feature.

Scope: Confidentiality / Impact: Read Application Data
Scope: Integrity / Impact: Modify Application Data
Data should be private static and final whenever possible. This will assure that your code is protected by instantiating early, preventing access and tampering.
MITRE公式ページ — CWE-487