Blog

セキュア・コーディング・ガイドラインはどのように進化するか

September 15, 2017
ピーター・ド・クレマー

先週、セキュア・コーディング・ガイドラインを最新のものにするために、Java Springの脆弱性を調査していました。プラットフォーム上の既存の課題を調べていたところ、JSP ページに URL パラメータを表示することで、XSS に関するいくつかの問題に気づきました。誤ったコード例は以下のようになります。

<input type="text" name="username" value="${param.username}">

正しい解決策は、URLパラメータを完全に削除することでした。説明には、URLパラメータを正しい方法でエスケープすることも安全であると記載されています。

今の私の仕事は、安全なコードを書きながら、開発者にとってわかりやすい方法で安全なコーディングガイドラインを策定し、開発者をできるだけ制限しないようにすることです。この場合は、開発者に意図した機能をそのまま残してもらい、URL パラメーターをエスケープして安全に実行することを推奨したいと思います。こうすることで、コードに XSS の脆弱性が含まれなくなります。上記の例は次のように保護できます。

<input type="text" name="username" value="${fn:escapeXml(param.username)}">

そして、これが数日間の安全なコーディングガイドラインでしたが、私が偶然見つけました 表現言語インジェクションに関するOWASPページ。このページでは、Spring Expression Language (SpEl) がどのようにインジェクションに悪用され、リモートコード実行などの深刻な影響が生じる可能性があるかについて説明します。当社のセキュア・コーディング・ガイドラインに従っているコードが依然としてこの脆弱性の影響を受ける可能性があるかどうかは、私次第でした。そこで、SpEl 式を評価するための簡単なテストアプリケーションを書き、Xml エスケープを使用した場合と使用しない場合で入力をテストして、検出されないシナリオが見つかるかどうかを確認しました。実際に行ったのですが、XmlScape で捕捉された文字を一切含まない悪質な表現があります。作業デモをGitHubに公開しました。GitHubで見つけることができます。 ここに

そしてもちろん、「Spring Expression Language (SpEl) を使用して URL パラメーターを表示したり評価したりしないでください」という安全なコーディングガイドラインを更新しました。

この問題の全体的な影響は、次の理由により深刻です。-攻撃者がアプリケーションサーバーの機能を変更したり呼び出したりする可能性があります。-データや機能への不正アクセス、アカウントの乗っ取り、リモートコードの実行。-攻撃成功による機密性と完全性の懸念

https://www.owasp.org/index.php/Expression_Language_Injection

キャッチフレーズ

Govern AI-driven development before it ships

Measure AI-assisted risk, enforce secure coding policy at commit, and accelerate secure delivery across your SDLC.

book a demo
キャッチフレーズ

Explore more blogs

これは、オーラが射手と鼻の穴を広げることによって、腸管を熱的に発芽させ、臭いを帯びていることを防ぐためのものです。

browse all
Case Study
Filter Label
This is some text inside of a div block.

Supercharged Security Awareness: How Tournaments are Inspiring Developers at Erste Group

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

Learn More
Case Study
Filter Label
This is some text inside of a div block.

Security as culture: How Blue Prism cultivates world-class secure developers

Learn how Blue Prism, the global leader in intelligent automation for the enterprise, used Secure Code Warrior's agile learning platform to create a security-first culture with their developers, achieve their business goals, and ship secure code at speed

Learn More
Case Study
Filter Label
This is some text inside of a div block.

One Culture of Security: How Sage built their security champions program with agile secure code learning

Discover how Sage enhanced security with a flexible, relationship-focused approach, creating 200+ security champions and achieving measurable risk reduction.

Learn More
Blog
Filter Label
This is some text inside of a div block.

Enabler 7: Developer Recognition

Recognition fuels participation. Enabler 7 celebrates developer achievement loudly, with rewards and exclusive swag that mark real, earned secure coding wins.

Learn More
Blog
Filter Label
This is some text inside of a div block.

Named in the Gartner® Hype Cycle™ for Application Security 2026

Secure Code Warrior is named in the Gartner® Hype Cycle™ for Application Security, 2026 for Agentic Coding Security and Secure Coding Training. Here's why.

Learn More
Blog
Filter Label
This is some text inside of a div block.

Are you a CISO or Engineering Leader worried about the Security and Cost of LLM code generation?

Review the SCW AI Trust Index, our proprietary LLM benchmarking data, before going all-in on an AI model.

Learn More

Secure AI-driven development before it ships

See developer risk, enforce policy, and prevent vulnerabilities across your software development lifecycle.

デモを予約する
No items found.